public AssetLoadTask(string path, System.Action <T> callBack = null, string packName = null, bool showDebugString = true) { mIsDone = false; mPath = path; mCallBack = callBack; mShowDebugString = showDebugString; #if UNITY_EDITOR mStartLoadTime = Time.realtimeSinceStartup; #endif if (Application.isPlaying) { if (packName == null) { AssetBundleManager.sInstance.StartCoroutine(AssetBundleManager.LoadInResourceAssetAsync <T>(mPath, AfterLoad)); } else { AssetBundleManager.sInstance.StartCoroutine(AssetBundleManager.LoadInResourcePackedAsset <T>(packName, mPath, AfterLoad)); } } else { Object obj = Resources.Load(path); AfterLoad(obj as T); } }