public void UpdateUI() { if (index == -1) { SelectionGUI = null; } else { SelectionGUI = new PropertyCustomGUI(GetArrayElement(index)); SelectionGUI.DrawFoldout = false; } }