diff --git a/BepInEx/Bootstrap/Chainloader.cs b/BepInEx/Bootstrap/Chainloader.cs index 1a566d3..159e856 100644 --- a/BepInEx/Bootstrap/Chainloader.cs +++ b/BepInEx/Bootstrap/Chainloader.cs @@ -48,7 +48,13 @@ namespace BepInEx.Bootstrap var prop = AccessTools.PropertyGetter(typeof(Application), "isBatchMode"); if (prop != null) return (bool) prop.Invoke(null, null); - return SystemInfo.graphicsDeviceID == 0; + // Some Unity builds may miss this property, see + // https://docs.unity3d.com/2022.3/Documentation/ScriptReference/SystemInfo-graphicsDeviceID.html + var prop2 = AccessTools.PropertyGetter(typeof(SystemInfo), "graphicsDeviceID"); + if (prop2 != null) + return ((int) prop2.Invoke(null, null)) == 0; + + return false; } }