浏览代码

Fixes for StateMachineStatePropertyDrawer

/main
Thomas ICHÉ 5 年前
当前提交
48fa268b
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2
      Editor/PropertyDrawers/StateMachineStatePropertyDrawer.cs
  2. 2
      Runtime/Ingredients/Rigs/DirectorControlRig.cs

2
Editor/PropertyDrawers/StateMachineStatePropertyDrawer.cs


}
int newIdx = EditorGUI.IntPopup(position, new GUIContent(property.displayName), selected, labels, indices);
if (GUI.changed && newIdx > 0 && stateMachine.States[newIdx] != null)
if (GUI.changed && newIdx >= 0 && stateMachine.States[newIdx] != null)
{
property.stringValue = stateMachine.States[newIdx].StateName;
}

2
Runtime/Ingredients/Rigs/DirectorControlRig.cs


using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
using NaughtyAttributes;
namespace GameplayIngredients.Rigs
{

public PlayMode playMode { get { return m_PlayMode; } set { m_PlayMode = value; } }
public float stopTime { get { return m_StopTime; } set { m_StopTime = value; } }
[ShowNativeProperty]
public float time { get { return (float)director.time; } set { director.time = value; } }
public TimelineAsset timeline { get { return director.playableAsset as TimelineAsset; } set { director.playableAsset = value; } }

正在加载...
取消
保存