Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bevy overwrites unconditionally user Transform #8943

Open
nicopap opened this issue Jun 24, 2023 · 2 comments
Open

Bevy overwrites unconditionally user Transform #8943

nicopap opened this issue Jun 24, 2023 · 2 comments
Labels
A-Animation Make things move and change over time A-Transform Translations, rotations and scales A-UI Graphical user interfaces, styles, layouts, and widgets C-Feature A new feature, making something new possible C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Design-Doc This issue or PR is particularly complex, and needs an approved design doc before it can be merged

Comments

@nicopap
Copy link
Contributor

nicopap commented Jun 24, 2023

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.

@nicopap nicopap added C-Feature A new feature, making something new possible A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Animation Make things move and change over time A-Transform Translations, rotations and scales S-Needs-Design-Doc This issue or PR is particularly complex, and needs an approved design doc before it can be merged D-Complex Quite challenging from either a design or technical perspective. Ask for help! labels Jun 24, 2023
@Aultus-defora
Copy link

Aultus-defora commented Jun 27, 2023

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.

That should only be true if the next system completely owerwrites component, instead of modifying it. Which in this case it will be...

@nicopap
Copy link
Contributor Author

nicopap commented Jun 28, 2023

Check out the RFC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Animation Make things move and change over time A-Transform Translations, rotations and scales A-UI Graphical user interfaces, styles, layouts, and widgets C-Feature A new feature, making something new possible C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Design-Doc This issue or PR is particularly complex, and needs an approved design doc before it can be merged
Projects
None yet
Development

No branches or pull requests

2 participants