Skip to content

Commit 13cb9b0

Browse files
authored
Merge pull request #4876 from thalbern/user/bethalha/holobtn_insp
enabled pressable button inspector for derived types
2 parents 316fe8d + 6c04490 commit 13cb9b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Assets/MixedRealityToolkit.SDK/Inspectors/UX/Interactable/PressableButtonInspector.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Microsoft.MixedReality.Toolkit.Editor
1010
{
11-
[CustomEditor(typeof(PressableButton))]
11+
[CustomEditor(typeof(PressableButton), true)]
1212
public class PressableButtonInspector : UnityEditor.Editor
1313
{
1414
// Struct used to store state of preview.
@@ -171,7 +171,7 @@ private void DrawButtonInfo(ButtonInfo info, bool editingEnabled)
171171

172172
if (editingEnabled && EditorGUI.EndChangeCheck())
173173
{
174-
Undo.RecordObject(target, "Modify PressableButton");
174+
Undo.RecordObject(target, string.Concat("Modify Button Planes of ", button.name));
175175

176176
startPushDistance.floatValue = info.StartPushDistance;
177177
maxPushDistance.floatValue = info.MaxPushDistance;
@@ -246,7 +246,7 @@ private float DrawPlaneAndHandle(Vector3[] vertices, Vector3 halfExtents, float
246246
/// </summary>
247247
private void OnTriggerPlaneDistanceConversion()
248248
{
249-
Undo.RecordObject(target, "Modify PressableButton");
249+
Undo.RecordObject(target, string.Concat("Trigger Plane Distance Conversion of ", button.name));
250250
button.DistanceSpaceMode = (button.DistanceSpaceMode == PressableButton.SpaceMode.World)
251251
? PressableButton.SpaceMode.Local : PressableButton.SpaceMode.World;
252252
serializedObject.ApplyModifiedProperties();

0 commit comments

Comments
 (0)