Skip to content

Commit

Permalink
Add message to VRMBlnedShapeProxyEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
ousttrue committed Apr 20, 2018
1 parent 9f87451 commit ec8a122
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Scripts/BlendShape/Editor/VRMBlnedShapeProxyEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ public void Slider()
}

var oldValue = m_target.GetValue(m_key);
var enable = GUI.enabled;
GUI.enabled = Application.isPlaying;
var newValue = EditorGUILayout.Slider(m_key.ToString(), oldValue, 0, 1.0f);
if (oldValue != newValue)
GUI.enabled = enable;
if (Application.isPlaying && oldValue != newValue)
{
m_target.SetValue(m_key, newValue);
}
Expand All @@ -57,6 +60,11 @@ public override void OnInspectorGUI()
{
base.OnInspectorGUI();

if (!Application.isPlaying)
{
EditorGUILayout.HelpBox("Enable when playing", MessageType.Info);
}

if (m_sliders != null)
{
foreach (var slider in m_sliders)
Expand Down

0 comments on commit ec8a122

Please sign in to comment.