bevyengine / bevyengine/bevy

Bevy overwrites unconditionally user `Transform`

Open
#8,943 2 comments 0 reactions 0 assignees View on GitHub
A-Animation A-Transform A-UI C-Feature C-Usability D-Complex S-Needs-Design-Doc
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

**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 `AnimationClip`s. 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.