mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-13 22:09:53 -05:00
21 lines
626 B
C#
21 lines
626 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace UniVRM10
|
|
{
|
|
[CustomPropertyDrawer(typeof(VRM10SpringBoneCollider))]
|
|
public class VRM10SpringBoneColliderDrawer : PropertyDrawer
|
|
{
|
|
public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
|
|
{
|
|
try
|
|
{
|
|
EditorGUI.ObjectField(rect, property, new GUIContent(((VRM10SpringBoneCollider)property.objectReferenceValue).GetIdentificationName()));
|
|
}
|
|
catch
|
|
{
|
|
EditorGUI.ObjectField(rect, property, new GUIContent());
|
|
}
|
|
}
|
|
}
|
|
} |