Last active
August 9, 2022 21:55
-
-
Save JohnnyonFlame/fdd79303423392c5911cf44eed9e17cb to your computer and use it in GitHub Desktop.
Console snippet to check which runner version a gamemaker studio game might be exported to using UTMT.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
FieldInfo ver = null; | |
foreach (var t in typeof(UndertaleData).GetFields()) | |
{ | |
if (t.Name.StartsWith("GM") && (t.FieldType == typeof(bool)) && (bool)t.GetValue(Data)) | |
{ | |
ver = t; | |
} | |
} | |
if (ver != null) | |
return $"Likely: {ver.Name}"; | |
return $"No guessed version, maybe GMS{Data.GeneralInfo.Major}.{Data.GeneralInfo.Minor}.{Data.GeneralInfo.Release}.{Data.GeneralInfo.Build}"; |
Author
JohnnyonFlame
commented
Apr 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment