| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | using System; |
| | using System.Collections; |
| | using System.Collections.Generic; |
| | using UnityEditor; |
| | using UnityEngine; |
| |
|
| | namespace Mujoco { |
| |
|
| | [CustomEditor(typeof(MjShapeComponent), true)] |
| | [CanEditMultipleObjects] |
| | public class MjShapeComponentEditor : MjMouseSpring { |
| |
|
| | public override void OnInspectorGUI() { |
| |
|
| | serializedObject.Update(); |
| | var shapeType = serializedObject.FindProperty("ShapeType"); |
| | EditorGUILayout.PropertyField(shapeType); |
| | EditorGUILayout.PropertyField( |
| | serializedObject.FindProperty($"{shapeType.enumNames[shapeType.enumValueIndex]}"), |
| | includeChildren: true); |
| | serializedObject.ApplyModifiedProperties(); |
| | } |
| | } |
| | } |
| |
|