fixed access violation in SetSteamName and SetServerName

This commit is contained in:
2023-03-05 17:25:15 +01:00
parent b2ee6eee89
commit cb7dc3ba15

View File

@@ -167,11 +167,21 @@ namespace DevourClient.Hacks
public static void SetSteamName(string name)
{
Il2CppHorror.Menu Menu_ = UnityEngine.Object.FindObjectOfType<Il2CppHorror.Menu>();
if (Menu_ == null)
{
return;
}
Menu_.steamName = name;
}
public static void SetServerName(string name)
{
Il2CppHorror.Menu Menu_ = UnityEngine.Object.FindObjectOfType<Il2CppHorror.Menu>();
if (Menu_ == null)
{
return;
}
Menu_.serverNameText.text = name;
}