浏览代码

Revert "Changed to isPlayingOrWillChangePlaymode instead of isPlaying"

This reverts commit d2d5691178393194473deb1ed862ca9056bcb7a2.
/main
DeivSky 4 年前
当前提交
0b07d6d3
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      UOP1_Project/Assets/Scripts/StateMachine/Editor/Utilities/InitOnlyAttributeDrawer.cs

6
UOP1_Project/Assets/Scripts/StateMachine/Editor/Utilities/InitOnlyAttributeDrawer.cs


[CustomPropertyDrawer(typeof(InitOnlyAttribute))]
public class InitOnlyAttributeDrawer : PropertyDrawer
{
private static readonly string _text = "Changes to this parameter during play mode will only take effect on new state machine instances, or the next time you enter play mode.";
private static readonly string _text = "Changes to this parameter will only take effect on new state machine instances, or the next time you enter play mode.";
if (EditorApplication.isPlayingOrWillChangePlaymode)
if (EditorApplication.isPlaying)
{
position.height = _style.CalcHeight(new GUIContent(_text), EditorGUIUtility.currentViewWidth);
EditorGUI.HelpBox(position, _text, MessageType.Info);

{
float height = EditorGUI.GetPropertyHeight(property, label);
if (EditorApplication.isPlayingOrWillChangePlaymode)
if (EditorApplication.isPlaying)
{
height += _style.CalcHeight(new GUIContent(_text), EditorGUIUtility.currentViewWidth)
+ EditorGUIUtility.standardVerticalSpacing * 4;

正在加载...
取消
保存