薛之猫大王
17 hours ago da45ccae4c4b03fa50308b442a04ccfd3de160e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// GameApp.cs
// Create:
//      2019-10-29
// Description:
//      核心模块的插件
// Author:
//      薛林强 <545626463@qq.com>
//
// Copyright (c) 2026 虚幻骑士科技
 
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
 
namespace Skyunion
{
    public class CorePlugin : Plugin
    {
        public CorePlugin():base("CorePlugin")
        {
        }
        public override void OnAddModule()
        {
            AddModule<ILogService>(new LogService());
            AddModule<INetServcice>(new NetService());
            //AddModule<IAssetService>(new XAssetService());
            AddModule<IAssetService>(new AddressAssetService());
            AddModule<IAudioService>(new AudioService());
            AddModule<IUIManager>(new UIManager());
            AddModule<IInputManager>(new InputManager());
            AddModule<IDataService>(new DataServiceSQLite());
            HotfixMode mode = HotfixMode.NativeCode;
#if UNITY_EDITOR
            mode = (HotfixMode)EditorPrefs.GetInt("HofixService_HofixMode", (int)HotfixMode.NativeCode);
#endif
            if (mode == HotfixMode.ILRT || mode == HotfixMode.Reflect)
            {
                AddModule<IHotFixService>(new HotFixService());
            }
        }
    }
}