Skip to content

Adding element to an Array is broken + No way to create array from inspector like you can do with List<> #141

Description

@Ritbulau

If you create an array field and try to add an element into it with a "+" button in inspector, "ghost" element appears and error pops up in the console about index being outside the bounds of an array, pointing to Editor/Elements/ListField.cs:32. This is an error only if you are trying to add more elements than was specified in the code, for an example you can't add element into array if it already has 5 elements and it was specified in the code as with 5 elements. I know how array works and how it is fixed with it's size, but standart Unity serializer deals with it just fine just by creating new array and disposing the old one after copying all the elements into new one. Would be nice to see such functionality

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions