예제 #1
0
파일: Asset.cs 프로젝트: mengtest/CYMCommon
        protected override void OnLoad()
        {
#if UNITY_EDITOR
            if (DLCConfig.Ins.IsEditorMode)
            {
                asset = UnityEditor.AssetDatabase.LoadAssetAtPath(assetFullPath, assetType);
                return;
            }
#endif
            {
                request   = DLCAssetMgr.LoadBundle(realBundleName, dlcName, true);
                loadState = LoadStateType.Loading;
                loadCount = 0;
            }
        }
예제 #2
0
파일: Asset.cs 프로젝트: mengtest/CYMCommon
        protected override void OnLoad()
        {
#if UNITY_EDITOR
            if (DLCConfig.Ins.IsEditorMode)
            {
                asyncOperation = EditorSceneManager.LoadSceneAsyncInPlayMode(assetFullPath, new LoadSceneParameters(LoadSceneMode.Additive, LocalPhysicsMode.None));
                // UnityEditor.EditorApplication.LoadLevelAdditiveAsyncInPlayMode(assetFullPath);
                loadState = LoadStateType.Loading;
                loadCount = 0;
                return;
            }
#endif
            {
                request   = DLCAssetMgr.LoadBundle(realBundleName, dlcName, true);
                loadState = LoadStateType.Loading;
                loadCount = 0;
            }
        }
예제 #3
0
파일: Asset.cs 프로젝트: mengtest/CYMCommon
        protected override void OnLoad()
        {
#if UNITY_EDITOR
            if (DLCConfig.Ins.IsEditorMode)
            {
                asset = UnityEditor.AssetDatabase.LoadAssetAtPath(assetFullPath, assetType);
                return;
            }
#endif
            {
                request = DLCAssetMgr.LoadBundle(realBundleName, dlcName);
                if (request == null)
                {
                    if (DLCAssetMgr.IsNextLogError)
                    {
                        CLog.Error("错误:realBundleName:{0} dlcName:{1}", realBundleName, dlcName);
                    }
                    return;
                }
                asset = request.LoadAsset(assetName, assetType);
            }
        }