Closed janhohenheim closed 2 months ago
Yeah, we can have serde impls.
bevy_tween does not export serde derives.
I'm not sure what this means though. The crate doesn't even have a dependency on serde
yet.
Edit: I just realized bevy_reflect derive should've automatically derive Serialize and Deserialize?
I just realized bevy_reflect derive should've automatically derive Serialize and Deserialize?
That's can only be used with ReflectSerializer
, TypedReflectDeserializer
, and UntypedReflectDeserializer
seems like. All types in the crate implements Reflect
so we can deserialize and serialize them this way. Would this work?
I'm not sure what this means though. The crate doesn't even have a dependency on serde yet.
Yeah, that's what I meant. Sorry for not being clear 😅
All types in the crate implements Reflect so we can deserialize and serialize them this way. Would this work?
In theory, but what I'm trying to do is to just register a GameConfig
struct in bevy_common_assets
, which expects the whole struct to be at least Deserialize
.
Alright, 7ae79621e296d2074d9bb6fe8863880b1030543e is merged. I've tried to implement Serialize and Deserialize on other types but seems like only EaseFunction
is the only one that make sense 🤔. I guess I'll be implementing serde on a request basis.
Thanks a bunch :D
I'd like
EaseFunction
(and maybe other types?) to implementSerialize
andDeserialize
so that I can configure my easings in an external config file. Currently, I have to use remote derives to work around the fact thatbevy_tween
does not exportserde
derives.