Exemplo n.º 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());
 }
Exemplo n.º 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());
 }