[Issue] BoxGroup, Button, ReorderableList, ShowNativeProperty and ShowNonSerializedField attributes cannot be nested inside serializable structs/classes
Are these all in the update plan in the future?
Yes, I am gonna try to make them nestable. After the rework all other attributes support nesting. These are some special cases. I already tried a solution with recursion but I had some big issues.
👍
Is the ScriptableObject-Inspector planned?
Like this
I think this feature is very important ! : )
Yes it is. Everything in the issues and pull requests is planned.
👍
Hi guy, is it still being updated?
@MingFengShang and for people who are stilling waiting for this feature:
I have a project with this feature, and it can be co-used with NaughtyAttributes in the same project.
Here is an example of using attributes like Button in a Serializable class/struct:
[Serializable]
public struct Nest
{
public string nest2Str; // normal field
[Button] // function button
private void Nest2Btn() => Debug.Log("Call Nest2Btn");
// static field (non serializable)
[ShowInInspector] public static Color StaticColor => Color.cyan;
// const field (non serializable)
[ShowInInspector] public const float Pi = 3.14f;
// normal attribute drawer works as expected
[BelowImage(maxWidth: 25)] public SpriteRenderer spriteRenderer;
[DOTweenPlay] // DOTween helper
private Sequence PlayColor()
{
return DOTween.Sequence()
.Append(spriteRenderer.DOColor(Color.red, 1f))
.Append(spriteRenderer.DOColor(Color.green, 1f))
.Append(spriteRenderer.DOColor(Color.blue, 1f))
.SetLoops(-1);
}
[DOTweenPlay("Position")]
private Sequence PlayTween2()
{
return DOTween.Sequence()
.Append(spriteRenderer.transform.DOMove(Vector3.up, 1f))
.Append(spriteRenderer.transform.DOMove(Vector3.right, 1f))
.Append(spriteRenderer.transform.DOMove(Vector3.down, 1f))
.Append(spriteRenderer.transform.DOMove(Vector3.left, 1f))
.Append(spriteRenderer.transform.DOMove(Vector3.zero, 1f))
;
}
}
[SaintsRow] // magic
public Nest n1;