mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-03-24 19:34:42 -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 の参照の都合
29 lines
840 B
C#
29 lines
840 B
C#
using System.Collections.Generic;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace UniVRM10
|
|
{
|
|
public class ExpressionSlider
|
|
{
|
|
Dictionary<ExpressionKey, float> m_expressionKeys;
|
|
ExpressionKey m_key;
|
|
|
|
public ExpressionSlider(Dictionary<ExpressionKey, float> expressionKeys, ExpressionKey key)
|
|
{
|
|
m_expressionKeys = expressionKeys;
|
|
m_key = key;
|
|
}
|
|
|
|
public KeyValuePair<ExpressionKey, float> Slider()
|
|
{
|
|
var oldValue = m_expressionKeys[m_key];
|
|
var enable = GUI.enabled;
|
|
GUI.enabled = Application.isPlaying;
|
|
var newValue = EditorGUILayout.Slider(m_key.ToString(), oldValue, 0, 1.0f);
|
|
GUI.enabled = enable;
|
|
return new KeyValuePair<ExpressionKey, float>(m_key, newValue);
|
|
}
|
|
}
|
|
}
|