public void UpdateDisplayName() { string dName = hexType.ToString() + ": " + gridPos.ToString(); if (hexAttribute != null) { dName = dName.Replace("HexTile_", "☰ "); if (hexAttribute.GetType() == typeof(MenuButtonElementAttribute)) { MenuButtonElementAttribute yeet = hexAttribute as MenuButtonElementAttribute; hexAttributeInfo = yeet.GetType() + ": " + yeet.commandToCall; } else { hexAttributeInfo = hexAttribute.GetType().ToString(); } // Debug.Log(hexAttribute); } else { dName = dName.Replace("HexTile_", "♥ "); hexAttributeInfo = null; } displayName = dName; }
private void ShowLayout_MenuButtonAttribute() { if (attribute == null) { return; } MenuButtonElementAttribute digitAttribute = (MenuButtonElementAttribute)attribute; digitAttribute.commandToCall = (Command)EditorGUILayout.EnumPopup("Button Command", digitAttribute.commandToCall); }