-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnityExplorer.cs
More file actions
34 lines (27 loc) · 873 Bytes
/
UnityExplorer.cs
File metadata and controls
34 lines (27 loc) · 873 Bytes
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
using COSML.Modding;
using UnityEngine;
namespace UnityExplorer
{
public class UnityExplorer : Mod
{
public override string GetVersion() => typeof(ExplorerStandalone).Assembly.GetName().Version.ToString();
public UnityExplorer() : base("Unity Explorer") { }
private GameObject ueGo;
internal static UnityExplorer Instance;
private bool isInitialized = false;
public override void Init()
{
Instance = this;
if (ueGo != null) return;
ueGo = new GameObject("COS_UnityExplorer");
Object.DontDestroyOnLoad(ueGo);
ueGo.AddComponent<KeyboardMono>();
}
internal void InitExplorer()
{
if (isInitialized) return;
isInitialized = true;
ExplorerStandalone.CreateInstance();
}
}
}