protected override void GetInjectableMonoBehaviours(List <MonoBehaviour> monoBehaviours) { // We inject on all components on the root except ourself foreach (var monoBehaviour in GetComponents <MonoBehaviour>()) { if (monoBehaviour == null) { // Missing script continue; } if (!ZenUtilInternal.IsInjectableMonoBehaviourType(monoBehaviour.GetType())) { continue; } if (monoBehaviour == this) { continue; } monoBehaviours.Add(monoBehaviour); } for (int i = 0; i < this.transform.childCount; i++) { var child = this.transform.GetChild(i); if (child != null) { ZenUtilInternal.GetInjectableMonoBehaviours( child.gameObject, monoBehaviours); } } }
protected override void GetInjectableMonoBehaviours(List <MonoBehaviour> monoBehaviours) { ZenUtilInternal.GetInjectableMonoBehaviours(this.gameObject.scene, monoBehaviours); }
protected override IEnumerable <MonoBehaviour> GetInjectableMonoBehaviours() { return(ZenUtilInternal.GetInjectableMonoBehaviours(this.gameObject.scene)); }