Closed edouardpoitras closed 2 years ago
A few things maybe worth discussing: 1) Should we put a recursive depth limit? 2) I didn't bump the version - maybe worth going to 0.2.1? 3) A better/cleaner approach that I didn't think of? 4) Adding a parameter to with_dir/with_dirs instead of the two new variants with_dir_recursive/with_dirs_recursive? This would mean breaking backwards compatibility though.
- Should we put a recursive depth limit?
I don't think so. It could result in undefined behavior (unless we allow them to set the limit themselves, in which case, recursive_loading
should probably be replaced with an Option<u8>
).
- I didn't bump the version - maybe worth going to 0.2.1?
Yeah, I'll bump and publish. Hoping to work on a version 0.3 release for Bevy 0.6 soon.
- A better/cleaner approach that I didn't think of?
I find this approach pretty clean myself. If you want to add the recursion limit, that would be nice as well, but not super necessary at the moment.
- Adding a parameter to with_dir/with_dirs instead of the two new variants with_dir_recursive/with_dirs_recursive? This would mean breaking backwards compatibility though.
I'm okay with the methods. I'd rather not add parameters to the others if we can help it (especially if those values are always typically going to be true
or false
, depending on the user's preference).
Great! Thanks.
Not sure this PR is the cleanest way of doing it, but I needed that capability and it works on my end. Please provide feedback and request changes as needed.