Пример #1
0
        private void FindUsage(Variable variable)
        {
            var varRefs = EditorExtensions.FindObjectsOfInterface <IVariableReference>()
                          .Where(x => x.HasReference(variable))
                          .Select(x => x.GetLocationIdentifier()).ToList();;

            string varRefString = variable.Key + " referenced in;\n";

            if (varRefs.Count > 0)
            {
                varRefString += string.Join("\n", varRefs);
            }
            else
            {
                varRefString += "None";
            }

            Debug.Log(varRefString);
        }
Пример #2
0
        private void FindUsage(Variable variable)
        {
            var varRefs = EditorExtensions.FindObjectsOfInterface <IVariableReference>()
                          .Where(x => x.HasReference(variable))
                          .Select(x => x.GetLocationIdentifier()).ToArray();;

            string varRefString = variable.Key;

            if (varRefs != null && varRefs.Length > 0)
            {
                varRefString += " referenced in " + varRefs.Length.ToString() + " places:\n";

                varRefString += string.Join("\n - ", varRefs);
            }
            else
            {
                varRefString += ", found no references.";
            }

            Debug.Log(varRefString);
        }