AxibugEmuOnline/AxibugEmuOnline.Client/Assets/Script/AppMain/Initer.cs

51 lines
1.3 KiB
C#
Raw Normal View History

using AxibugEmuOnline.Client.ClientCore;
2024-12-11 21:21:27 +08:00
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public class Initer : MonoBehaviour
{
static GlobalRef m_refs;
public static CanvasGroup FilterPreview => m_refs.FilterPreview;
public static CanvasGroup XMBBg => m_refs.XMBBg;
2024-12-11 21:21:27 +08:00
public static string dev_UUID;
[SerializeField]
2025-01-07 14:21:22 +08:00
GameObject IMPORTENT;
2024-12-11 21:29:19 +08:00
#if UNITY_EDITOR
public bool bTestSkipWebApiToConServer = false;
2024-12-11 21:29:19 +08:00
public string mTestSrvIP = "192.168.0.47";
public bool bUseLocalWebApi = false;
public string mLocalWebApi = "http://localhost:5051";
2025-01-02 15:39:13 +08:00
public bool bEditorUUID = false;
2024-12-11 21:29:19 +08:00
#endif
2024-12-11 21:21:27 +08:00
private void Awake()
{
2024-12-11 21:29:19 +08:00
#if UNITY_EDITOR
App.Init(bTestSkipWebApiToConServer, mTestSrvIP, bUseLocalWebApi,mLocalWebApi);
2025-01-02 15:39:13 +08:00
dev_UUID = SystemInfo.deviceUniqueIdentifier;
if (bEditorUUID)
{
dev_UUID += "_Editor";
}
2024-12-11 21:29:19 +08:00
#else
2024-12-11 21:21:27 +08:00
App.Init(this);
dev_UUID = SystemInfo.deviceUniqueIdentifier;
2025-01-02 15:39:13 +08:00
#endif
m_refs = Instantiate(IMPORTENT, transform).GetComponent<GlobalRef>();
}
private void Start()
{
App.settings.Filter.ShutDownFilterPreview();
App.settings.Filter.ShutDownFilter();
2024-12-11 21:21:27 +08:00
}
}
}