场景中只保留Initer脚本,启动时从脚本动态加载其他初始化所需对象(为了该死的低版本UNITY兼容)
This commit is contained in:
parent
6775c1279e
commit
e9375e2277
2955
AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab
Normal file
2955
AxibugEmuOnline.Client/Assets/Resources/IMPORTENT.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6f56a07c0ec38946a0257a1e0b8926d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -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]");
|
||||
|
@ -0,0 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class GlobalRef : MonoBehaviour
|
||||
{
|
||||
public CanvasGroup FilterPreview;
|
||||
public CanvasGroup XMBBg;
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e727704ce154534caf90c91ed3085ef
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user