private void DrawPropertiesTableRow(MaterialEditorProperties property, MaterialEditorPropertyType type) { GUILayout.BeginHorizontal(); { GUILayout.Label(type.Property, _propertyColumnWidth); type.DrawGUI(editingMaterial); GUILayout.FlexibleSpace(); if (GUILayout.Button("?", _informationColumnWidth)) { ShowHelp(property, type); } } GUILayout.EndHorizontal(); }
private void ShowHelp(MaterialEditorProperties property, MaterialEditorPropertyType type) { new Dialog($"Keywords for {type.Property}", () => { GUILayout.BeginHorizontal(); { GUILayout.FlexibleSpace(); GUILayout.Label("For the following property to work, you may need to enable these following keywords:"); GUILayout.FlexibleSpace(); } GUILayout.EndHorizontal();; GUILayout.BeginHorizontal(); { GUILayout.FlexibleSpace(); var keywordCollection = MaterialEditorPropertyKeywords.KEYWORDS[property]; GUILayout.Label(keywordCollection.Length == 0 ? "No Keywords" : string.Join(", ", keywordCollection)); GUILayout.FlexibleSpace(); } GUILayout.EndHorizontal();; }); }