Skip to content

Commit

Permalink
inspector の list で VRM10SpringBoneColliderGroup の名前を表示する
Browse files Browse the repository at this point in the history
  • Loading branch information
ousttrue committed Feb 27, 2024
1 parent b0f75f7 commit 712b35c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

using UnityEditor;
using UnityEngine;

namespace UniVRM10
{
[CustomPropertyDrawer(typeof(VRM10SpringBoneColliderGroup))]
public class VRM10SpringBoneColliderGroupDrawer : PropertyDrawer
{
public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
{
try
{
EditorGUI.ObjectField(rect, property, new GUIContent(((VRM10SpringBoneColliderGroup)property.objectReferenceValue).Name));
}
catch
{
EditorGUI.ObjectField(rect, property, new GUIContent("fallback"));
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 712b35c

Please sign in to comment.