protected async void LoadGame(bool isSimulate = true) { var moduleGroupTypeConfigPath = AssetPath.GetAssetPathFromResourcePath(Constant.MODULE_GROUP_TYPE_CONFIG_PATH); var moduleGroupTypeConfig = Resources.Load <LayerMaskConfig>(moduleGroupTypeConfigPath); var worldMgr = WorldManager.Instance; worldMgr.Module.Init(moduleGroupTypeConfig); var unitTypeConfigPath = AssetPath.GetAssetPathFromResourcePath(Constant.UNIT_TYPE_CONFIG_PATH); var unitTypeConfig = Resources.Load <LayerConfig>(unitTypeConfigPath); worldMgr.Unit.Init(unitTypeConfig); RegisterECSModule(); IAssetLoader customLoader = null; #if UNITY_EDITOR if (isSimulate) { customLoader = new SimulateAssetLoader(); } #endif worldMgr.Factory.CreateAssetProcess("http://localhost:8000/AssetBundles"); await AssetProcess.Init(customLoader); worldMgr.Factory.CreateUIProcess(); RegisterGameModule(); StartGame(); }
static void RemoveFromResourceConfig(string assetFullPath) { var assetPath = AssetPath.GetAssetPathFromResourcePath(assetFullPath); var assetConfig = GetAssetConfig(); assetConfig.Remove(assetPath); EditorUtility.SetDirty(assetConfig); }
public static void AddToResourceConfig(string assetFullPath) { var assetPath = AssetPath.GetAssetPathFromResourcePath(assetFullPath); var assetConfig = GetAssetConfig(); assetConfig.Add(new AssetInfo() { assetPath = assetPath, fullPath = assetFullPath, isFromBundle = false });; EditorUtility.SetDirty(assetConfig); }