예제 #1
0
 public static void GetSecondResource(string resourceName, Action <UnityEngine.Object> loaded, Action <float> progress = null)
 {
     m_assetMgr.SecondLoadAsset(resourceName, delegate(UnityEngine.Object obj) {
         if (obj != 0)
         {
             int key = obj.GetInstanceID();
             if (!m_resourceDic.ContainsKey(key))
             {
                 m_resourceDic.Add(key, resourceName);
             }
         }
         if (loaded != null)
         {
             loaded(obj);
         }
     }, progress);
 }
예제 #2
0
 public static void GetSecondResource(string resourceName, Action <Object> loaded, Action <float> progress = null)
 {
     m_assetMgr.SecondLoadAsset(resourceName, (obj) =>
     {
         if (obj)
         {
             int id = obj.GetInstanceID();
             if (!m_resourceDic.ContainsKey(id))
             {
                 m_resourceDic.Add(id, resourceName);
             }
         }
         if (loaded != null)
         {
             loaded(obj);
         }
     }, progress);
 }