private CustomInstantiationArgs(NetMainPrefab netMain, UnityEngine.Object customInstantiator, IDMain prefab, ref NetworkInstantiateArgs args, bool server, bool checkCustomInstantitorArgument) { this.netMain = netMain; this.prefab = prefab; this.prefabNetworkView = prefab.networkView; this.args = args; this.server = server; if (!checkCustomInstantitorArgument || !customInstantiator) { this.hasCustomInstantiator = CustomInstantiationArgs.CheckNetworkViewCustomInstantiator(this.prefabNetworkView, this.prefab, out this.customInstantiate); } else { this.customInstantiate = customInstantiator as IPrefabCustomInstantiate; if (this.customInstantiate != null) { this.hasCustomInstantiator = true; } else { this.hasCustomInstantiator = CustomInstantiationArgs.CheckNetworkViewCustomInstantiator(this.prefabNetworkView, this.prefab, out this.customInstantiate); } } }
private CustomInstantiationArgs(NetMainPrefab netMain, Object customInstantiator, IDMain prefab, ref NetworkInstantiateArgs args, bool server, bool checkCustomInstantitorArgument) { this.netMain = netMain; this.prefab = prefab; this.prefabNetworkView = prefab.networkView; this.args = args; this.server = server; if (checkCustomInstantitorArgument && (customInstantiator != null)) { this.customInstantiate = customInstantiator as IPrefabCustomInstantiate; if (this.customInstantiate == null) { this.hasCustomInstantiator = CheckNetworkViewCustomInstantiator(this.prefabNetworkView, this.prefab, out this.customInstantiate); } else { this.hasCustomInstantiator = true; } } else { this.hasCustomInstantiator = CheckNetworkViewCustomInstantiator(this.prefabNetworkView, this.prefab, out this.customInstantiate); } }
private static bool CheckNetworkViewCustomInstantiator(uLink.NetworkView view, out IPrefabCustomInstantiate custom) { custom = view.observed as IPrefabCustomInstantiate; return custom != null; }
private static bool CheckNetworkViewCustomInstantiator(uLink.NetworkView view, IDMain character, out IPrefabCustomInstantiate custom) { return (CustomInstantiationArgs.CheckNetworkViewCustomInstantiator(view, out custom) ? true : CustomInstantiationArgs.CheckNetworkViewCustomInstantiator(character, out custom)); }
private static bool CheckNetworkViewCustomInstantiator(IDMain character, out IPrefabCustomInstantiate custom) { custom = character as IPrefabCustomInstantiate; return custom != null; }
private static bool CheckNetworkViewCustomInstantiator(NetworkView view, IDMain character, out IPrefabCustomInstantiate custom) { return(CheckNetworkViewCustomInstantiator(view, out custom) || CheckNetworkViewCustomInstantiator(character, out custom)); }
private static bool CheckNetworkViewCustomInstantiator(IDMain character, out IPrefabCustomInstantiate custom) { custom = character as IPrefabCustomInstantiate; return(custom != null); }
private static bool CheckNetworkViewCustomInstantiator(NetworkView view, out IPrefabCustomInstantiate custom) { custom = view.observed as IPrefabCustomInstantiate; return(custom != null); }
private static bool CheckNetworkViewCustomInstantiator(uLink.NetworkView view, IDMain character, out IPrefabCustomInstantiate custom) { return(CustomInstantiationArgs.CheckNetworkViewCustomInstantiator(view, out custom) ? true : CustomInstantiationArgs.CheckNetworkViewCustomInstantiator(character, out custom)); }