Skip to content

Commit a92dcae

Browse files
added temp migration button to test migration script
1 parent d01a03a commit a92dcae

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Assets/MixedRealityToolkit.SDK/Inspectors/UX/BoundingBox/BoundingBoxInspector.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Licensed under the MIT License. See LICENSE in the project root for license information.
44
//
55

6+
using Microsoft.MixedReality.Toolkit.Experimental.Utilities;
67
using Microsoft.MixedReality.Toolkit.Input;
78
using Microsoft.MixedReality.Toolkit.UI;
89
using Microsoft.MixedReality.Toolkit.Utilities.Editor;
@@ -44,6 +45,21 @@ public override void OnInspectorGUI()
4445
}
4546

4647
DrawDefaultInspector();
48+
49+
// Draws warning message for deprecated object with button for migration option
50+
DrawDeprecated();
51+
}
52+
53+
private void DrawDeprecated()
54+
{
55+
EditorGUILayout.HelpBox("This Component is deprecated. Please migrate object to up to date version", UnityEditor.MessageType.Warning);
56+
if (GUILayout.Button("Migrate Object"))
57+
{
58+
BoundsControlMigrationHandler migrationHandler = new BoundsControlMigrationHandler();
59+
migrationHandler.Migrate(((BoundingBox)target).gameObject);
60+
61+
}
4762
}
4863
}
4964
}
65+

0 commit comments

Comments
 (0)