Improve _with
Opened this issue ยท 0 comments
Brian-ED commented
_with is implemented in a lot of places, like texture._with. It loads a texture for a function ๐ to use and then unloads.
The benifits are less mistakes since you now can't forget to unload. The negatives are that it gets ugly when nesting a lot to load multiple textures.
A few solutions exist, like making _with map over ๐ฉ to load multiple textures, but how do you load a texture to be used for the next few frames and then unload then? what about if you don't know when you'll need to unload? I was thinking you could use recursion to solve this, but i'm unsure of a good solution.