public static void ProcessElement(GameObject DynamicPanel, VariableViewerNetworking.NetFriendlyPage Page = null, VariableViewerNetworking.NetFriendlySentence Sentence = null, bool iskey = false) { Type ValueType; if (Page != null) { ValueType = Librarian.UEGetType(Page.VariableType); } else { if (iskey) { ValueType = Librarian.UEGetType(Sentence.KeyVariableType); } else { ValueType = Librarian.UEGetType(Sentence.ValueVariableType); } } if (ValueType == null) { return; } PageElement _PageElement = null; if (Type2Element.ContainsKey(ValueType)) { _PageElement = InitialisePageElement(Type2Element[ValueType]); } else { foreach (PageElementEnum _Enum in Enum.GetValues(typeof(PageElementEnum))) { if (AvailableElements[_Enum].IsThisType(ValueType)) { _PageElement = InitialisePageElement(AvailableElements[_Enum]); break; } } } if (_PageElement != null) { _PageElement.transform.SetParent(DynamicPanel.transform); _PageElement.transform.localScale = Vector3.one; _PageElement.SetUpValues(ValueType, Page, Sentence, iskey); } }