Allow custom deserialization of ldtk files - #304
Conversation
|
So this seems to me like it would actually be a good use-case for bevy's relatively new asset preprocessing features. I'm not an expert on it but I think basically what could work for this plugin is a new asset settings type. something like... enum LdtkProjectFormat {
Json,
Bincode,
}
struct LdtkProjectLoaderSettings {
format: LdtkProjectFormat
}Then that would be the associated Then we could write an At least, I think that's the necessary steps to implementing a custom pre-processor. It seems like being able to use an enum of formats in a |
|
Ooooo. I like that idea! Instead of an enum tho, could you pass a function pointer to the |
|
Potentially related to #334 |
|
Hi @StratusFearMe21, sorry for taking so long to return to you here. Are you still interested in this? To be honest, I'm a little hesitant. It's a simple enough change, but it doesn't feel to me that many users are interested in changing their data format. I was thinking about the best way to support this with preprocessing, but either way it gets complicated to support in an official capacity with the existence of external levels. We'd want to save the bincodified external level files to a different location, but that breaks the paths to external levels specified in the LDtk project file. |
This PR makes it possible to load Ldtk files that you have preprocessed, for example by re-serializing the file using
bincodeand compressing it.