using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading.Tasks; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using ExitGames.Client.Photon; using HarmonyLib; using Microsoft.CodeAnalysis; using MoreShopItems.Compatability; using MoreShopItems.Config; using Photon.Pun; using Photon.Realtime; using UnityEngine; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("MoreShopItems")] [assembly: AssemblyDescription("More Shop Items Mod for R.E.P.O.! Developed by Jettcodey.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Jettcodey")] [assembly: AssemblyProduct("MoreShopItems")] [assembly: AssemblyCopyright("Copyright © Jettcodey 2025")] [assembly: ComVisible(false)] [assembly: Guid("06e696a8-2012-4835-8692-3e535b4feaba")] [assembly: AssemblyFileVersion("4.2.2")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("4.2.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.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 MoreShopItems { [BepInPlugin("Jettcodey.MoreShopItems", "More Shop Items", "4.2.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { internal static GameObject? CustomItemShelf; private readonly Harmony _harmony = new Harmony("Jettcodey.MoreShopItems"); internal Dictionary> intConfigEntries = new Dictionary>(); internal Dictionary> boolConfigEntries = new Dictionary>(); internal static Plugin? Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } private void Awake() { Instance = this; ((Component)this).gameObject.AddComponent(); Logger = ((BaseUnityPlugin)this).Logger; LoadConfig(); SceneManager.sceneLoaded += OnFirstScene; AssetBundle bundle = LoadAssetBundle("moreshopitems_assets.file"); CustomItemShelf = LoadAssetFromBundle(bundle, "custom_soda_shelf"); if ((Object)(object)CustomItemShelf == (Object)null) { Logger.LogError((object)"Failed to load CustomItemShelf from asset bundle."); return; } _harmony.PatchAll(typeof(ShopManagerPatch)); _harmony.PatchAll(typeof(StatsManagerPatch)); _harmony.PatchAll(typeof(PunManagerPatch)); _harmony.PatchAll(typeof(PlayerControllerPatch)); Logger.LogInfo((object)"Plugin More Shop Items v4.2.2 loaded successfully."); } private void OnFirstScene(Scene scene, LoadSceneMode mode) { ShelfEventListener.Ensure(); SceneManager.sceneLoaded -= OnFirstScene; } private AssetBundle LoadAssetBundle(string filename) { Plugin? instance = Instance; string path = Path.GetDirectoryName((instance != null) ? ((BaseUnityPlugin)instance).Info.Location : null) ?? ""; string text = Path.Combine(path, filename); if (!File.Exists(text)) { Logger.LogError((object)("Asset bundle not found at " + text)); return null; } AssetBundle val = AssetBundle.LoadFromFile(text); if ((Object)(object)val == (Object)null) { Logger.LogError((object)("Failed to load asset bundle from " + text)); } return val; } private GameObject LoadAssetFromBundle(AssetBundle bundle, string assetName) { if ((Object)(object)bundle == (Object)null) { return null; } GameObject val = bundle.LoadAsset(assetName); if ((Object)(object)val == (Object)null) { Logger.LogError((object)("Asset '" + assetName + "' not found in bundle.")); } return val; } private void LoadConfig() { string[] configDescriptions = ConfigEntries.GetConfigDescriptions(); intConfigEntries.Add("Max Upgrades In Shop", ConfigHelper.CreateConfig("Upgrades", "Max Upgrades In Shop", 5, configDescriptions[0], -1, 50)); intConfigEntries.Add("Max Upgrade Purchase Amount", ConfigHelper.CreateConfig("Upgrades", "Max Upgrade Purchase Amount", 0, configDescriptions[1], 0, 70)); intConfigEntries.Add("Max Melee Weapons In Shop", ConfigHelper.CreateConfig("Weapons", "Max Melee Weapons In Shop", 5, configDescriptions[2], -1, 25)); intConfigEntries.Add("Max Melee Weapon Purchase Amount", ConfigHelper.CreateConfig("Weapons", "Max Melee Weapon Purchase Amount", 0, configDescriptions[3], 0, 20)); intConfigEntries.Add("Max Guns In Shop", ConfigHelper.CreateConfig("Weapons", "Max Guns In Shop", 5, configDescriptions[4], -1, 20)); intConfigEntries.Add("Max Gun Purchase Amount", ConfigHelper.CreateConfig("Weapons", "Max Gun Purchase Amount", 0, configDescriptions[5], 0, 20)); intConfigEntries.Add("Max Grenades In Shop", ConfigHelper.CreateConfig("Weapons", "Max Grenades In Shop", 5, configDescriptions[6], -1, 20)); intConfigEntries.Add("Max Grenade Purchase Amount", ConfigHelper.CreateConfig("Weapons", "Max Grenade Purchase Amount", 0, configDescriptions[7], 0, 20)); intConfigEntries.Add("Max Mines In Shop", ConfigHelper.CreateConfig("Weapons", "Max Mines In Shop", 5, configDescriptions[8], -1, 20)); intConfigEntries.Add("Max Mine Purchase Amount", ConfigHelper.CreateConfig("Weapons", "Max Mine Purchase Amount", 0, configDescriptions[9], 0, 20)); intConfigEntries.Add("Max Health-Packs In Shop", ConfigHelper.CreateConfig("Health-Packs", "Max Health-Packs In Shop", 15, configDescriptions[10], -1, 40)); intConfigEntries.Add("Max Health-Pack Purchase Amount", ConfigHelper.CreateConfig("Health-Packs", "Max Health-Pack Purchase Amount", 0, configDescriptions[11], 0, 20)); intConfigEntries.Add("Max Drones In Shop", ConfigHelper.CreateConfig("Utilities", "Max Drones In Shop", 5, configDescriptions[12], -1, 20)); intConfigEntries.Add("Max Drone Purchase Amount", ConfigHelper.CreateConfig("Utilities", "Max Drone Purchase Amount", 0, configDescriptions[13], 0, 20)); intConfigEntries.Add("Max Orbs In Shop", ConfigHelper.CreateConfig("Utilities", "Max Orbs In Shop", 5, configDescriptions[14], -1, 20)); intConfigEntries.Add("Max Orb Purchase Amount", ConfigHelper.CreateConfig("Utilities", "Max Orb Purchase Amount", 0, configDescriptions[15], 0, 20)); intConfigEntries.Add("Max Crystals In Shop", ConfigHelper.CreateConfig("Utilities", "Max Crystals In Shop", 10, configDescriptions[16], -1, 20)); intConfigEntries.Add("Max Crystal Purchase Amount", ConfigHelper.CreateConfig("Utilities", "Max Crystal Purchase Amount", 0, configDescriptions[17], 0, 20)); intConfigEntries.Add("Max Trackers In Shop", ConfigHelper.CreateConfig("Utilities", "Max Trackers In Shop", 5, configDescriptions[18], -1, 20)); intConfigEntries.Add("Max Tracker Purchase Amount", ConfigHelper.CreateConfig("Utilities", "Max Tracker Purchase Amount", 0, configDescriptions[19], 0, 20)); intConfigEntries.Add("Max Carts In Shop", ConfigHelper.CreateConfig("Carts", "Max Carts In Shop", 2, configDescriptions[24], -1, 4)); intConfigEntries.Add("Max Cart Purchase Amount", ConfigHelper.CreateConfig("Carts", "Max Cart Purchase Amount", 0, configDescriptions[25], 0, 20)); intConfigEntries.Add("Max Pocket Carts In Shop", ConfigHelper.CreateConfig("Carts", "Max Pocket Carts In Shop", 2, configDescriptions[26], -1, 4)); intConfigEntries.Add("Max Pocket Cart Purchase Amount", ConfigHelper.CreateConfig("Carts", "Max Pocket Cart Purchase Amount", 0, configDescriptions[27], 0, 20)); intConfigEntries.Add("Max Tools In Shop", ConfigHelper.CreateConfig("Tools", "Max Tools In Shop", 2, configDescriptions[28], -1, 20)); intConfigEntries.Add("Max Tool Purchase Amount", ConfigHelper.CreateConfig("Tools", "Max Tool Purchase Amount", 0, configDescriptions[29], 0, 20)); intConfigEntries.Add("Max Additional Shelves In Shop", ConfigHelper.CreateConfig("General", "Max Additional Shelves In Shop", 2, configDescriptions[23], 0, 2)); intConfigEntries.Add("Max Launchers in Shop", ConfigHelper.CreateConfig("Launchers", "Max Launchers In Shop", 5, configDescriptions[31], -1, 20)); intConfigEntries.Add("Max Launcher Purchase Amount", ConfigHelper.CreateConfig("Launchers", "Max Launcher Purchase Amount", 0, configDescriptions[32], 0, 20)); intConfigEntries.Add("Max Vehicles in Shop", ConfigHelper.CreateConfig("Vehicles", "Max Vehicles In Shop", 2, configDescriptions[33], -1, 5)); intConfigEntries.Add("Max Vehicle Purchase Amount", ConfigHelper.CreateConfig("Vehicles", "Max Vehicle Purchase Amount", 0, configDescriptions[34], 0, 20)); boolConfigEntries.Add("Override Modded Items", ConfigHelper.CreateConfig("General", "Override Modded Items", value: true, configDescriptions[20], -1, -1)); boolConfigEntries.Add("Override Single-Use Upgrades", ConfigHelper.CreateConfig("General", "Override Single-Use Upgrades", value: false, configDescriptions[21], -1, -1)); boolConfigEntries.Add("Spawn Additional Shelving", ConfigHelper.CreateConfig("General", "Spawn Additional Shelving", value: true, configDescriptions[22], -1, -1)); boolConfigEntries.Add("Item Spawn Logs", ConfigHelper.CreateConfig("Dev General", "Item Spawn Logs", value: false, configDescriptions[30], -1, -1)); } } public class MoreShopItemsSplash : MonoBehaviour { public static bool LockSplash = false; private Harmony _harmony; private static readonly string[] IncompatibleGuids = new string[11] { "Traktool.SharedUpgrades", "Empress.SharedUpgradesCompat", "Omniscye.SharedUpgradesHelper", "Janson.BaddiesTeamUpgrades", "EvilCheetah.REPO.TeamBoosters", "Rosay.EchoholdAPI", "Rosay.PlasmaGunAPI", "empress.repo.echoholdcompatpatch", "Empress.Plasma_Rifle.WeaponCompatPatch", "DarkSpider90.MoreStandsForShops", "agentf.GlasVitrineRegal" }; private bool hasConflict; private bool overlayActive; private GameObject overlay; private float savedTimeScale = 1f; private bool wasCursorVisible; private CursorLockMode savedLockMode = (CursorLockMode)1; private void Awake() { Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); } private void Start() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown hasConflict = IncompatibleGuids.Any((string guid) => Chainloader.PluginInfos.ContainsKey(guid)); if (!hasConflict) { Object.Destroy((Object)(object)this); return; } Plugin.Logger.LogInfo((object)("Incompatible plugin(s) detected: " + string.Join(", ", IncompatibleGuids.Where((string guid) => Chainloader.PluginInfos.ContainsKey(guid))) + ".")); _harmony = new Harmony("MoreShopItems.SplashBlock"); _harmony.PatchAll(typeof(SplashScreen)); LockSplash = true; } private void Update() { if (!hasConflict || overlayActive) { return; } try { SplashScreenUI instance = SplashScreenUI.instance; if ((Object)(object)instance != (Object)null && (Object)(object)instance.warningTransform != (Object)null && ((Component)instance.warningTransform).gameObject.activeInHierarchy) { ShowOverlay(); } } catch (Exception ex) { Plugin.Logger.LogError((object)("MoreShopItemsSplash Update error: " + ex)); Object.Destroy((Object)(object)this); } } private void ShowOverlay() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Expected O, but got Unknown //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Expected O, but got Unknown LockSplash = true; overlayActive = true; savedTimeScale = Time.timeScale; wasCursorVisible = Cursor.visible; savedLockMode = Cursor.lockState; Time.timeScale = 0f; Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; overlay = new GameObject("MoreShopItems_IncompatibilityOverlay", new Type[1] { typeof(RectTransform) }); Object.DontDestroyOnLoad((Object)(object)overlay); Canvas val = overlay.AddComponent(); val.renderMode = (RenderMode)0; val.sortingOrder = 10000; CanvasScaler val2 = overlay.AddComponent(); val2.uiScaleMode = (ScaleMode)1; val2.referenceResolution = new Vector2(1920f, 1080f); val2.matchWidthOrHeight = 0.5f; overlay.AddComponent(); GameObject val3 = NewRect("Background", overlay.transform); ((Graphic)val3.AddComponent()).color = new Color(0f, 0f, 0f, 0.85f); RectTransform component = val3.GetComponent(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; component.offsetMin = Vector2.zero; component.offsetMax = Vector2.zero; GameObject val4 = NewRect("Panel", overlay.transform); ((Graphic)val4.AddComponent()).color = new Color(0.51f, 0.1f, 0.1f, 0.95f); RectTransform component2 = val4.GetComponent(); component2.anchorMin = new Vector2(0.1f, 0.1f); component2.anchorMax = new Vector2(0.9f, 0.85f); component2.pivot = new Vector2(0.5f, 0.5f); component2.anchoredPosition = Vector2.zero; component2.sizeDelta = Vector2.zero; ((Transform)component2).localScale = Vector3.one; GameObject val5 = NewLabel("Title", 38, (FontStyle)1, val4.transform); RectTransform component3 = val5.GetComponent(); component3.anchorMin = new Vector2(0.05f, 0.86f); component3.anchorMax = new Vector2(0.95f, 0.97f); component3.offsetMin = Vector2.zero; component3.offsetMax = Vector2.zero; Text component4 = val5.GetComponent(); component4.alignment = (TextAnchor)4; component4.text = "MoreShopItems Mod Conflict Detected!\nPLEASE READ CAREFULLY"; GameObject val6 = NewLabel("Message", 28, (FontStyle)0, val4.transform); RectTransform component5 = val6.GetComponent(); component5.anchorMin = new Vector2(0.05f, 0.38f); component5.anchorMax = new Vector2(0.95f, 0.86f); component5.offsetMin = Vector2.zero; component5.offsetMax = Vector2.zero; Text component6 = val6.GetComponent(); component6.alignment = (TextAnchor)1; component6.horizontalOverflow = (HorizontalWrapMode)0; component6.verticalOverflow = (VerticalWrapMode)1; component6.text = "Detected installed mod(s): " + string.Join(", ", IncompatibleGuids.Where((string guid) => Chainloader.PluginInfos.ContainsKey(guid))) + "\n\nUsing these mods together with MoreShopItems CAN and WILL cause serious issues, including:\n- Getting stuck on the loading screen\n- Player upgrades not applying correctly or disappearing\n- Unpredictable Game behavior and Game instability\n- Corrupted Save files and Game crashes\n\nYou MUST disable / uninstall the listed mods above to use MoreShopItems without issues!\nRecommended Shared Upgrades mods to use with MoreShopItems instead:\n- BetterTeamUpgrades by MrByteSized\n- SharedUpgradesPlus by Vippy\n\nChoose how you want to proceed:"; GameObject val7 = NewRect("Buttons", val4.transform); RectTransform component7 = val7.GetComponent(); component7.anchorMin = new Vector2(0.05f, 0.08f); component7.anchorMax = new Vector2(0.95f, 0.26f); component7.offsetMin = Vector2.zero; component7.offsetMax = Vector2.zero; ((Transform)component7).localScale = Vector3.one; Button val8 = NewButton("DisableMoreShopItems", val7.transform); Button val9 = NewButton("QuitGame", val7.transform); RectTransform component8 = ((Component)val8).GetComponent(); RectTransform component9 = ((Component)val9).GetComponent(); component8.anchorMin = new Vector2(0.02f, 0.1f); component8.anchorMax = new Vector2(0.32f, 0.9f); component8.offsetMin = Vector2.zero; component8.offsetMax = Vector2.zero; component9.anchorMin = new Vector2(0.68f, 0.1f); component9.anchorMax = new Vector2(0.98f, 0.9f); component9.offsetMin = Vector2.zero; component9.offsetMax = Vector2.zero; ((Component)val8).GetComponentInChildren().text = "Disable MoreShopItems"; ((Component)val9).GetComponentInChildren().text = "Quit Game"; ((UnityEvent)val8.onClick).AddListener((UnityAction)delegate { Plugin.Logger.LogWarning((object)"User chose to disable MoreShopItems due to incompatibility."); DisablePlugin(); CloseOverlay(); }); ((UnityEvent)val9.onClick).AddListener((UnityAction)delegate { Plugin.Logger.LogWarning((object)"User chose to quit because of incompatibility."); CloseOverlay(); Application.Quit(); }); } private void DisablePlugin() { try { Harmony.UnpatchID("MoreShopItems"); } catch (Exception ex) { Plugin.Logger.LogError((object)("Error while unpatching Harmony patches: " + ex)); } try { if ((Object)(object)Plugin.Instance != (Object)null) { Object.Destroy((Object)(object)Plugin.Instance); Plugin.Logger.LogInfo((object)"Plugin component destroyed."); } else { Plugin.Logger.LogWarning((object)"Plugin instance was null when attempting to disable."); } } catch (Exception ex2) { Plugin.Logger.LogError((object)("Error while destroying plugin instance: " + ex2)); } } private void CloseOverlay() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) LockSplash = false; if ((Object)(object)overlay != (Object)null) { Object.Destroy((Object)(object)overlay); overlay = null; } Time.timeScale = savedTimeScale; Cursor.visible = wasCursorVisible; Cursor.lockState = savedLockMode; Object.Destroy((Object)(object)this); } private GameObject NewRect(string name, Transform parent) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name, new Type[1] { typeof(RectTransform) }); val.transform.SetParent(parent, false); ((Transform)val.GetComponent()).localScale = Vector3.one; return val; } private GameObject NewLabel(string name, int fontSize, FontStyle style, Transform parent) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) GameObject val = NewRect(name, parent); Text val2 = val.AddComponent(); val2.font = Resources.GetBuiltinResource("Arial.ttf"); val2.fontSize = fontSize; val2.fontStyle = style; ((Graphic)val2).color = Color.white; val2.alignment = (TextAnchor)4; val.GetComponent().sizeDelta = new Vector2(600f, 40f); return val; } private Button NewButton(string name, Transform parent) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) GameObject val = NewRect(name, parent); ((Graphic)val.AddComponent()).color = new Color(0.22f, 0.22f, 0.22f, 0.95f); Button val2 = val.AddComponent