You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NaughtyAttributes doesn't do anything when attached to attributes in a StateMachineBehaviour
`public class SetRandomParameter : StateMachineBehaviour {
public string parameter;
public enum ParameterType { integer, floatingPoint };
[SerializeField]
private ParameterType _parameterType;
[ShowIf("IsInt")]
public int min;
[ShowIf("IsInt")]
public int max;
[ShowIf("IsFloat")]
public Vector2 range;
private bool IsInt()
{
return _parameterType == ParameterType.integer;
}
private bool IsFloat()
{
return _parameterType == ParameterType.floatingPoint;
}
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
}
}`
The text was updated successfully, but these errors were encountered:
The attributes implemented via CustomPropertyDrawer are now working. The custom ones like (Button, ReorderableList) aren't. The problem is that OnEnable() and OnDisable() methods of the StateMachineBehviours are not called. I don't know why :(
using System.Collections;
using System.Collections.Generic;
using NaughtyAttributes;
using UnityEngine;
namespace MakeSomething
{
public class TestState : StateMachineBehaviour
{
public int Foo;
[SerializeField]
private int _bar;
[ShowNonSerializedField] // Doesn't work
private int _baz;
[ReadOnly] // Doesn't work
[SerializeField]
private int _qux;
}
}
NaughtyAttributes doesn't do anything when attached to attributes in a StateMachineBehaviour
`public class SetRandomParameter : StateMachineBehaviour {
}`
The text was updated successfully, but these errors were encountered: