Пример #1
0
 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);
         }
     }
 }
Пример #2
0
 private static bool CheckNetworkViewCustomInstantiator(uLink.NetworkView view, IDMain character, out IPrefabCustomInstantiate custom)
 {
     return(CustomInstantiationArgs.CheckNetworkViewCustomInstantiator(view, out custom) ? true : CustomInstantiationArgs.CheckNetworkViewCustomInstantiator(character, out custom));
 }