Ejemplo n.º 1
0
        protected override void OnLoad()
        {
#if UNITY_EDITOR
            if (DLCConfig.Ins.IsEditorMode)
            {
                Object = UnityEditor.AssetDatabase.LoadAssetAtPath(AssetFullPath, AssetType);
                return;
            }
#endif
            {
                Bundle    = DLCManager.LoadBundle(RealBundleName, DlcName, true);
                loadState = LoadStateType.Loading;
                loadCount = 0;
            }
        }
Ejemplo n.º 2
0
        protected override void OnLoad()
        {
#if UNITY_EDITOR
            if (DLCConfig.Ins.IsEditorMode)
            {
                Object = UnityEditor.AssetDatabase.LoadAssetAtPath(AssetFullPath, AssetType);
                return;
            }
#endif
            {
                Bundle = DLCManager.LoadBundle(RealBundleName, DlcName);
                if (Bundle == null)
                {
                    if (DLCManager.IsNextLogError)
                    {
                        CLog.Error("没有这个Bundle,错误的realBundleName:{0} dlcName:{1}", RealBundleName, DlcName);
                    }
                    return;
                }
                Object = Bundle.LoadAsset(AssetName, AssetType);
            }
        }
Ejemplo n.º 3
0
        protected override void OnLoad()
        {
#if UNITY_EDITOR
            if (DLCConfig.Ins.IsEditorMode)
            {
                asyncOperation = EditorSceneManager.LoadSceneAsyncInPlayMode(AssetFullPath, new LoadSceneParameters(LoadSceneMode.Additive, LocalPhysicsMode.None));
                loadState      = LoadStateType.Loading;
                loadCount      = 0;
                return;
            }
#endif
            {
                Bundle = DLCManager.LoadBundle(RealBundleName, DlcName, true);
                if (Bundle == null)
                {
                    CLog.Error($"无法加载场景Bundle!!{RealBundleName}:{DlcName}");
                }
                else
                {
                }
                loadState = LoadStateType.Loading;
                loadCount = 0;
            }
        }