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