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; } }
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; } }
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); } }