Files
JJBB/Assets/CSAssets/CSCode/GameInit.cs
2024-08-23 15:49:34 +08:00

16 lines
480 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}
}