Framework_YooAsset_HybridCLR/Assets/DemoGame/GameScript/Hotfix/GameEntry.cs

15 lines
380 B
C#
Raw Normal View History

using UnityEngine;
using YooAsset;
namespace ZC
{
public class GameEntry
{
public static void Init(GameObject go, EPlayMode playMode)
{
Debug.Log("热更成功了");
2024-11-12 16:57:51 +08:00
var gameObject = GameObject.Instantiate(new GameObject(nameof(ZCGame)), go.transform);
gameObject.AddComponent<ZCGame>().OnInit(go);
}
}
}