This repository has been archived on 2025-03-10. You can view files and clone it, but cannot push or open issues or pull requests.
rabidus-test/Assets/BNG Framework/Editor/VRIFGrabpointUpdaterEditor.cs

39 lines
1.0 KiB
C#
Raw Normal View History

2023-07-24 16:38:13 +03:00
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace BNG {
[CustomEditor(typeof(VRIFGrabpointUpdater))]
[CanEditMultipleObjects]
public class VRIFGrabpointUpdaterEditor : Editor {
VRIFGrabpointUpdater updater;
void OnEnable() {
}
public override void OnInspectorGUI() {
updater = (VRIFGrabpointUpdater)target;
EditorGUILayout.HelpBox("This component will help you autmatically update your grab points, as the default hand model positions have changed since VRIF v1.7. Click the 'Updated Pose' button to update the grab points in the editor. You can preview the changes in play mode before applying the changes in the editor.", MessageType.Info);
if (GUILayout.Button("Update Pose")) {
updater.ApplyGrabPointUpdate();
}
EditorGUILayout.Separator();
serializedObject.ApplyModifiedProperties();
base.OnInspectorGUI();
}
}
}