Exemplo n.º 1
0
 void CreateLoadGameObject(AssetBundleLoader loader)
 {
     if (loader.createComplete == null)
     {
         return;
     }
     System.Delegate[] list = loader.createComplete.GetInvocationList();
     for (int i = list.Length - 1; i >= 0; i--)
     {
         CreateGameObjectDelegate loadDelegate = list[i] as CreateGameObjectDelegate;
         try
         {
             GameObject obj = loader.CreateObject();
             if (obj != null)
             {
                 gameObjectMaps[obj] = loader;
             }
             loadDelegate(loader.data.shortName, obj);
         }
         catch (Exception e)
         {
             Loger.Error(e.ToString());
         }
     }
     loader.ClearCreateComplete();
 }