Exemple #1
0
        static string GetGameObjectDebugString(GameObjectReference gameObjectReference, int i = 0)
        {
            var debugString = $"{Indent(i)}{gameObjectReference.GetName()}:\n";

            if (gameObjectReference.childGameObjectReferences.Any())
            {
                debugString += $"{Indent(i + 1)}Child Objects:\n";
                foreach (var item in gameObjectReference.childGameObjectReferences)
                {
                    debugString += GetGameObjectDebugString(item, i + 2);
                }
            }

            if (gameObjectReference.childComponentReferences.Any())
            {
                debugString += $"{Indent(i + 1)}Components:\n";
                foreach (var item in gameObjectReference.childComponentReferences)
                {
                    debugString += GetComponentDebugString(item, i + 2);
                }
            }

            return(debugString);
        }
Exemple #2
0
 public ComponentReference(Component value, GameObjectReference gameObjectReference)
 {
     this.value = value;
     this.parentGameObjectReference = gameObjectReference;
 }