-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPlugin.cs
More file actions
53 lines (48 loc) · 1.48 KB
/
Copy pathPlugin.cs
File metadata and controls
53 lines (48 loc) · 1.48 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
43
44
45
46
47
48
49
50
51
52
53
using System;
using UnityEngine;
using PlayFab;
using GorillaNetworking;
using GreyServers;
#if BEPINEX_RELEASE
using BepInEx;
#elif MELONLOADER_RELEASE
using MelonLoader;
[assembly: MelonInfo(typeof(GreyServers.Plugin), PluginInfo.Name, PluginInfo.Version, "Unixity")]
[assembly: MelonGame("Another Axiom", "Gorilla Tag")]
#endif
namespace GreyServers
{
#if BEPINEX_RELEASE
[BepInPlugin(PluginInfo.GUID, PluginInfo.Name, PluginInfo.Version)]
public class Plugin : BaseUnityPlugin
{
private void Awake()
{
Initialize();
}
#elif MELONLOADER_RELEASE
public class Plugin : MelonMod
{
public override void OnInitializeMelon()
{
Initialize();
}
#endif
private void Initialize()
{
Debug.Log("current title id is " + PlayFabSettings.TitleId);
PlayFabSettings.TitleId = "1457F3";
PlayFabAuthenticatorSettings.TitleId = "1457F3";
GreyServers.HarmonyPatches.HarmonyPatches.ApplyHarmonyPatches();
Debug.Log("setting titleid to " + PlayFabSettings.TitleId);
#if BEPINEX_RELEASE
Debug.Log(PlayFabAuthenticatorSettings.AuthApiBaseUrl);
UnityEngine.Object.DontDestroyOnLoad(this.gameObject);
#elif MELONLOADER_RELEASE
Debug.Log(PlayFabAuthenticatorSettings.AuthApiBaseUrl);
GameObject target = new GameObject("GreyServers");
UnityEngine.Object.DontDestroyOnLoad(target);
#endif
}
}
}