예제 #1
0
 private void GetResOnFinish <T>(ResAssurer assurer, Action <T> callback) where T : UnityEngine.Object
 {
     if (callback == null)
     {
         return;
     }
     if (assurer == null)
     {
         callback(null);
         return;
     }
     callback(assurer.Get <T>());
 }
예제 #2
0
        private ResAssurer GetAssurer(string AssetPath, bool bUnloadTag)
        {
            ResAssurer assurer = null;

            if (mAssurerList.ContainsKey(AssetPath))
            {
                assurer = mAssurerList[AssetPath] as ResAssurer;
                assurer.Init(AssetPath, bUnloadTag);
            }
            if (assurer == null)
            {
                assurer = ResAssurer.EasyGet();
                MarkAssurer(assurer);
                assurer.Init(AssetPath, bUnloadTag);
                mAssurerList.Add(assurer.AssetPath, assurer);
            }
            assurer.Retain();
            Log.IColor("ResAssurer[AssetPath:{0}]", LogColor.Orange, assurer.AssetPath);
            return(assurer);
        }