薛之猫大王
17 hours ago aa2f44839b78e3d339ef6487a83d9f3371f8d57e
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
//
// GameApp.cs
// Create:
//      2019-10-29
// Description:
//      本地代码插件
// Author:
//      薛林强 <545626463@qq.com>
//
// Copyright (c) 2026 虚幻骑士科技
 
using Skyunion;
#if UNITY_EDITOR
using UnityEditor;
#endif
 
using UnityEngine;
 
public class NativePlugin : Plugin
{
    public NativePlugin() : base("NativePlugin")
    {
    }
    public override void OnAddModule()
    {
        HotfixMode mode = HotfixMode.NativeCode;
#if UNITY_EDITOR
        mode = (HotfixMode)EditorPrefs.GetInt("HofixService_HofixMode", (int)HotfixMode.NativeCode);
#endif
        if (mode == HotfixMode.NativeCode)
        {
            AddModule<IHotFixService>(new HotFixService_Native());
        }
    }
}