Example #1
0
 public static void AddComponent <T>(this IGameObjectWrapper gow) where T : Component
 {
     if (gow == null)
     {
         throw IEDebug.Exception(null, "GameObject cannot be null");
     }
     gow.GameObject.AddComponent <T>();
 }
Example #2
0
 public SetActiveInternal(IGameObjectWrapper go)
 {
     _go = go;
 }
Example #3
0
 public static bool HasComponent <T>(this IGameObjectWrapper gow) where T : Component
 {
     return((gow?.GameObject).HasComponent <T>());
 }
Example #4
0
 public static IEnumerable <GameObject> Descendants(this IGameObjectWrapper gow, string name = null)
 {
     return((gow?.GameObject).Descendants(name));
 }
Example #5
0
 public static GameObject Descendant(this IGameObjectWrapper gow, string name)
 {
     return((gow?.GameObject).Descendant(name));
 }
Example #6
0
 public static GameObject Child(this IGameObjectWrapper gow, string name)
 {
     return((gow?.GameObject).Child(name));
 }
Example #7
0
 public static IEnumerable <GameObject> Children(this IGameObjectWrapper gow, string name = null)
 {
     return((gow?.GameObject).Children(name));
 }
Example #8
0
 public static T ComponentInDescendants <T>(this IGameObjectWrapper gow) where T : Component
 {
     return((gow?.GameObject).ComponentInDescendants <T>());
 }
Example #9
0
 public static IEnumerable <T> Components <T>(this IGameObjectWrapper gow) where T : Component
 {
     return((gow?.GameObject).Components <T>());
 }
Example #10
0
 public static bool IsAlive(this IGameObjectWrapper gow)
 {
     return(gow != null && gow.IsAlive);
 }