场景中只保留Initer脚本,启动时从脚本动态加载其他初始化所需对象(为了该死的低版本UNITY兼容)

This commit is contained in:
ALIENJACK\alien 2024-12-27 14:47:17 +08:00
parent 588c8c13de
commit fdf88aa626
7 changed files with 2988 additions and 2912 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e6f56a07c0ec38946a0257a1e0b8926d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,4 +1,4 @@
using AxibugEmuOnline.Client.Manager;
using AxibugEmuOnline.Client.Manager;
using AxibugEmuOnline.Client.Network;
using System.Collections;
using System.IO;
@ -69,7 +69,7 @@ namespace AxibugEmuOnline.Client.ClientCore
CacheMgr = new CacheManager();
roomMgr = new AppRoom();
share = new AppShare();
filter = new FilterManager(initer.m_filterPreview, initer.m_xmbBg);
filter = new FilterManager(initer.FilterPreview, initer.XMBBg);
bTest = isTest;
mTestSrvIP = testSrvIP;
var go = new GameObject("[AppAxibugEmuOnline]");

View File

@ -0,0 +1,7 @@
using UnityEngine;
public class GlobalRef : MonoBehaviour
{
public CanvasGroup FilterPreview;
public CanvasGroup XMBBg;
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0e727704ce154534caf90c91ed3085ef

View File

@ -1,14 +1,20 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.ClientCore;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public class Initer : MonoBehaviour
{
public CanvasGroup m_filterPreview;
public CanvasGroup m_xmbBg;
public CanvasGroup FilterPreview => m_refs.FilterPreview;
public CanvasGroup XMBBg => m_refs.XMBBg;
public static string dev_UUID;
[SerializeField]
GameObject IMPORTENT;
GlobalRef m_refs;
#if UNITY_EDITOR
public bool bTest = false;
public string mTestSrvIP = "192.168.0.47";
@ -16,12 +22,15 @@ namespace AxibugEmuOnline.Client
private void Awake()
{
m_refs = Instantiate(IMPORTENT, transform).GetComponent<GlobalRef>();
#if UNITY_EDITOR
App.Init(this, bTest, mTestSrvIP);
#else
App.Init(this);
#endif
dev_UUID = SystemInfo.deviceUniqueIdentifier;
}
}
}