using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; using System.Data; using System.Data.SqlTypes; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Dynamic; using System.Globalization; using System.IO; using System.Linq; using System.Linq.Expressions; using System.Numerics; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using System.Xml; using System.Xml.Linq; using BepInEx; using Core; using HarmonyLib; using Integration; using JetBrains.Annotations; using Jotunn; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using Newtonsoft.Json.Bson; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq.JsonPath; using Newtonsoft.Json.Schema; using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Utilities; using SkillsReworked.Api; using SkillsReworked.Systems.Prestige; using SkillsReworked.Systems.Rebirth; using SkillsReworked.Systems.Rewards; using TMPro; using Talents; using Talents.Berserker; using Talents.Berserker.Effects; using Talents.Berserker.Patches; using Talents.Bulwark; using Talents.Bulwark.Effects; using Talents.Hunter; using Talents.Hunter.Effects; using Talents.Shared; using Talents.Valkyrie; using Talents.Warcaller; using Talents.Warcaller.Effects; using Talents.Warcaller.Patches; using Talents.Warrior; using Talents.Warrior.Effects; using Talents.Warrior.Patches; using UI; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("assembly_guiutils")] [assembly: IgnoresAccessChecksTo("assembly_utils")] [assembly: IgnoresAccessChecksTo("assembly_valheim")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyCompany("TalentTree")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+e135eec60e693fbedc7cd0e8693e26cf4a05fdc8")] [assembly: AssemblyProduct("TalentTree")] [assembly: AssemblyTitle("TalentTree")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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] [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 UI { internal static class TalentWindowHeaderBuilder { internal sealed class Result { public Text TitleText; public Text PointsText; public Button CloseButton; public Button StatsButton; public Text StatsBtnLabel; } public static Result Build(Transform panel, TalentUiLayout layout) { //IL_0017: 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) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) Result result = new Result(); Text item = UiFactory.CreateTextTopCenter(panel, "Title", JotunnLocalization.T("tt_ui_talents_title"), layout.TitleOffset, layout.TitleSize, GUIManager.Instance.AveriaSerifBold, layout.TitleFontSize, Color.white, outline: true, Color.black).text; item.alignment = (TextAnchor)4; result.TitleText = item; Button item2 = UiFactory.CreateButtonTopRight(panel, "CloseButton", "X", layout.CloseButtonOffset, layout.CloseButtonSize).button; result.CloseButton = item2; Text item3 = UiFactory.CreateTextTopLeft(panel, "Points", JotunnLocalization.Format("tt_ui_points_format", 0), layout.PointsOffset, layout.PointsSize, GUIManager.Instance.AveriaSerifBold, layout.PointsFontSize, Color.white, outline: true, Color.black).text; result.PointsText = item3; (GameObject go, Button button, Text label) tuple = UiFactory.CreateButtonTopLeft(panel, "StatsButton", JotunnLocalization.T("tt_ui_stats"), layout.StatsButtonOffset, layout.StatsButtonSize); Button item4 = tuple.button; Text item5 = tuple.label; result.StatsButton = item4; result.StatsBtnLabel = item5; return result; } } internal static class TalentWindowSearchBuilder { internal sealed class Result { public InputField SearchInput; public RectTransform SearchInputRt; public GameObject SearchDropdown; public RectTransform SearchDropdownRt; } public static Result Build(Transform panel, TalentUiLayout layout, TalentUiTheme theme) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: 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_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Expected O, but got Unknown Result result = new Result(); GameObject val = new GameObject("SearchBox", new Type[3] { typeof(RectTransform), typeof(Image), typeof(InputField) }); val.transform.SetParent(panel, false); result.SearchInputRt = (RectTransform)val.transform; UiFactory.SetTopRight(result.SearchInputRt, layout.SearchOffset, layout.SearchSize); Image component = val.GetComponent(); component.sprite = GUIManager.Instance.GetSprite("text_field"); component.type = (Type)1; ((Graphic)component).color = theme.SearchBoxBackground; ((Graphic)component).raycastTarget = true; result.SearchInput = val.GetComponent(); result.SearchInput.lineType = (LineType)0; result.SearchInput.characterLimit = layout.SearchCharacterLimit; RectTransform val2 = UiFactory.CreateRect("Text", val.transform); UiFactory.SetRectStretch(val2, new Vector2(layout.SearchTextPaddingX, layout.SearchTextPaddingY), new Vector2(0f - layout.SearchTextPaddingX, 0f - layout.SearchTextPaddingY)); Text val3 = ((Component)val2).gameObject.AddComponent(); val3.text = ""; val3.font = GUIManager.Instance.AveriaSerifBold; val3.fontSize = layout.SearchFontSize; ((Graphic)val3).color = Color.white; val3.alignment = (TextAnchor)3; val3.supportRichText = false; result.SearchInput.textComponent = val3; RectTransform obj = UiFactory.CreateRect("Placeholder", val.transform); UiFactory.SetRectStretch(obj, val2.offsetMin, val2.offsetMax); Text val4 = ((Component)obj).gameObject.AddComponent(); val4.text = JotunnLocalization.T("tt_ui_search_placeholder"); val4.font = GUIManager.Instance.AveriaSerifBold; val4.fontSize = layout.SearchFontSize; ((Graphic)val4).color = theme.SearchPlaceholderColor; val4.alignment = (TextAnchor)3; ((Graphic)val4).raycastTarget = false; result.SearchInput.placeholder = (Graphic)(object)val4; result.SearchDropdown = new GameObject("SearchDropdown", new Type[4] { typeof(RectTransform), typeof(Image), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter) }); result.SearchDropdown.transform.SetParent(panel, false); result.SearchDropdownRt = (RectTransform)result.SearchDropdown.transform; UiFactory.SetTopRight(result.SearchDropdownRt, new Vector2(result.SearchInputRt.anchoredPosition.x, result.SearchInputRt.anchoredPosition.y - result.SearchInputRt.sizeDelta.y - layout.SearchDropdownGap), new Vector2(result.SearchInputRt.sizeDelta.x, layout.SearchDropdownInitialHeight)); Image component2 = result.SearchDropdown.GetComponent(); component2.sprite = GUIManager.Instance.GetSprite("text_field"); component2.type = (Type)1; ((Graphic)component2).color = theme.SearchDropdownBackground; ((Graphic)component2).raycastTarget = true; VerticalLayoutGroup component3 = result.SearchDropdown.GetComponent(); ((LayoutGroup)component3).padding = new RectOffset(layout.SearchDropdownPadding, layout.SearchDropdownPadding, layout.SearchDropdownPadding, layout.SearchDropdownPadding); ((HorizontalOrVerticalLayoutGroup)component3).spacing = layout.SearchDropdownSpacing; ((HorizontalOrVerticalLayoutGroup)component3).childControlHeight = true; ((HorizontalOrVerticalLayoutGroup)component3).childForceExpandHeight = false; ((HorizontalOrVerticalLayoutGroup)component3).childForceExpandWidth = true; ((LayoutGroup)component3).childAlignment = (TextAnchor)0; ContentSizeFitter component4 = result.SearchDropdown.GetComponent(); component4.horizontalFit = (FitMode)0; component4.verticalFit = (FitMode)2; result.SearchDropdown.SetActive(false); return result; } } internal static class TalentWindowTreeAreaBuilder { internal sealed class Result { public ScrollRect ScrollRect; public RectTransform ViewportRt; public RectTransform ContentRt; public RectTransform WorldRt; public RectTransform PathsRootRt; public RectTransform NodesRootRt; public MouseWheelZoomToCursor Zoom; } public static Result Build(Transform panel, TalentUiLayout layout, TalentUiTheme theme) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) Result result = new Result(); RectTransform val = UiFactory.CreateRect("TalentTree_Area", panel); UiFactory.SetRectStretch(val, layout.TreeAreaPaddingMin, layout.TreeAreaPaddingMax); Image obj = ((Component)val).gameObject.AddComponent(); obj.sprite = GUIManager.Instance.GetSprite("Background"); ((Graphic)obj).color = theme.TreeBackground; ((Graphic)obj).raycastTarget = true; result.ViewportRt = UiFactory.CreateRect("Viewport", (Transform)(object)val); UiFactory.SetRectStretch(result.ViewportRt, layout.ViewportPaddingMin, layout.ViewportPaddingMax); ((Graphic)((Component)result.ViewportRt).gameObject.AddComponent()).color = theme.ViewportMaskTint; ((Component)result.ViewportRt).gameObject.AddComponent().showMaskGraphic = false; result.ContentRt = UiFactory.CreateRect("Content", (Transform)(object)result.ViewportRt); UiFactory.SetCenter(result.ContentRt, Vector2.zero, layout.ContentSize); ((Transform)result.ContentRt).localScale = Vector3.one; result.WorldRt = UiFactory.CreateRect("World", (Transform)(object)result.ContentRt); UiFactory.SetCenter(result.WorldRt, Vector2.zero, result.ContentRt.sizeDelta); result.PathsRootRt = UiFactory.CreateRect("PathsRoot", (Transform)(object)result.WorldRt); result.NodesRootRt = UiFactory.CreateRect("NodesRoot", (Transform)(object)result.WorldRt); UiFactory.SetRectStretch(result.PathsRootRt, Vector2.zero, Vector2.zero); UiFactory.SetRectStretch(result.NodesRootRt, Vector2.zero, Vector2.zero); ((Component)result.PathsRootRt).transform.SetAsFirstSibling(); ((Component)result.NodesRootRt).transform.SetAsLastSibling(); result.ScrollRect = ((Component)val).gameObject.AddComponent(); result.ScrollRect.viewport = result.ViewportRt; result.ScrollRect.content = result.ContentRt; result.ScrollRect.horizontal = true; result.ScrollRect.vertical = true; result.ScrollRect.movementType = (MovementType)2; result.ScrollRect.inertia = true; result.ScrollRect.scrollSensitivity = 0f; result.Zoom = ((Component)result.ViewportRt).gameObject.AddComponent(); result.Zoom.Initialize(result.ViewportRt, result.ContentRt, result.ScrollRect, layout); return result; } } internal sealed class TalentSearchController { private sealed class SearchItem { public string Id; public string Name; public string IdLower; public string NameLower; public string HaystackLower; } private struct SearchMatch { public SearchItem Item; public int Score; } private sealed class SuggestionEntry { public GameObject Go; public Button Button; public Image Background; public Text Label; public string Id; } private sealed class SuggestionPointerDownCatcher : MonoBehaviour, IPointerDownHandler, IEventSystemHandler { public TalentSearchController Owner; public int Index; public void OnPointerDown(PointerEventData eventData) { Owner._suppressEndEditOnce = true; Owner.SelectByIndex(Index); } } private const int DefaultIndexCapacity = 256; private const int DefaultMatchBufferCapacity = 256; private const int DefaultSuggestionsCapacity = 16; private const int ScorePrefixNameBase = 1000; private const int ScoreContainsNameBase = 800; private const int ScorePrefixIdBase = 600; private const int ScoreContainsIdBase = 400; private const int ScoreContainsHaystackBase = 200; private readonly TalentUiTheme _theme; private readonly TalentUiLayout _layout; private readonly List _index = new List(256); private readonly List _matchBuffer = new List(256); private readonly List _suggestions = new List(16); private readonly InputField _input; private readonly RectTransform _inputRt; private readonly GameObject _dropdown; private readonly RectTransform _dropdownRt; private bool _suppressSearchEvents; private bool _suppressEndEditOnce; private bool _selecting; private bool _pendingHide; private int _selectedSuggestionIndex = -1; private Func _displayName; private Action _onSelected; public bool IsDropdownVisible { get { if ((Object)(object)_dropdown != (Object)null) { return _dropdown.activeSelf; } return false; } } public TalentSearchController(InputField input, RectTransform inputRt, GameObject dropdown, RectTransform dropdownRt, TalentUiTheme theme = null, TalentUiLayout layout = null) { _input = input; _inputRt = inputRt; _dropdown = dropdown; _dropdownRt = dropdownRt; _theme = theme ?? TalentUiTheme.Default; _layout = layout ?? TalentUiLayout.Default; } public void Bind(Func displayName, Action onSelected) { _displayName = displayName; _onSelected = onSelected; ((UnityEventBase)_input.onValueChanged).RemoveAllListeners(); ((UnityEventBase)_input.onEndEdit).RemoveAllListeners(); ((UnityEvent)(object)_input.onValueChanged).AddListener((UnityAction)OnSearchChanged); ((UnityEvent)(object)_input.onEndEdit).AddListener((UnityAction)OnSearchEndEdit); } public void RebuildIndex(IEnumerable defs) { _index.Clear(); foreach (TalentDefinition def in defs) { if (def != null && def.Tier != NodeTier.Minor) { string text = def.Id ?? ""; string text2 = ((_displayName != null) ? _displayName(def) : (def.NameKey ?? text)); string text3 = text.ToLowerInvariant(); string text4 = (text2 ?? "").ToLowerInvariant(); _index.Add(new SearchItem { Id = text, Name = text2, IdLower = text3, NameLower = text4, HaystackLower = text3 + " " + text4 }); } } } public void Clear() { _suppressSearchEvents = true; try { _input.text = ""; } finally { _suppressSearchEvents = false; } HideDropdown(); } public void HideDropdown() { _pendingHide = false; if ((Object)(object)_dropdown != (Object)null) { _dropdown.SetActive(false); } _selectedSuggestionIndex = -1; } public void Tick() { if ((Object)(object)_input == (Object)null || (Object)(object)_dropdown == (Object)null) { return; } if (_pendingHide) { _pendingHide = false; if (!_selecting) { HideDropdown(); } } else if (_dropdown.activeSelf && _input.isFocused) { if (Input.GetKeyDown((KeyCode)274)) { _selectedSuggestionIndex = Mathf.Clamp(_selectedSuggestionIndex + 1, 0, GetVisibleSuggestionCount() - 1); ApplySuggestionHighlight(); } else if (Input.GetKeyDown((KeyCode)273)) { _selectedSuggestionIndex = Mathf.Clamp(_selectedSuggestionIndex - 1, 0, GetVisibleSuggestionCount() - 1); ApplySuggestionHighlight(); } else if (IsSubmitKeyDown()) { TrySelectCurrentSuggestion(); } else if (Input.GetKeyDown((KeyCode)27)) { HideDropdown(); _input.DeactivateInputField(); } } } private void OnSearchEndEdit(string value) { if (!_selecting) { if (_suppressEndEditOnce) { _suppressEndEditOnce = false; } else if (!IsSubmitKeyDown() || !TrySelectCurrentSuggestion()) { _pendingHide = true; } } } private void OnSearchChanged(string raw) { if (!_suppressSearchEvents && !_selecting) { if (string.IsNullOrWhiteSpace(raw)) { HideDropdown(); } else { UpdateSuggestions(raw); } } } private void UpdateSuggestions(string raw) { //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) _matchBuffer.Clear(); string text = raw.Trim().ToLowerInvariant(); if (text.Length == 0) { HideDropdown(); return; } for (int i = 0; i < _index.Count; i++) { SearchItem item = _index[i]; int num = ScoreMatch(item, text); if (num > 0) { _matchBuffer.Add(new SearchMatch { Item = item, Score = num }); } } if (_matchBuffer.Count == 0) { HideDropdown(); return; } _matchBuffer.Sort((SearchMatch a, SearchMatch b) => b.Score.CompareTo(a.Score)); int num2 = Mathf.Min(_layout.SearchMaxSuggestions, _matchBuffer.Count); EnsureSuggestionEntries(num2); for (int num3 = 0; num3 < num2; num3++) { SearchMatch searchMatch = _matchBuffer[num3]; SuggestionEntry suggestionEntry = _suggestions[num3]; suggestionEntry.Id = searchMatch.Item.Id; suggestionEntry.Label.text = searchMatch.Item.Name; suggestionEntry.Go.SetActive(true); } for (int num4 = num2; num4 < _suggestions.Count; num4++) { _suggestions[num4].Go.SetActive(false); } _selectedSuggestionIndex = 0; ApplySuggestionHighlight(); if ((Object)(object)_dropdownRt != (Object)null && (Object)(object)_inputRt != (Object)null) { _dropdownRt.anchoredPosition = new Vector2(_inputRt.anchoredPosition.x, _inputRt.anchoredPosition.y - _inputRt.sizeDelta.y - _layout.SearchDropdownGap); } _dropdown.SetActive(true); } private int ScoreMatch(SearchItem item, string q) { if (item.NameLower.StartsWith(q)) { return 1000 - item.NameLower.Length; } if (item.NameLower.Contains(q)) { return 800 - item.NameLower.Length; } if (item.IdLower.StartsWith(q)) { return 600 - item.IdLower.Length; } if (item.IdLower.Contains(q)) { return 400 - item.IdLower.Length; } if (item.HaystackLower.Contains(q)) { return 200 - item.HaystackLower.Length; } return 0; } private int GetVisibleSuggestionCount() { int num = 0; for (int i = 0; i < _suggestions.Count; i++) { if (_suggestions[i].Go.activeSelf) { num++; } } return num; } private void ApplySuggestionHighlight() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < _suggestions.Count; i++) { SuggestionEntry suggestionEntry = _suggestions[i]; if (suggestionEntry.Go.activeSelf) { bool flag = i == _selectedSuggestionIndex; if ((Object)(object)suggestionEntry.Background != (Object)null) { ((Graphic)suggestionEntry.Background).color = (flag ? _theme.SuggestionSelected : _theme.SuggestionNormal); } } } } private void EnsureSuggestionEntries(int count) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0071: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_013e: 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_0159: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) while (_suggestions.Count < count) { int count2 = _suggestions.Count; GameObject val = new GameObject($"Row_{count2}", new Type[3] { typeof(RectTransform), typeof(Image), typeof(LayoutElement) }); val.transform.SetParent(_dropdown.transform, false); ((RectTransform)val.transform).sizeDelta = new Vector2(0f, _layout.SuggestionRowHeight); LayoutElement component = val.GetComponent(); component.minHeight = _layout.SuggestionRowHeight; component.preferredHeight = _layout.SuggestionRowHeight; component.flexibleHeight = 0f; Image component2 = val.GetComponent(); ((Graphic)component2).color = _theme.SuggestionNormal; ((Graphic)component2).raycastTarget = true; Button val2 = val.AddComponent