|
|
@ -317,14 +317,20 @@ namespace Fungus.EditorUtils |
|
|
|
{ |
|
|
|
{ |
|
|
|
var varRefs = EditorExtensions.FindObjectsOfInterface<IVariableReference>() |
|
|
|
var varRefs = EditorExtensions.FindObjectsOfInterface<IVariableReference>() |
|
|
|
.Where(x => x.HasReference(variable)) |
|
|
|
.Where(x => x.HasReference(variable)) |
|
|
|
.Select(x => x.GetLocationIdentifier()).ToList(); ; |
|
|
|
.Select(x => x.GetLocationIdentifier()).ToArray(); ; |
|
|
|
|
|
|
|
|
|
|
|
string varRefString = variable.Key + " referenced in;\n"; |
|
|
|
string varRefString = variable.Key; |
|
|
|
|
|
|
|
|
|
|
|
if (varRefs.Count > 0) |
|
|
|
if (varRefs != null && varRefs.Length > 0) |
|
|
|
varRefString += string.Join("\n", varRefs); |
|
|
|
{ |
|
|
|
|
|
|
|
varRefString += " referenced in " + varRefs.Length.ToString() + " places:\n"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
varRefString += string.Join("\n - ", varRefs); |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
varRefString += "None"; |
|
|
|
{ |
|
|
|
|
|
|
|
varRefString += ", found no references."; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Debug.Log(varRefString); |
|
|
|
Debug.Log(varRefString); |
|
|
|
} |
|
|
|
} |
|
|
|