using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.UIElements; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("UltrawideMenuFix")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.1.0.0")] [assembly: AssemblyInformationalVersion("0.1.0")] [assembly: AssemblyProduct("UltrawideMenuFix")] [assembly: AssemblyTitle("UltrawideMenuFix")] [assembly: AssemblyVersion("0.1.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace UltrawideMenuFix { [BepInPlugin("gnomesko.UltrawideMenuFix", "UltrawideMenuFix", "0.1.0")] public class Plugin : BaseUnityPlugin { private void Awake() { SceneManager.sceneLoaded += delegate { FitMenusToHeight(); }; FitMenusToHeight(); } private static void FitMenusToHeight() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Invalid comparison between Unknown and I4 CanvasScaler[] array = Resources.FindObjectsOfTypeAll(); foreach (CanvasScaler val in array) { if ((int)val.uiScaleMode == 1) { val.screenMatchMode = (ScreenMatchMode)0; val.matchWidthOrHeight = 1f; } } PanelSettings[] array2 = Resources.FindObjectsOfTypeAll(); foreach (PanelSettings val2 in array2) { if ((int)val2.scaleMode == 2) { val2.screenMatchMode = (PanelScreenMatchMode)0; val2.match = 1f; } } } } }