Exemple #1
0
 public static T FindChildWithTag <T>(this MonoBehaviour gameObject, string tag) where T : Component
 {
     return(Enumerable.SingleOrDefault <T>(gameObject.FindChildrenWithTag(tag)));
 }
Exemple #2
0
 public static GameObject FindChildWithTag(this MonoBehaviour gameObject, string tag)
 {
     return(Enumerable.SingleOrDefault <GameObject>(gameObject.FindChildrenWithTag(tag)));
 }