using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem.Collections.Generic; using Il2CppSystem.IO; using Il2CppTMPro; using MelonLoader; using MelonLoader.Logging; using MelonLoader.Preferences; using Tomlet; using Tomlet.Models; using UIFramework; using UIFramework.Adapters; using UIFramework.Models; using UIFramework.UiExtensions; using UnityEngine; using UnityEngine.CrashReportHandler; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: MelonInfo(typeof(Core), "UIFramework", "0.9.0", "Reverb && Spice", null)] [assembly: MelonGame("Buckethead Entertainment", "RUMBLE")] [assembly: MelonColor(255, 255, 255, 255)] [assembly: MelonAuthorColor(255, 255, 255, 255)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("UIFramework")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+6407ea36d6df5576b13914293560e44d62d6a084")] [assembly: AssemblyProduct("UIFramework")] [assembly: AssemblyTitle("UIFramework")] [assembly: NeutralResourcesLanguage("en-US")] [assembly: AssemblyVersion("1.0.0.0")] namespace UIFramework { public class UIFModel { [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public interface IModelable : UIFramework.Models.IModelable { } [Obsolete] public abstract class SelectableModelBase : UIFramework.Models.SelectableModelBase { [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public void AddSubmodel(params IModelable[] submodel) { base.AddSubmodel(submodel); } } [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public abstract class ModelModItem : ModModelBase { } public class ModelMod : MelonModel { public ModelMod(MelonBase instance, List categories) : base(instance, categories) { } public ModelMod(MelonBase instance) : base(instance) { } } [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public abstract class ModelCategoryItem : CategoryModelBase { [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] protected ModelCategoryItem(ModelModItem parentMod) : base(parentMod) { } } [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public class ModelMelonCategory : MelonCategoryModel { [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public ModelMelonCategory(MelonPreferences_Category cat, ModelModItem parentMod) : base(cat, parentMod) { } } [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public class EmptyCategory : UIFramework.Models.EmptyCategory { [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public EmptyCategory(string identifier, ModelModItem parentMod = null) : base(identifier, parentMod) { } } [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public abstract class ModelEntryItem : EntryModelBase { [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] protected ModelEntryItem(ModelCategoryItem parentCategory) : base(parentCategory) { } } [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public class ButtonEntry : UIFramework.Models.ButtonEntry { [Obsolete("This class is just a shim for backwards compatibility and should not be used directly. Use the new models instead in UIFramework.Models")] public ButtonEntry(Action onClick, string name, string description = "", string displayName = "", ModelCategoryItem parentCategory = null) : base(onClick, name, description, displayName, parentCategory) { } } } public static class BuildInfo { public const string Name = "UIFramework"; public const string Author = "Reverb && Spice"; public const string Version = "0.9.0"; } public class Core : MelonMod { [CompilerGenerated] private sealed class d__26 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Core <>4__this; private GameObject 5__1; private GameObject 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__26(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = GameObject.Find("Game Instance/UI"); 5__2 = ((Component)5__1.transform.Find("Mod_Setting_UI")).gameObject; <>4__this.ModUIWindow = 5__2; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__12 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public bool matchModUI; public Core <>4__this; private bool 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__12(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Prefabs.UIFGameObjects.SetActive(true); if (<>4__this.CurrentScene == "loader") { Debug.Warning("UIFramework does not work in the loader. Please finish calibrating."); return false; } if ((<>4__this.ModUIWindow != null) & matchModUI) { <>2__current = (object)new WaitForSeconds(0.04f); <>1__state = 1; return true; } UI.MainWindow.SetActive(!UI.MainWindow.activeSelf); break; case 1: <>1__state = -1; 5__1 = UI.MainWindow.activeSelf; if (<>4__this.ModUIWindow.activeSelf == <>4__this.lastModUIState) { UI.MainWindow.SetActive(!5__1); } else { UI.MainWindow.SetActive(<>4__this.ModUIWindow.activeSelf); } <>4__this.lastModUIState = <>4__this.ModUIWindow.activeSelf; break; } UI.MainWindow.GetComponent().DragHandle.ClampToBounds(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__13 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Core <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: { <>1__state = -1; Core core = <>4__this; GameObject modUIWindow = <>4__this.ModUIWindow; core.lastModUIState = modUIWindow != null && modUIWindow.activeSelf; return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal static Core Instance; internal string CurrentScene = ""; internal bool isFirstLoad = true; internal GameObject ModUIWindow; internal bool lastModUIState = false; internal Stopwatch displayTime = new Stopwatch(); private static InputActionMap map = new InputActionMap("Tha Map"); private static InputAction rightGrip = InputActionSetupExtensions.AddAction(map, "Right Trigger", (InputActionType)0, (string)null, (string)null, (string)null, (string)null, (string)null); private static InputAction rightPrimary = InputActionSetupExtensions.AddAction(map, "Right Primary", (InputActionType)0, (string)null, (string)null, (string)null, (string)null, (string)null); private static InputAction leftGrip = InputActionSetupExtensions.AddAction(map, "Left Trigger", (InputActionType)0, (string)null, (string)null, (string)null, (string)null, (string)null); private static InputAction leftPrimary = InputActionSetupExtensions.AddAction(map, "Left Primary", (InputActionType)0, (string)null, (string)null, (string)null, (string)null, (string)null); private bool VRButtonsPressed = false; internal int inactiveTimeLimit { get { MelonPreferences_Entry inactivityTimeout = Preferences.InactivityTimeout; return (inactivityTimeout != null) ? (inactivityTimeout.Value * 1000) : 30000; } } public override void OnInitializeMelon() { InputActionSetupExtensions.AddBinding(rightGrip, "{RightHand}/Trigger", (string)null, (string)null, (string)null); InputActionSetupExtensions.AddBinding(rightPrimary, "{RightHand}/primaryButton", (string)null, (string)null, (string)null); InputActionSetupExtensions.AddBinding(leftGrip, "{LeftHand}/Trigger", (string)null, (string)null, (string)null); InputActionSetupExtensions.AddBinding(leftPrimary, "{LeftHand}/primaryButton", (string)null, (string)null, (string)null); map.Enable(); Instance = this; ((MelonEventBase>)(object)MelonPreferences.OnPreferencesSaved).Subscribe((LemonAction)MelPrefsSaved, 0, false); ((MelonBase)this).LoggerInstance.Msg("Initialized."); } public override void OnLateInitializeMelon() { CrashReportHandler.enableCaptureExceptions = false; } public override void OnUpdate() { UiToggleInputCheck(); if (!isFirstLoad) { AutoHideCheck(); } } private void UiToggleInputCheck() { bool keyDown = Input.GetKeyDown((KeyCode)290); bool flag = keyDown; if (flag) { ToggleOptions value = Preferences.ToggleSettings.Value; bool flag2 = ((value == ToggleOptions.Keyboard || value == ToggleOptions.KeyAndVR) ? true : false); flag = flag2; } if (flag) { MelonCoroutines.Start(InputToggled(matchModUI: false)); } else { bool flag3 = VRActivationAction(); bool flag4 = flag3; if (flag4) { ToggleOptions value = Preferences.ToggleSettings.Value; bool flag2 = (uint)(value - 1) <= 1u; flag4 = flag2; } if (flag4) { MelonCoroutines.Start(InputToggled(matchModUI: true)); } } if (Input.GetKeyDown((KeyCode)291)) { MelonCoroutines.Start(SyncModUIState()); } } [IteratorStateMachine(typeof(d__12))] private IEnumerator InputToggled(bool matchModUI) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__12(0) { <>4__this = this, matchModUI = matchModUI }; } [IteratorStateMachine(typeof(d__13))] private IEnumerator SyncModUIState() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__13(0) { <>4__this = this }; } private bool VRActivationAction() { if (isFirstLoad) { return false; } if (!Preferences.VrInputToggle.Value) { return false; } float num = 0.9f; float num2 = 0.1f; float num3 = rightGrip.ReadValue(); float num4 = rightPrimary.ReadValue(); float num5 = leftGrip.ReadValue(); float num6 = rightPrimary.ReadValue(); if (num3 >= num && num4 >= num && num5 >= num && num6 >= num && !VRButtonsPressed) { VRButtonsPressed = true; return true; } if (num3 <= num2 && num4 <= num2 && num5 <= num2 && num6 <= num2 && VRButtonsPressed) { VRButtonsPressed = false; } return false; } private void AutoHideCheck() { if (UI.MainWindow.activeSelf) { MelonPreferences_Entry autoHideOnInactivity = Preferences.AutoHideOnInactivity; if (autoHideOnInactivity != null && autoHideOnInactivity.Value) { if (UserInteracted()) { if (displayTime.IsRunning) { displayTime.Reset(); } } else if (!displayTime.IsRunning) { displayTime.Start(); } if (displayTime.ElapsedMilliseconds < inactiveTimeLimit) { return; } UI.MainWindow.SetActive(false); if (Preferences.HijackModUI.Value) { GameObject modUIWindow = ModUIWindow; if (modUIWindow != null) { modUIWindow.SetActive(false); } } return; } } if (displayTime.IsRunning) { displayTime.Reset(); } } private bool UserInteracted() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (Mouse.current != null) { Vector2 val = ((InputControl)(object)((Pointer)Mouse.current).delta).ReadValue(); if (((Vector2)(ref val)).sqrMagnitude > 0f) { return true; } } if (Keyboard.current != null && ((ButtonControl)Keyboard.current.anyKey).wasPressedThisFrame) { return true; } return false; } public override void OnSceneWasLoaded(int buildIndex, string sceneName) { Debug.Log($"Current buildIndex = {buildIndex} was loaded. sceneName = {sceneName}"); CurrentScene = sceneName.ToNormal(); if (CurrentScene == "loader") { } if (CurrentScene == "gym" && isFirstLoad) { FirstGymLoad(); } if (isFirstLoad) { return; } if (UI.MainWindow.activeSelf) { UI.MainWindow.SetActive(!Preferences.AutoHideOnSceneLoad.Value); if (Preferences.HijackModUI.Value) { GameObject modUIWindow = ModUIWindow; if (modUIWindow != null && modUIWindow.activeSelf) { GameObject modUIWindow2 = ModUIWindow; if (modUIWindow2 != null) { modUIWindow2.SetActive(!Preferences.AutoHideOnSceneLoad.Value); } } } } Preferences.DemoString.Value = CurrentScene; } internal void FirstGymLoad() { BuildUI(); MelonCoroutines.Start(FindModUI()); isFirstLoad = false; } internal void BuildUI() { Preferences.InitializePrefs(); UIFModel.ModelMod modelMod = UI.Register((MelonMod)(object)this, Preferences.CatUIFramework, Preferences.Demo, Preferences.Experimental, Preferences.TestBooleans, Preferences.TestEmptyDisplayName); MelonCategoryModel melonCategoryModel = (MelonCategoryModel)modelMod.GetSubmodel(Preferences.TestBooleans.Identifier); ButtonEntry buttonEntry = new ButtonEntry(CustomClick, "CustomButton", "just a test", "Custom Button"); melonCategoryModel.AddSubmodel(buttonEntry); Prefabs.LoadAssetBundle(); UI.InitializeUIObjects(); UI.MainWindow.SetActive(false); UI.BuildUI(); } [IteratorStateMachine(typeof(d__26))] public IEnumerator FindModUI() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__26(0) { <>4__this = this }; } public void MelPrefsSaved(string s) { } public void CustomClick(ButtonModelAdapter button) { Debug.Log("Clicked: " + button.DisplayName + " ", debugOnly: false); } private void SinglesaveClick() { Debug.Log("Clicked Single Save Button"); } } [AttributeUsage(AttributeTargets.Assembly)] public class UIInfoAttribute : Attribute { public string DisplayName { get; } public UIInfoAttribute(string displayName) { DisplayName = displayName; } } internal static class Debug { private static string lastDiffLogMessage = string.Empty; public static bool debugMode => Preferences.EnableDebugMode?.Value ?? true; internal static void DiffLog(string message, bool debugOnly = true, int logLevel = 0) { if (message != lastDiffLogMessage) { lastDiffLogMessage = message; Log("DIFFLOG: " + message, debugOnly, logLevel); } } internal static void Log(string message, bool debugOnly = true, int logLevel = 0) { if (!(!debugMode && debugOnly)) { switch (logLevel) { case 1: Melon.Logger.Warning(message); break; case 2: Melon.Logger.Error(message); break; default: Melon.Logger.Msg(message); break; } } } internal static void Deb(string message) { Log(message); } internal static void Msg(string message) { Log(message, debugOnly: false); } internal static void Warning(string message) { Log(message, debugOnly: false, 1); } internal static void Error(string message) { Log(message, debugOnly: false, 2); } } public static class UI { internal static RootModel ModelInstance = new RootModel(); internal static GameObject MainWindow; internal static WindowCoordinator WindowInstance; public static bool IsVisible => MainWindow.activeSelf; [Obsolete(".Register() will be a different function in the future to support plugins.\n When that happens, no code changes are needed but you will need to rebuild your project so the compiler can find the correct method\nTo future-proof your mod, Explicitly cast your mod instance to MelonBase when registering")] public static UIFModel.ModelMod Register(MelonMod modInstance, params MelonPreferences_Category[] categories) { return Register((MelonBase)(object)modInstance, categories); } public static UIFModel.ModelMod Register(MelonBase modInstance, params MelonPreferences_Category[] categories) { UIFModel.ModelMod modelMod = new UIFModel.ModelMod(modInstance, categories.ToList()); ModelInstance.AddSubmodel(modelMod); return modelMod; } [Obsolete(".Register() will be a different function in the future to support plugins.\n When that happens, no code changes are needed but you will need to rebuild your project so the compiler can find the correct method\nTo future-proof your mod, Explicitly cast your mod instance to MelonBase when registering")] public static UIFModel.ModelMod Register(MelonMod modInstance) { return Register(modInstance); } public static UIFModel.ModelMod Register(MelonBase modInstance) { UIFModel.ModelMod modelMod = new UIFModel.ModelMod(modInstance); ModelInstance.AddSubmodel(modelMod); return modelMod; } public static MelonModel RegisterMelon(MelonBase melonInstance, params MelonPreferences_Category[] categories) { MelonModel melonModel = new MelonModel(melonInstance, categories.ToList()); ModelInstance.AddSubmodel(melonModel); return melonModel; } internal static void InitializeUIObjects() { MainWindow = Object.Instantiate(Prefabs.MainWindowSource, Prefabs.Canvas.transform); ((Object)MainWindow).name = "MainWindow"; MainWindow.SetActive(true); WindowInstance = MainWindow.GetComponent(); } public static void CreateButtonEntry(MelonPreferences_Category category, string buttonText, string displayName, string description, Action handler) { ButtonAsEntry buttonAsEntry = new ButtonAsEntry { Handler = handler, ButtonText = buttonText, DisplayName = displayName, Description = description }; category.CreateEntry("PlaceHolder" + buttonText + displayName + description, buttonAsEntry, displayName, description, false, true, (ValueValidator)(object)buttonAsEntry); } internal static void BuildUI() { WindowInstance.SetModel(ModelInstance); } internal static void RequestRefresh(ModModelBase modModel) { Debug.Log("RefreshRequested in Framework.cs RequestRefresh(ModModelBase modModel)", debugOnly: true, 1); WindowInstance.RequestRefresh(modModel); } public static void RequestRefresh(MelonBase melonInstance) { Debug.Log("Refresh requested in Framework.cs RequestRefresh(MelonBase melonInstance)", debugOnly: true, 1); ModModelBase modModel = ModelInstance.GetModModel(melonInstance.Info.Name); WindowInstance.RequestRefresh(modModel); } public static GameObject GetPrefab(InputType input) { GameObject val = (GameObject)(input switch { InputType.TextField => Object.Instantiate(Prefabs.TextPrefab), InputType.Toggle => Object.Instantiate(Prefabs.BoolPrefab), InputType.NumericInt => Object.Instantiate(Prefabs.IntPrefab), InputType.NumericFloat => Object.Instantiate(Prefabs.FloatPrefab), InputType.Button => Object.Instantiate(Prefabs.ButtonPrefab), InputType.Dropdown => Object.Instantiate(Prefabs.DropDownPrefab), InputType.Slider => Object.Instantiate(Prefabs.SliderPrefab), _ => Object.Instantiate(Prefabs.TextPrefab), }); val.transform.SetParent(Prefabs.TempStorage.transform); return val; } } public enum InputType { [Display(Name = "Default", Description = "Defaults to basic string input")] Default, [Display(Name = "Text Field", Description = "Basic text field input")] TextField, [Display(Name = "Toggle", Description = "A simple on/off toggle")] Toggle, [Display(Name = "Int input", Description = "An Input for inputing Numeric Integers")] NumericInt, [Display(Name = "Float input", Description = "An Input for inputing Floating Point Numbers")] NumericFloat, [Display(Name = "Button", Description = "A simple button that can be clicked to trigger an action")] Button, [Display(Name = "Dropdown", Description = "A dropdown menu for selecting from multiple options")] Dropdown, [Display(Name = "Slider", Description = "A slider for selecting a value within a range")] Slider } public class UIProperties { public bool IsEnabled { get; set; } public bool IsHidden { get; set; } public bool IsReadOnly { get; set; } public bool IsPasswordField { get; set; } public bool IsRightToLeft { get; set; } public Color DisplayNameColor { get; set; } public Color DescriptionColor { get; set; } public Color EntryBaseColor { get; set; } public Color EntryDataSectionColor { get; set; } public int DisplayNameFontSize { get; set; } public int DescriptionFontSize { get; set; } } internal static class Prefabs { internal static GameObject UIFGameObjects = new GameObject("UI"); internal static GameObject AssetBundleLoaded; internal static GameObject TempStorage = new GameObject("TempStorage"); internal static GameObject HiddenStorage = new GameObject("HiddenStorage"); internal static GameObject Canvas; public static GameObject MainWindowSource; public static GameObject MainWindowDragHandle; internal static GameObject ModDisplayList; internal static GameObject CatDisplayList; internal static GameObject PrefDisplayList; internal static GameObject ModTab; internal static GameObject CatTab; internal static GameObject TextPrefab; internal static GameObject BoolPrefab; internal static GameObject IntPrefab; internal static GameObject FloatPrefab; internal static GameObject DropDownPrefab; internal static GameObject SliderPrefab; internal static GameObject ButtonPrefab; internal static Button MainActionButton; internal static Button DiscardButton; internal static Button MinimizeButton; internal static void LoadAssetBundle() { Debug.Log("LoadingUIFramework AssetBundle"); Object.DontDestroyOnLoad((Object)(object)UIFGameObjects); TempStorage.transform.SetParent(UIFGameObjects.transform, false); TempStorage.SetActive(false); HiddenStorage.transform.SetParent(UIFGameObjects.transform, false); HiddenStorage.SetActive(false); AssetBundleLoaded = Object.Instantiate(Prefabs.LoadAssetFromStream((MelonMod)(object)Core.Instance, "UIFramework.Assets.uiframework", "UIframework"), UIFGameObjects.transform); ((Object)AssetBundleLoaded).name = "UIFrameworkAssets"; Transform? obj = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "UICanvas")); Canvas = ((obj != null) ? ((Component)obj).gameObject : null); Transform? obj2 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "Root")); MainWindowSource = ((obj2 != null) ? ((Component)obj2).gameObject : null); Transform? obj3 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "DragHandle")); MainWindowDragHandle = ((obj3 != null) ? ((Component)obj3).gameObject : null); Transform? obj4 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "ModRegCont")); ModDisplayList = ((obj4 != null) ? ((Component)obj4).gameObject : null); Transform? obj5 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "CatRegCont")); CatDisplayList = ((obj5 != null) ? ((Component)obj5).gameObject : null); Transform? obj6 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "PrefRegCont")); PrefDisplayList = ((obj6 != null) ? ((Component)obj6).gameObject : null); Transform? obj7 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "ModEntry")); ModTab = ((obj7 != null) ? ((Component)obj7).gameObject : null); Transform? obj8 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "CategoryTab")); CatTab = ((obj8 != null) ? ((Component)obj8).gameObject : null); Transform? obj9 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "PrefEntryText")); TextPrefab = ((obj9 != null) ? ((Component)obj9).gameObject : null); Transform? obj10 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "PrefEntryBool")); BoolPrefab = ((obj10 != null) ? ((Component)obj10).gameObject : null); Transform? obj11 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "PrefEntryInt")); IntPrefab = ((obj11 != null) ? ((Component)obj11).gameObject : null); Transform? obj12 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "PrefEntryFloat")); FloatPrefab = ((obj12 != null) ? ((Component)obj12).gameObject : null); Transform? obj13 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "PrefEntryDropdown")); DropDownPrefab = ((obj13 != null) ? ((Component)obj13).gameObject : null); Transform? obj14 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "PrefEntrySlider")); SliderPrefab = ((obj14 != null) ? ((Component)obj14).gameObject : null); Transform? obj15 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "PrefEntryButton")); ButtonPrefab = ((obj15 != null) ? ((Component)obj15).gameObject : null); Transform? obj16 = ((IEnumerable)((Component)AssetBundleLoaded.transform).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform t) => ((Object)t).name == "SaveActionButton")); MainActionButton = ((obj16 != null) ? ((Component)obj16).gameObject.GetComponent