16 lines
480 B
C#
16 lines
480 B
C#
using UnityEngine;
|
||
// 特殊处理游戏初始化的逻辑,用Apk内的Assembly加载动态库的初始化文件
|
||
public class GameInit : MonoBehaviour
|
||
{
|
||
private void Awake()
|
||
{
|
||
#if UNITY_IOS || UNITY_IPHONE
|
||
gameObject.AddComponent<LoginUILogic>();
|
||
#else
|
||
var assembly = AssetUpdateManager.dllAssembly ?? GetType().Assembly;
|
||
var type = assembly.GetType("LoginUILogic");
|
||
gameObject.AddComponent(type);
|
||
#endif
|
||
Destroy(this);
|
||
}
|
||
} |