12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- using UnityEngine;
- using XGame.Framework.Asset;
- namespace XGame.Framework
- {
- [CreateAssetMenu(fileName = "XGameConfig", menuName = "XGame/XGame Config")]
- public sealed class XGameConfig : ScriptableObject
- {
- /// <summary>
- /// 项目名
- /// </summary>
- public string productName = "Demo";
- /// <summary>
- /// 项目的启动Assembly GUID
- /// </summary>
- public string launchAssemblyGUID;
- /// <summary>
- /// 项目的启动Assembly 名字
- /// </summary>
- public string launchAssemblyName;
- /// <summary>
- /// 项目的启动场景GUID
- /// </summary>
- public string launchSceneGUID;
- /// <summary>
- /// 项目的启动场景名字
- /// </summary>
- public string launchSceneName;
- /// <summary>
- /// 项目的启动脚本GUID
- /// XGame.Framework.IGameLogic的实现类
- /// </summary>
- public string gameLogicGUID;
- /// <summary>
- /// 项目的启动脚本名字
- /// XGame.Framework.IGameLogic的实现类
- /// </summary>
- public string gameLogicTypeName;
- /// <summary>
- /// 是否开启Debug
- /// 开启了会打印消息的收发信息
- /// </summary>
- public bool isSessionDebug;
- #region 静态代码 Runtime用
- public static IAssetLoadAsync<XGameConfig> LoadAsync()
- {
- return AssetManager.LoadAsync<XGameConfig>(Define.AssetDefine.XGAME_CONFIG_NAME);
- }
- public static void Unload(XGameConfig config)
- {
- if (config != null)
- {
- AssetManager.Recycle(config);
- }
- }
- #endregion
- }
- }
|