-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Generate warnings when incorrectly accessing Transform or GlobalTransform #1439
Comments
Something else to consider is that most User Code should only read from GlobalTransform, as its Values are managed and overrriden by Bevy itself. |
With the general recommendation being "run in release", I wonder if it wouldn't be better to add a "debug" feature enabled by default (probably with a better name though... "training-wheels"? "clippy"?) |
#1460 should take care of that. |
For reference, this should be improved by #68. |
The 1-frame lag issue is still an open question, but it seems very difficult to design a system to catch it and warn users about it. |
What problem does this solve or what need does it fill?
Updating
Transform
late or readingGlobalTransform
early are very common issues that result in a number of help requests and bugs in general.What solution would you like?
Generate a warning in debug mode any time a
Transform
is ever mutated afterGlobalTransform
is propagated or aGlobalTransform
is accessed before it has been updated that frame.What alternative(s) have you considered?
GlobalTransform
and propagateTransform
s at the end of the frame to ensure that worst case, systems accessing it will be a frame out of date, but still work. This could be accompanied with an error message.The text was updated successfully, but these errors were encountered: