private NetInstance Summon(IDMain prefab, bool isServer, ref NetworkInstantiateArgs niargs) { IDMain main; CustomInstantiationArgs args = new CustomInstantiationArgs(this, this._customInstantiator, prefab, ref niargs, isServer); NetworkView view = this.Create(ref args, out main); NetInstance instance = view.gameObject.AddComponent <NetInstance>(); instance.args = args; instance.idMain = main; instance.prepared = false; instance.networkView = view; return(instance); }
private NetInstance Summon(IDMain prefab, bool isServer, ref NetworkInstantiateArgs niargs) { IDMain dMain; CustomInstantiationArgs customInstantiationArg = new CustomInstantiationArgs(this, this._customInstantiator, prefab, ref niargs, isServer); Facepunch.NetworkView networkView = this.Create(ref customInstantiationArg, out dMain); NetInstance netInstance = networkView.gameObject.AddComponent <NetInstance>(); netInstance.args = customInstantiationArg; netInstance.idMain = dMain; netInstance.prepared = false; netInstance.networkView = networkView; return(netInstance); }
// Token: 0x0600216F RID: 8559 RVA: 0x0007B0D0 File Offset: 0x000792D0 private global::NetInstance Summon(IDMain prefab, bool isServer, ref NetworkInstantiateArgs niargs) { global::CustomInstantiationArgs args = new global::CustomInstantiationArgs(this, this._customInstantiator, prefab, ref niargs, isServer); IDMain idMain; Facepunch.NetworkView networkView = this.Create(ref args, out idMain); global::NetInstance netInstance = networkView.gameObject.AddComponent <global::NetInstance>(); netInstance.args = args; netInstance.idMain = idMain; netInstance.prepared = false; netInstance.networkView = networkView; return(netInstance); }
// Token: 0x06002175 RID: 8565 RVA: 0x0007B318 File Offset: 0x00079518 protected uLink.NetworkView _Creator(string prefabName, NetworkInstantiateArgs args, uLink.NetworkMessageInfo info) { global::NetInstance netInstance = this.Summon(this.proxyPrefab, false, ref args); if (!netInstance) { return(null); } Facepunch.NetworkView networkView = netInstance.networkView; if (!networkView) { return(null); } info = new uLink.NetworkMessageInfo(info, networkView); global::NetInstance currentNetInstance = global::NetMainPrefab._currentNetInstance; try { global::NetMainPrefab._currentNetInstance = netInstance; netInstance.info = info; netInstance.prepared = true; global::NetInstance netInstance2 = netInstance; uLink.NetworkViewID viewID = args.viewID; netInstance2.local = viewID.isMine; bool didAppend = false; IDRemote appended = null; if (netInstance.local) { IDRemote localAppend = this.localAppend; if (localAppend) { appended = global::NetMainPrefab.DoLocalAppend(localAppend, netInstance.idMain, this.GetLocalAppendTransform(netInstance.idMain)); didAppend = true; } } netInstance.zzz___onprecreate(); this.StandardInitialization(didAppend, appended, netInstance, networkView, ref info); netInstance.zzz___onpostcreate(); } finally { global::NetMainPrefab._currentNetInstance = currentNetInstance; } return(networkView); }
protected NetworkView _Creator(string prefabName, NetworkInstantiateArgs args, NetworkMessageInfo info) { NetInstance instance = this.Summon(this.proxyPrefab, false, ref args); if (instance == null) { return(null); } NetworkView networkView = instance.networkView; if (networkView == null) { return(null); } info = new NetworkMessageInfo(info, networkView); NetInstance instance2 = _currentNetInstance; try { _currentNetInstance = instance; instance.info = info; instance.prepared = true; instance.local = args.viewID.isMine; bool didAppend = false; IDRemote appended = null; if (instance.local) { IDRemote localAppend = this.localAppend; if (localAppend != null) { appended = DoLocalAppend(localAppend, instance.idMain, this.GetLocalAppendTransform(instance.idMain)); didAppend = true; } } instance.zzz___onprecreate(); this.StandardInitialization(didAppend, appended, instance, networkView, ref info); instance.zzz___onpostcreate(); } finally { _currentNetInstance = instance2; } return(networkView); }
protected uLink.NetworkView _Creator(string prefabName, NetworkInstantiateArgs args, uLink.NetworkMessageInfo info) { NetInstance netInstance = this.Summon(this.proxyPrefab, false, ref args); if (!netInstance) { return(null); } Facepunch.NetworkView networkView = netInstance.networkView; if (!networkView) { return(null); } info = new uLink.NetworkMessageInfo(info, networkView); NetInstance netInstance1 = NetMainPrefab._currentNetInstance; try { NetMainPrefab._currentNetInstance = netInstance; netInstance.info = info; netInstance.prepared = true; netInstance.local = args.viewID.isMine; bool flag = false; IDRemote dRemote = null; if (netInstance.local) { IDRemote dRemote1 = this.localAppend; if (dRemote1) { dRemote = NetMainPrefab.DoLocalAppend(dRemote1, netInstance.idMain, this.GetLocalAppendTransform(netInstance.idMain)); flag = true; } } netInstance.zzz___onprecreate(); this.StandardInitialization(flag, dRemote, netInstance, networkView, ref info); netInstance.zzz___onpostcreate(); } finally { NetMainPrefab._currentNetInstance = netInstance1; } return(networkView); }
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); } }
public CustomInstantiationArgs(NetMainPrefab netMain, UnityEngine.Object customInstantiator, IDMain prefab, ref NetworkInstantiateArgs args, bool server) : this(netMain, customInstantiator, prefab, ref args, server, true) { }
public CustomInstantiationArgs(NetMainPrefab netMain, IDMain prefab, ref NetworkInstantiateArgs args, bool server) : this(netMain, null, prefab, ref args, server, false) { }
// Token: 0x06002180 RID: 8576 RVA: 0x0007B85C File Offset: 0x00079A5C public CustomInstantiationArgs(global::NetMainPrefab netMain, IDMain prefab, ref NetworkInstantiateArgs args, bool server) { this = new global::CustomInstantiationArgs(netMain, null, prefab, ref args, server, false); }
// Token: 0x06002181 RID: 8577 RVA: 0x0007B86C File Offset: 0x00079A6C public CustomInstantiationArgs(global::NetMainPrefab netMain, Object customInstantiator, IDMain prefab, ref NetworkInstantiateArgs args, bool server) { this = new global::CustomInstantiationArgs(netMain, customInstantiator, prefab, ref args, server, true); }
public CustomInstantiationArgs(NetMainPrefab netMain, Object customInstantiator, IDMain prefab, ref NetworkInstantiateArgs args, bool server) : this(netMain, customInstantiator, prefab, ref args, server, true) { }