Skip to content

A StructVariant DynamicEnum always returns None from the field_at method #20402

@jhgarner

Description

@jhgarner

Bevy version

0.16

What you did

I tried to use the field_at method on a StructVariant DynamicEnum.

What went wrong

The docs for field order say that field_at should be implemented for struct variant enums. Since DynamicEnum is builtin, I expect it to follow that convention, but the DynamicEnum implementation doesn't follow it. Is it possible for DynamicEnum to follow this convention? If it isn't, could this be called out in the docs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ReflectionRuntime information about typesC-BugAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions