-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDynamicExternalResolution.cs
More file actions
42 lines (36 loc) · 1.1 KB
/
Copy pathDynamicExternalResolution.cs
File metadata and controls
42 lines (36 loc) · 1.1 KB
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
using BepInEx;
using Comfort.Common;
using DynamicExternalResolution.Configs;
using EFT;
namespace DynamicExternalResolution
{
[BepInPlugin("com.DynamicExternalResolution", "Dynamic External Resolution", "1.3.0")]
public class DynamicExternalResolution : BaseUnityPlugin
{
private static Player _localPlayer = null;
public static Player getPlayerInstance()
{
if (_localPlayer != null)
{
return _localPlayer;
}
_localPlayer = Singleton<GameWorld>.Instance.MainPlayer;
return _localPlayer;
}
public static CameraClass getCameraInstance()
{
return CameraClass.Instance;
}
private void Awake()
{
DynamicExternalResolutionConfig.Init(Config);
Patcher.PatchAll();
Logger.LogInfo($"Plugin Dynamic External Resolution is loaded!");
}
private void OnDestroy()
{
Patcher.UnpatchAll();
Logger.LogInfo($"Plugin DynamicExternalResolution is unloaded!");
}
}
}