예제 #1
0
 Component[] GetTargets(Type type)
 {
     if (m_settings.Scope == ExportScope.TargetBranch && TargetBranch != null)
     {
         return(TargetBranch.GetComponentsInChildren(type));
     }
     else
     {
         return(Array.ConvertAll <UnityEngine.Object, Component>(GameObject.FindObjectsOfType(type), e => (Component)e));
     }
 }
예제 #2
0
 T[] GetTargets <T>() where T : Component
 {
     if (m_settings.Scope == ExportScope.TargetBranch && TargetBranch != null)
     {
         return(TargetBranch.GetComponentsInChildren <T>());
     }
     else
     {
         return(GameObject.FindObjectsOfType <T>());
     }
 }