예제 #1
0
 private static Object _GetComponent(Type type, NetworkViewBase nv)
 {
     if (nv.IsNullOrDestroyed())
     {
         return(null);
     }
     return(type == typeof(GameObject) ? nv.gameObject : nv.GetComponent(type) as Object);
 }
예제 #2
0
 private static T _GetComponent <T>(NetworkViewBase nv) where T : Component
 {
     return(!nv.IsNullOrDestroyed() ? nv.GetComponent <T>() : null);
 }