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.Versioning; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using JoelG.ENA4.UI; using LMirman.Utilities.UI; using Rewired; using TMPro; using TurronishMod.Logger; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.Video; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("0.0.0.0")] namespace ControlDoblaje; [BepInPlugin("com.turronish.ui", "Turronish UI", "1.1.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class TurronishUIPlugin : BaseUnityPlugin { private static void PatchAllSafe(Harmony harmony) { int num = 0; int num2 = 0; Type[] types = Assembly.GetExecutingAssembly().GetTypes(); foreach (Type type in types) { if (type.GetCustomAttributes(typeof(HarmonyPatch), inherit: false).Length != 0) { try { harmony.CreateClassProcessor(type).Patch(); num++; } catch (Exception ex) { ControlDoblajePlugin.Log.LogWarning((object)("[UI] Patch SKIPPED '" + type.Name + "': " + ex.GetType().Name + " — " + ex.Message)); num2++; } } } ControlDoblajePlugin.Log.LogInfo((object)$"[UI] PatchAllSafe: {num} ok, {num2} omitidos"); } private void Awake() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown ControlDoblajePlugin.UIResetarEstado = TurronishExtrasHelper.ResetarEstado; ControlDoblajePlugin.UIExtrasTurronishReset = ExtrasTurronishGestor.Resetar; ControlDoblajePlugin.UIExtrasTurronishInyectar = ExtrasTurronishGestor.InyectarDespues; ControlDoblajePlugin.UIAttachLogoMonitor = TurronishLogoVisibilityMonitor.AttachTo; ControlDoblajePlugin.UITryInstalarPatch = GamePauseManagerPatch.TryInstalar; ControlDoblajePlugin.UIMostrarAvisoActualizacion = AvisoActualizacion.Mostrar; Harmony harmony = new Harmony("com.turronish.ui"); PatchAllSafe(harmony); ControladorNavegacion.Crear(); TurronishDiagLogger.Info("[UI]", "TurronishUI cargado OK."); ((BaseUnityPlugin)this).Logger.LogInfo((object)"[UI] TurronishUI cargado."); } } public static class AvisoActualizacion { public static Canvas CanvasHint; public static void Mostrar(string instalada, string disponible, string url, string changelog) { //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Expected O, but got Unknown //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) try { GameObject val = Resources.Load("UI/Confirmation Window"); if ((Object)(object)val == (Object)null) { ControlDoblajePlugin.Log.LogWarning((object)"[Actualiz] prefab 'UI/Confirmation Window' no encontrado."); return; } string discord = (string.IsNullOrEmpty(url) ? "https://discord.gg/nhUEmxqTyv" : url); string text = LabelsUI.Txt("VERSIÓN DESACTUALIZADA", "OUTDATED VERSION"); string text2 = LabelsUI.Txt("¡Una nueva versión del mod está disponible!", "A new version of the mod is available!"); string text3 = LabelsUI.Txt("Versión instalada:", "Installed version:"); string text4 = LabelsUI.Txt("Versión disponible:", "Available version:"); string text5 = LabelsUI.Txt("Actualiza el mod dentro de nuestro servidor de Discord.", "Update the mod inside our Discord server."); string text6 = DividirEnDos(LabelsUI.Txt("Continuar de todas formas", "Continue anyway")); string text7 = LabelsUI.Txt("Ir al Discord", "Go to Discord"); Color32 arriba = default(Color32); ((Color32)(ref arriba))..ctor((byte)191, (byte)219, byte.MaxValue, byte.MaxValue); Color32 abajo = default(Color32); ((Color32)(ref abajo))..ctor(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); string text8 = "" + text2 + "\n\n" + text3 + " V" + instalada + "\n" + text4 + " "; string text9 = "\n" + text5 + ""; string text10 = "V" + disponible; string text11 = text8 + "" + text10 + "" + text9; string text12 = text8 + "" + text10 + "" + text9; Action action = delegate { }; Action action2 = delegate { try { Application.OpenURL(discord); } catch { } }; Canvas val2 = (((Object)(object)CanvasHint != (Object)null) ? CanvasHint : Object.FindObjectOfType()); Request val3 = new Request(action, action2, text, text11, text6, text7); UIFunctions.CreateConfirmationWindow(val3, val, val2); try { ConfirmationWindow mostRecentConfirmation = UIFunctions.MostRecentConfirmation; TMP_Text val4 = null; if ((Object)(object)mostRecentConfirmation != (Object)null) { TMP_Text[] componentsInChildren = ((Component)mostRecentConfirmation).GetComponentsInChildren(true); foreach (TMP_Text val5 in componentsInChildren) { if ((Object)(object)val5 != (Object)null && val5.text == text11) { val4 = val5; break; } } } if ((Object)(object)val4 != (Object)null && ConstruirNumeroDividido(val4, text10, arriba, abajo)) { val4.text = text12; } } catch (Exception ex) { ControlDoblajePlugin.Log.LogWarning((object)("[Actualiz] split: " + ex.Message)); } ControlDoblajePlugin.Log.LogInfo((object)("[Actualiz] Aviso nativo mostrado (V" + instalada + " < V" + disponible + ").")); } catch (Exception ex2) { ControlDoblajePlugin.Log.LogWarning((object)("[Actualiz] no se pudo mostrar el aviso nativo: " + ex2.Message)); } } private static string DividirEnDos(string s) { if (string.IsNullOrEmpty(s) || s.IndexOf(' ') < 0) { return s; } int num = s.Length / 2; int num2 = -1; int num3 = int.MaxValue; for (int i = 0; i < s.Length; i++) { if (s[i] == ' ') { int num4 = Math.Abs(i - num); if (num4 < num3) { num3 = num4; num2 = i; } } } return (num2 < 0) ? s : (s.Substring(0, num2) + "\n" + s.Substring(num2 + 1)); } private static bool ConstruirNumeroDividido(TMP_Text descTMP, string numero, Color32 arriba, Color32 abajo) { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: 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_01e0: Unknown result type (might be due to invalid IL or missing references) descTMP.ForceMeshUpdate(false, false); TMP_TextInfo textInfo = descTMP.textInfo; if (textInfo == null || textInfo.characterCount == 0) { return false; } StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < textInfo.characterCount; i++) { stringBuilder.Append(textInfo.characterInfo[i].character); } int num = stringBuilder.ToString().LastIndexOf(numero, StringComparison.Ordinal); if (num < 0) { return false; } int num2 = num; int num3 = num + numero.Length - 1; if (num3 >= textInfo.characterCount) { return false; } TMP_CharacterInfo val = textInfo.characterInfo[num2]; TMP_CharacterInfo val2 = textInfo.characterInfo[num3]; float x = val.bottomLeft.x; float x2 = val2.topRight.x; float ascender = val.ascender; float descender = val.descender; Vector3 localPosition = default(Vector3); ((Vector3)(ref localPosition))..ctor((x + x2) * 0.5f, (ascender + descender) * 0.5f, 0f); Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(x2 - x, ascender - descender); TMP_FontAsset font = descTMP.font; float fontSize = descTMP.fontSize; GameObject val4 = new GameObject("VerDispSplit"); val4.transform.SetParent(descTMP.transform, false); RectTransform val5 = val4.AddComponent(); Vector2 val6 = default(Vector2); ((Vector2)(ref val6))..ctor(0.5f, 0.5f); val5.anchorMax = val6; val5.anchorMin = val6; val5.pivot = new Vector2(0.5f, 0.5f); val5.sizeDelta = val3; val4.transform.localPosition = localPosition; MitadNumero(val4.transform, numero, font, fontSize, arriba, val3, esArriba: true); MitadNumero(val4.transform, numero, font, fontSize, abajo, val3, esArriba: false); return true; } private static void MitadNumero(Transform padre, string numero, TMP_FontAsset font, float fs, Color32 col, Vector2 tamCont, bool esArriba) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(esArriba ? "MitadArriba" : "MitadAbajo"); val.transform.SetParent(padre, false); RectTransform val2 = val.AddComponent(); if (esArriba) { val2.anchorMin = new Vector2(0f, 0.5f); val2.anchorMax = new Vector2(1f, 1f); } else { val2.anchorMin = new Vector2(0f, 0f); val2.anchorMax = new Vector2(1f, 0.5f); } Vector2 val3 = (val2.offsetMin = (val2.offsetMax = Vector2.zero)); val.AddComponent(); GameObject val5 = new GameObject("T"); val5.transform.SetParent(val.transform, false); RectTransform val6 = val5.AddComponent(); ((Vector2)(ref val3))..ctor(0.5f, esArriba ? 0f : 1f); val6.anchorMax = val3; val6.anchorMin = val3; val6.pivot = new Vector2(0.5f, 0.5f); val6.sizeDelta = tamCont; val6.anchoredPosition = Vector2.zero; TextMeshProUGUI val7 = val5.AddComponent(); ((TMP_Text)val7).SetText(numero); ((Graphic)val7).color = Color32.op_Implicit(col); ((TMP_Text)val7).fontSize = fs; if ((Object)(object)font != (Object)null) { ((TMP_Text)val7).font = font; } ((TMP_Text)val7).alignment = (TextAlignmentOptions)514; ((TMP_Text)val7).textWrappingMode = (TextWrappingModes)0; ((Graphic)val7).raycastTarget = false; } } public static class DoblajeTabHelper { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Predicate <>9__51_0; public static Func <>9__51_2; public static Func <>9__79_4; public static UnityAction <>9__79_6; public static UnityAction <>9__79_7; public static Func <>9__81_11; public static Func <>9__81_22; public static Func <>9__81_23; public static Action <>9__81_24; public static Action <>9__81_25; public static Action <>9__81_26; public static Action <>9__81_27; public static Action <>9__81_29; public static Action <>9__81_32; public static Action <>9__81_34; public static Func <>9__81_38; public static Func <>9__81_39; public static Action <>9__81_40; public static Action <>9__81_43; public static Action <>9__81_46; public static Action <>9__81_49; public static UnityAction <>9__81_52; public static Func <>9__81_53; public static Func <>9__81_54; public static Action <>9__84_1; public static Func <>9__84_5; public static Action <>9__85_2; internal bool b__51_0(string op) { return op.Contains("Personaliz") || op.Contains("Custom"); } internal string b__51_2() { return ""; } internal bool b__79_4(Transform t) { return ((Object)t).name == "Setting Details Text" && (Object)(object)((Component)t).GetComponent() == (Object)null; } internal void b__79_6() { try { ControlDoblajePlugin.GuardarConfig(); } catch (Exception ex) { ManualLogSource log = ControlDoblajePlugin.Log; if (log != null) { log.LogWarning((object)("[Pref] Save hook: " + ex.Message)); } } } internal void b__79_7() { try { typeof(ControlDoblajePlugin).GetMethod("CargarConfig", BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic)?.Invoke(ControlDoblajePlugin.Instance, null); if ((Object)(object)_configParent != (Object)null) { ConfigRebuildHelper.Schedule(_configParent, _configIsPausa); } } catch (Exception ex) { ManualLogSource log = ControlDoblajePlugin.Log; if (log != null) { log.LogWarning((object)("[Pref] Discard hook: " + ex.Message)); } } } internal bool b__81_11(string p) { bool value; return ControlDoblajePlugin.PersonajeActivo.TryGetValue(p, out value) && value; } internal bool b__81_22(string p) { bool value; return ControlDoblajePlugin.PersonajeActivo.TryGetValue(p, out value) && value; } internal bool b__81_23(string p) { bool value; return ControlDoblajePlugin.PersonajeActivo.TryGetValue(p, out value) && !value; } internal void b__81_24(int idx) { bool textoEspanolActivo = Traducciones.TextoEspanolActivo; if (idx == 0 && !textoEspanolActivo) { Traducciones.ActivarYAplicar(); } else if (idx != 0 && textoEspanolActivo) { Traducciones.DesactivarYRevertir(); } ControlDoblajePlugin.GuardarConfig(); _actualizarIdiomaLabel?.Invoke(); } internal void b__81_25(int idx) { ControlDoblajePlugin.VideoClipsActivo = idx == 0; ControlDoblajePlugin.GuardarConfig(); _actualizarIdiomaLabel?.Invoke(); } internal void b__81_26(int idx) { ControlDoblajePlugin.ImagenesActivas = idx == 0; SpriteReemplazador.ReScanearTodosLosSprites(); ControlDoblajePlugin.GuardarConfig(); _actualizarIdiomaLabel?.Invoke(); } internal void b__81_27(int idx) { bool flag = (ControlDoblajePlugin.ModelosActivos = idx == 0); ControlDoblajePlugin.GuardarConfig(); _actualizarIdiomaLabel?.Invoke(); if (flag) { ControlDoblajePlugin.ModelosAplicar?.Invoke(); } else { ControlDoblajePlugin.ModelosRestaurar?.Invoke(); } } internal void b__81_29() { _secSolitariaAbierta = !_secSolitariaAbierta; ChapterAnimHelper.ToggleSol(); } internal void b__81_32() { _secMultitudAbierta = !_secMultitudAbierta; ChapterAnimHelper.ToggleMul(); } internal void b__81_34() { _secCaballoAbierta = !_secCaballoAbierta; ChapterAnimHelper.ToggleCab(); } internal string b__81_38() { return UI("Mixear Voces", "Mix Voices"); } internal string b__81_39() { return UI("Elige aleatoriamente el idioma de audio de cada personaje. Para una nueva experiencia.", "Randomly picks audio language for each character. For a new experience."); } internal void b__81_40(int idx) { ControlDoblajePlugin.VarianteENA = idx; ControlDoblajePlugin.GuardarConfig(); VarianteENAPatcher.ReevalAll(); } internal void b__81_43(int idx) { ControlDoblajePlugin.VarianteTaxi = idx; ControlDoblajePlugin.GuardarConfig(); VarianteTaxiPatcher.ReevalAll(); } internal void b__81_46(int idx) { ControlDoblajePlugin.VarianteYowadama = idx; ControlDoblajePlugin.GuardarConfig(); } internal void b__81_49(int idx) { ControlDoblajePlugin.LogoBtnActivo = idx == 0; ControlDoblajePlugin.GuardarConfig(); } internal void b__81_52() { ControlDoblajePlugin.Log.LogInfo((object)"[Discord] Click!"); Application.OpenURL("https://discord.gg/nhUEmxqTyv"); } internal string b__81_53() { return UI("Discord", "Discord"); } internal string b__81_54() { return UI("Abre el servidor de Discord en tu navegador.", "Opens the Discord server in your browser."); } internal void b__84_1(int _) { } internal string b__84_5(Preset p) { return p.Nombre; } internal void b__85_2(int idx) { } } private static readonly HashSet parcheadas = new HashSet(); private static readonly Color cBlanco = new Color(0.95f, 0.95f, 0.95f, 1f); private static readonly Color cGris = new Color(0.55f, 0.55f, 0.55f, 1f); private static readonly Color cSep = new Color(0.35f, 0.35f, 0.35f, 1f); private static readonly Color cPopupBg = new Color(0.09f, 0.09f, 0.09f, 1f); private static readonly Color cInputBg = new Color(0.12f, 0.12f, 0.12f, 1f); private static readonly Color cBotonBg = new Color(0.14f, 0.14f, 0.14f, 1f); internal const ulong DBG_TINTES = 4786316469352887808uL; internal static readonly Color32 cDbgCaja = new Color32((byte)66, (byte)108, (byte)105, (byte)120); internal static readonly Color32 cDbgBorde = new Color32((byte)74, (byte)97, (byte)118, byte.MaxValue); private static Action _actualizarIdiomaLabel = null; internal static bool _secSolitariaAbierta = true; internal static bool _secMultitudAbierta = false; internal static bool _secCaballoAbierta = false; private static Transform _configParent = null; private static bool _configIsPausa = false; private static readonly Dictionary _charLang = new Dictionary(StringComparer.OrdinalIgnoreCase) { { "Froggy", ("Japonés", "Japanese") }, { "Recepcionista", ("Francés", "French") }, { "Receptionist", ("Francés", "French") }, { "Dahlia", ("Francés", "French") }, { "CoralGlasses", ("Coreano", "Korean") }, { "Kane", ("Ruso", "Russian") }, { "HoarderAlex", ("Italiano", "Italian") }, { "Taxista", ("Original", "Original") }, { "TaxiDriver", ("Original", "Original") }, { "TaxiDrivers", ("Original", "Original") }, { "Theodora", ("Griego", "Greek") }, { "TheodoraBroken", ("Griego", "Greek") }, { "Shoryo", ("Japonés", "Japanese") } }; internal static RectTransform _solClipRT; internal static RectTransform _mulClipRT; internal static RectTransform _cabClipRT; internal static float _solGridH; internal static float _mulGridH; internal static float _cabGridH; internal static readonly List _belowSolRTs = new List(); internal static readonly List _belowMulRTs = new List(); internal static readonly List _belowCabRTs = new List(); internal static RectTransform _mainContentRT; internal static Transform _solArrowT; internal static Transform _mulArrowT; internal static Transform _cabArrowT; private static readonly Color cBotonHov = new Color(0.26f, 0.26f, 0.26f, 1f); private static readonly Color cBotonPres = new Color(0.04f, 0.04f, 0.04f, 1f); private static readonly Color cPresetNorm = new Color(0.08f, 0.08f, 0.08f, 1f); private static readonly Color cPresetHov = new Color(0.18f, 0.18f, 0.18f, 1f); private static readonly Color cPresetPres = new Color(0.04f, 0.04f, 0.04f, 1f); private static readonly Color cDropHov = new Color(1f, 1f, 1f, 0.06f); private static readonly Color cDropPres = new Color(0f, 0f, 0f, 0.15f); private static readonly Dictionary _ddNativoPorCaption = new Dictionary(); private static TMP_FontAsset _fuente; private static Sprite _spriteDD; private static GameObject _botonNativoTemplate; private static GameObject _ddNativoTemplate; private static TMP_Text _descTitulo; private static TMP_Text _descCuerpo; private static GameObject _descCanvasGO; private static GameObject _descMask; private static GameObject _panelDescNativo; private static GameObject _panelDescNativo_Pausa; private static TMP_Text _sdtNativo; private static TMP_Text _sdtNativo_Pausa; private static Tab _nuestroTab; private static TabGroup _nuestroTabGroup; private static GameObject _descCanvasGO_Pausa; private static GameObject _descMask_Pausa; private static TMP_Text _descTitulo_Pausa; private static TMP_Text _descCuerpo_Pausa; private static Tab _nuestroTab_Pausa; private static TMP_FontAsset Fuente { get { if ((Object)(object)_fuente != (Object)null) { return _fuente; } TMP_FontAsset[] array = Resources.FindObjectsOfTypeAll(); foreach (TMP_FontAsset val in array) { string name = ((Object)val).name; if (name.IndexOf("RuneScape", StringComparison.OrdinalIgnoreCase) >= 0 || name.IndexOf("ENA4Font", StringComparison.OrdinalIgnoreCase) >= 0 || name == "ENA" || name.StartsWith("ENA ") || name.StartsWith("ENA-")) { _fuente = val; return _fuente; } } TextMeshProUGUI[] array2 = Resources.FindObjectsOfTypeAll(); foreach (TextMeshProUGUI val2 in array2) { if (!((Object)(object)((val2 != null) ? ((TMP_Text)val2).font : null) == (Object)null)) { string name2 = ((Object)((TMP_Text)val2).font).name; if (name2.IndexOf("RuneScape", StringComparison.OrdinalIgnoreCase) >= 0 || name2.IndexOf("ENA", StringComparison.OrdinalIgnoreCase) >= 0) { _fuente = ((TMP_Text)val2).font; return _fuente; } } } return null; } } private static Sprite SpriteDD { get { if ((Object)(object)_spriteDD != (Object)null) { return _spriteDD; } Sprite[] array = Resources.FindObjectsOfTypeAll(); string[] array2 = new string[4] { "s_Dropdown", "Dropdown", "UISprite", "s_Select" }; Sprite[] array3 = array; foreach (Sprite val in array3) { string[] array4 = array2; foreach (string text in array4) { if (((Object)val).name == text) { _spriteDD = val; return _spriteDD; } } } Sprite[] array5 = array; foreach (Sprite val2 in array5) { string text2 = ((Object)val2).name.ToLower(); if (text2.Contains("dropdown") || text2.Contains("chevron")) { _spriteDD = val2; return _spriteDD; } } return null; } } private static GameObject BotonNativoTemplate { get { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown Scene scene; if ((Object)(object)_botonNativoTemplate != (Object)null) { scene = _botonNativoTemplate.scene; if (!((Scene)(ref scene)).IsValid()) { _botonNativoTemplate = null; } } if ((Object)(object)_botonNativoTemplate != (Object)null) { return _botonNativoTemplate; } GameObject[] array = Resources.FindObjectsOfTypeAll(); foreach (GameObject val in array) { if ((Object)(object)val == (Object)null) { continue; } scene = val.scene; if (!((Scene)(ref scene)).IsValid()) { continue; } scene = val.scene; if (!((Scene)(ref scene)).isLoaded || ((Object)val).name.StartsWith("_") || ((Object)val).name == "Resume Button" || (Object)(object)val.GetComponent() != (Object)null || (Object)(object)val.GetComponentInParent() != (Object)null) { continue; } bool flag = false; bool flag2 = false; foreach (Transform item in val.transform) { Transform val2 = item; if (((Object)val2).name == "Border") { flag = true; } if (((Object)val2).name == "Label") { flag2 = true; } } if (flag && flag2 && !((Object)(object)val.GetComponent