Skip to content

Bevy overwrites unconditionally user Transform #8943

@nicopap

Description

@nicopap

Problem: When I write to the Transform of a UI node, it doesn't do anything and I see no error messages.

Why this happens is fairly trivial: Transform is updated by the UI system in PostUpdate, and overwrites the user-set value unconditionally.

This is also true of AnimationClips. A system overwrites bone transforms targeted by an animations in PostUpdate. Even if the AnimationClip is paused!

What solution would I like

We should detect "Write-only" systems and emit an error message when users write to a component that is later accessed by a write-only system.

Future potential

We could extend this to GlobalTransform, or ComputedVisibilty and enable writing to those, since now we are capable to emit an error message with 0 overhead if they are misused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AnimationMake things move and change over timeA-TransformTranslations, rotations and scalesA-UIGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-Needs-Design-DocThis issue or PR is particularly complex, and needs an approved design doc before it can be merged

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions