From c96ab964c429e6c15325f6b41a05dc14ba78f9c3 Mon Sep 17 00:00:00 2001 From: WNP78 Date: Tue, 9 Jun 2020 14:07:37 +0100 Subject: [PATCH] Quick fix for text box alignment --- Assets/Overload/OverloadXmlEditRowScript.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Assets/Overload/OverloadXmlEditRowScript.cs b/Assets/Overload/OverloadXmlEditRowScript.cs index 8ec6300..4121eb8 100644 --- a/Assets/Overload/OverloadXmlEditRowScript.cs +++ b/Assets/Overload/OverloadXmlEditRowScript.cs @@ -1,5 +1,5 @@ using System; -using System.Collections.Generic; +using System.Collections; using UnityEngine; using UI.Xml; using TMPro; @@ -27,6 +27,8 @@ private void Start() { f.gameObject.AddComponent(); } + + StartCoroutine(FixThingies()); } void OnNameChanged(string name) { @@ -58,5 +60,13 @@ public void Deactivate() xAttribute = null; gameObject.SetActive(false); } + IEnumerator FixThingies() + { + nameInput.SetTextWithoutNotify(""); + valueInput.SetTextWithoutNotify(""); + yield return null; + nameInput.text = xAttribute.Name.LocalName; + valueInput.text = xAttribute.Value; + } } }