protected void ItemDataField(string label, ref Engine.Math.Color field, bool dirtyMesh = true) { EditorGUI.BeginChangeCheck(); Engine.Math.Color val = EditorGUILayout.ColorField(label, field.ToUnityColor()).ToEngineColor(); if (EditorGUI.EndChangeCheck()) { FinishEdit(label, dirtyMesh); field = val; } }
protected void ColorField(string label, ref Engine.Math.Color field, string tooltip = "") { EditorGUI.BeginChangeCheck(); Engine.Math.Color val = EditorGUILayout.ColorField(new GUIContent(label, tooltip), field.ToUnityColor()).ToEngineColor(); if (EditorGUI.EndChangeCheck()) { FinalizeChange(label, ref field, val); } }