Beispiel #1
0
 private static void OnResourcesLoaded()
 {
     BaseTraitMap[] baseTraitMapArray = Bundling.LoadAll <BaseTraitMap>();
     for (int i = 0; i < (int)baseTraitMapArray.Length; i++)
     {
         BaseTraitMap baseTraitMap = baseTraitMapArray[i];
         if (baseTraitMap)
         {
             try
             {
                 Binder.BindMap(baseTraitMap);
             }
             catch (Exception exception)
             {
                 UnityEngine.Debug.LogError(exception, baseTraitMap);
             }
         }
     }
     DatablockDictionary.Initialize();
     NetMainPrefab[] netMainPrefabArray = Bundling.LoadAll <NetMainPrefab>();
     for (int j = 0; j < (int)netMainPrefabArray.Length; j++)
     {
         NetMainPrefab netMainPrefab = netMainPrefabArray[j];
         try
         {
             netMainPrefab.Register(true);
         }
         catch (Exception exception1)
         {
             UnityEngine.Debug.LogException(exception1, netMainPrefab);
         }
     }
     uLinkNetworkView[] uLinkNetworkViewArray = Bundling.LoadAll <uLinkNetworkView>();
     for (int k = 0; k < (int)uLinkNetworkViewArray.Length; k++)
     {
         uLinkNetworkView _uLinkNetworkView = uLinkNetworkViewArray[k];
         try
         {
             NetCull.RegisterNetAutoPrefab(_uLinkNetworkView);
         }
         catch (Exception exception2)
         {
             UnityEngine.Debug.LogException(exception2, _uLinkNetworkView);
         }
     }
     NGC.Register(NGCConfiguration.Load());
 }
Beispiel #2
0
 private static void OnResourcesLoaded()
 {
     foreach (BaseTraitMap map in Bundling.LoadAll <BaseTraitMap>())
     {
         if (map != null)
         {
             try
             {
                 Binder.BindMap(map);
             }
             catch (Exception exception)
             {
                 Debug.LogError(exception, map);
             }
         }
     }
     DatablockDictionary.Initialize();
     foreach (NetMainPrefab prefab in Bundling.LoadAll <NetMainPrefab>())
     {
         try
         {
             prefab.Register(true);
         }
         catch (Exception exception2)
         {
             Debug.LogException(exception2, prefab);
         }
     }
     foreach (uLinkNetworkView view in Bundling.LoadAll <uLinkNetworkView>())
     {
         try
         {
             NetCull.RegisterNetAutoPrefab(view);
         }
         catch (Exception exception3)
         {
             Debug.LogException(exception3, view);
         }
     }
     NGC.Register(NGCConfiguration.Load());
 }
Beispiel #3
0
 private void Awake()
 {
     this.ngc             = base.GetComponent <NGC>();
     this.ngc.networkView = this;
     try
     {
         base.observed             = this.ngc;
         base.rpcReceiver          = RPCReceiver.OnlyObservedComponent;
         base.stateSynchronization = NetworkStateSynchronization.Off;
         base.securable            = NetworkSecurable.None;
     }
     finally
     {
         try
         {
             base.Awake();
         }
         finally
         {
             this.ngc.networkViewID = base.viewID;
         }
     }
 }
Beispiel #4
0
 private new void Awake()
 {
     this.ngc = base.GetComponent<NGC>();
     this.ngc.networkView = this;
     try
     {
         this.observed = this.ngc;
         this.rpcReceiver = RPCReceiver.OnlyObservedComponent;
         this.stateSynchronization = uLink.NetworkStateSynchronization.Off;
         this.securable = NetworkSecurable.None;
     }
     finally
     {
         try
         {
             base.Awake();
         }
         finally
         {
             this.ngc.networkViewID = base.viewID;
         }
     }
 }