-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - Implement ReflectValue serialization for Duration #3318
Conversation
Looks good to me. Could you do the same quick for |
Mmm... that one is less straightforward. Because From https://doc.rust-lang.org/stable/std/time/struct.Instant.html:
|
Sounds good to me. I'll keep an eye out for this when designing Bevy's timers and related work: hopefully we should never need to store instants. |
bors r+ |
# Objective Resolves #3277 Currenty if we try to serialize a scene that contains a `Duration` (which is very common, since `Timer` contains one), we get an error saying: > Type 'core::time::Duration' does not support ReflectValue serialization ## Solution Let `Duration` implement `SerializeValue`. Co-authored-by: Jonathan Cornaz <jcornaz@users.noreply.github.com>
Pull request successfully merged into main. Build succeeded: |
# Objective Resolves bevyengine#3277 Currenty if we try to serialize a scene that contains a `Duration` (which is very common, since `Timer` contains one), we get an error saying: > Type 'core::time::Duration' does not support ReflectValue serialization ## Solution Let `Duration` implement `SerializeValue`. Co-authored-by: Jonathan Cornaz <jcornaz@users.noreply.github.com>
Objective
Resolves #3277
Currenty if we try to serialize a scene that contains a
Duration
(which is very common, sinceTimer
contains one), we get an error saying:Solution
Let
Duration
implementSerializeValue
.