Skip to content

Pattern: Struct of Fields for Bitflag UI #104

@ChristopherBiscardi

Description

@ChristopherBiscardi

There are bitflags like Avian's TrimeshFlags. These come in as integer types in the best case scenario (until upstream Reflection potentially supports more information).

In these cases, you can use a struct of bool fields combined with a component hook.

In Blender, the UI will be a set of checkboxes, and in Bevy the on_add hook is responsible for combining these into the the actual values (for example: TrimeshFromMeshWithConfig

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions