void DoIncrementSnapSettings() { EditorGUI.BeginChangeCheck(); var linked = snapValueLinked; EditorSnapSettings.move = EditorGUILayout.LinkedVector3Field(Contents.moveContent, EditorSnapSettings.move, ref linked); snapValueLinked = linked; EditorSnapSettings.rotate = EditorGUILayout.FloatField(Contents.rotateValue, EditorSnapSettings.rotate); EditorSnapSettings.scale = EditorGUILayout.FloatField(Contents.scaleValue, EditorSnapSettings.scale); if (EditorGUI.EndChangeCheck()) { EditorSnapSettings.Save(); } }
void Draw() { EditorGUIUtility.labelWidth = k_LabelWidth; GUILayout.Label(Contents.snapSettings, Styles.header); EditorGUI.BeginChangeCheck(); DrawMoveValuesFields(); DoSeparator(); EditorSnapSettings.rotate = EditorGUILayout.FloatField(Contents.rotateValue, EditorSnapSettings.rotate); EditorSnapSettings.scale = EditorGUILayout.FloatField(Contents.scaleValue, EditorSnapSettings.scale); if (EditorGUI.EndChangeCheck()) { EditorSnapSettings.Save(); } EditorGUIUtility.labelWidth = 0; }