| | |
| | | { |
| | | get |
| | | { |
| | | if (string.IsNullOrEmpty(m_GameId)) |
| | | { |
| | | var gameText = Resources.Load<TextAsset>("Game"); |
| | | if (gameText != null) |
| | | { |
| | | m_GameId = gameText.text; |
| | | } |
| | | else |
| | | { |
| | | m_GameId = "xssg"; |
| | | } |
| | | } |
| | | |
| | | return m_GameId; |
| | | // m_GameId 由 Get() 异步预加载,此处直接返回缓存值 |
| | | return string.IsNullOrEmpty(m_GameId) ? "xssg" : m_GameId; |
| | | } |
| | | } |
| | | |
| | |
| | | set { m_SdkFileName = value; } |
| | | } |
| | | |
| | | static VersionConfigEx config = null; |
| | | public static VersionConfigEx config = null; |
| | | public async static UniTask<VersionConfigEx> Get() |
| | | { |
| | | if (config == null) |
| | |
| | | } |
| | | } |
| | | |
| | | // 预加载 gameId |
| | | if (config != null && string.IsNullOrEmpty(config.m_GameId)) |
| | | { |
| | | var gameReq = Resources.LoadAsync<TextAsset>("Game"); |
| | | await gameReq; |
| | | TextAsset gameText = gameReq.asset as TextAsset; |
| | | config.m_GameId = gameText != null ? gameText.text : "xssg"; |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |