场景中只保留Initer脚本,启动时从脚本动态加载其他初始化所需对象(为了该死的低版本UNITY兼容)
This commit is contained in:
parent
588c8c13de
commit
fdf88aa626
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 AxibugEmuOnline.Client.Network;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@ -69,7 +69,7 @@ namespace AxibugEmuOnline.Client.ClientCore
|
|||||||
CacheMgr = new CacheManager();
|
CacheMgr = new CacheManager();
|
||||||
roomMgr = new AppRoom();
|
roomMgr = new AppRoom();
|
||||||
share = new AppShare();
|
share = new AppShare();
|
||||||
filter = new FilterManager(initer.m_filterPreview, initer.m_xmbBg);
|
filter = new FilterManager(initer.FilterPreview, initer.XMBBg);
|
||||||
bTest = isTest;
|
bTest = isTest;
|
||||||
mTestSrvIP = testSrvIP;
|
mTestSrvIP = testSrvIP;
|
||||||
var go = new GameObject("[AppAxibugEmuOnline]");
|
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;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
public class Initer : MonoBehaviour
|
public class Initer : MonoBehaviour
|
||||||
{
|
{
|
||||||
public CanvasGroup m_filterPreview;
|
public CanvasGroup FilterPreview => m_refs.FilterPreview;
|
||||||
public CanvasGroup m_xmbBg;
|
public CanvasGroup XMBBg => m_refs.XMBBg;
|
||||||
|
|
||||||
public static string dev_UUID;
|
public static string dev_UUID;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
GameObject IMPORTENT;
|
||||||
|
|
||||||
|
GlobalRef m_refs;
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
public bool bTest = false;
|
public bool bTest = false;
|
||||||
public string mTestSrvIP = "192.168.0.47";
|
public string mTestSrvIP = "192.168.0.47";
|
||||||
@ -16,12 +22,15 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
m_refs = Instantiate(IMPORTENT, transform).GetComponent<GlobalRef>();
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
App.Init(this, bTest, mTestSrvIP);
|
App.Init(this, bTest, mTestSrvIP);
|
||||||
#else
|
#else
|
||||||
App.Init(this);
|
App.Init(this);
|
||||||
#endif
|
#endif
|
||||||
dev_UUID = SystemInfo.deviceUniqueIdentifier;
|
dev_UUID = SystemInfo.deviceUniqueIdentifier;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user