mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-13 22:09:53 -05:00
* SceneView switch * VRM10ControllerEditor を分割 * VRM10/Editor/Components/VRM10ControllerSceneView.cs * LookAtEditor, SpringBoneEditor * VRM10SpringBoneColliderGroup and VRM10SpringBone to VRM10ControllerSpringBone. not MonoBehaviour * ReorderableList * VRM10Window.cs * SpringBoneTreeView * ScrollView * rename * VRM10SpringBoneColliderEditor * SelectedGUIBase * spring name * VRM10SpringBoneCollider gizmo to handle * SelectedGUI * 再度、VRM10SpringBoneColliderGroup を MonoBehaviour へ。SerializedObject の参照の都合
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using UnityEditor;
|
|
|
|
namespace UniVRM10
|
|
{
|
|
/// <summary>
|
|
/// 指定した SerializedProperty を起点に再帰的に SerializedProperty を表示する。
|
|
/// </summary>
|
|
class PropGui
|
|
{
|
|
SerializedProperty m_root;
|
|
|
|
public PropGui(SerializedProperty property)
|
|
{
|
|
m_root = property;
|
|
}
|
|
|
|
// public static PropGui FromSerializedObject(SerializedObject serializedObject, string name)
|
|
// {
|
|
// var prop = serializedObject.FindProperty(name);
|
|
// return new PropGui(prop);
|
|
// }
|
|
|
|
public void RecursiveProperty()
|
|
{
|
|
var depth = m_root.depth;
|
|
var iterator = m_root.Copy();
|
|
for (var enterChildren = true; iterator.NextVisible(enterChildren); enterChildren = false)
|
|
{
|
|
if (iterator.depth < depth)
|
|
return;
|
|
|
|
depth = iterator.depth;
|
|
|
|
using (new EditorGUI.DisabledScope("m_Script" == iterator.propertyPath))
|
|
{
|
|
EditorGUILayout.PropertyField(iterator, true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|