예제 #1
0
        public override async void OnEnter(IFSM <Launcher> fsm)
        {
            ModuleManager.Instance.GetModule <IResourceManager>();
            ModuleManager.Instance.GetModule <IAudioManager>();

#if !ILRUNTIME
            scriptManager = EditorScriptManager.Instance;
            Debug.Log("现在是通过直接加载dll调用的");
#else
            scriptManager = ScriptManager.Instance;
            ScriptManager.Instance.SetReginster(new AdaptorReginster(), new CLRBinderReginster(), new ValueTypeBinderReginster(), new DelegateConvertor());
            Debug.Log("现在是直接通过ILRuntime调用的");
#endif
            await scriptManager.Load("Code");

            scriptManager.InvokeMethod("Game.Hotfix.Main", "Initialize", null, new object[] { scriptManager });
        }