Hey!
I’m trying my best to make my game moddable/more scalable and in doing so I want to Load some spritesheets from the resources folder so that a user (or me) could replace them (it’s also not clear to me how the users will be able to add their own .pngs and where I should find them).
The approach I’ve settled on is to have My default spritesheets in a resource folder in my project, and check at startup if any other folder besides “Default” contains the required sprites and load them instead. I know this is counterindicated but my sprite sheets are very small (pixel art) and I figure that it wouldn’t impact loading time too much. The kind of modding I’d like to achieve would be like Kerbal Space Program, where each mod is a folder in the game directory.
However, the problem I run into is that my spritesheets load fine as I filled the import settings in the editor, but when loading the custom ones I don’t seem to have the option to load them as sprite sheet or detail the size of each sub-sprite. No matter what I would still need to modify the pixel-per-units of individual spritesheets as I have a custom LOD system that switches between different spritesheets depending on camera proximity.
I tried looking into TextureImporterSettings but SpriteImportMode only accepts single or manual.
I’m considering instead having all sprites being singles and load them dynamically through naming conventions or through an atlas file (like a .csv or something like that) to details which files belong together. However, that seems less than ideal and doesn’t play that well in the scalability/ ease of modding I’m aiming for).
If you have any insights on how to do this, or what solution I can pursue if I sacrifice certain parts of what I’m aiming for, it would mean the world to me.
Thanks a lot!