Skip to content

[BUG] TextArea field shows duplicate label when used with SerializeReference #105

Description

@breakmt

What happened?

Hi!

I found a UI issue when using SerializeReference with SubclassSelector and [TextArea].

Example:

Base class:

[Serializable]
public abstract class Command
{
}

Derived class:

[Serializable]
[AddTypeMenu("Text")]
public class TextCommand : Command
{
    [SerializeField]
    [TextArea]
    private string _text;
}

Container:

[Serializable]
public class Interaction
{
    [SerializeReference, SubclassSelector]
    private List<Command> _commands = new();
}

Steps to reproduce:

  1. Create a TextCommand inside the SerializeReference list.
  2. Expand it in the Inspector.

Expected:
A single label ("Text") above the TextArea.

Actual:
The label is displayed twice. It looks like both the wrapper and the TextArea drawer render the field label.
Image

If I remove the [TextArea] attribute, the duplicate label disappears.

Is this a known issue?

Package Version

1.7.0

Unity Version

Unity 6000.3.12f1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions