- Home /
Best practices : PersistentDataPath or Resources folder ?
Let me explain my project in detail. I am making a 2D game which allows players to create their own characters by importing spritesheet in PNG/JPEG files to the game, and then edit its animations, etc... in an in-game editor.
Actually, I can import images, but I am hesitating on where to import it : in the PersistentDataPath or the Resources folder ?
Please note that these imported files will be used to create multiple Sprites gameobjects and animations (is such a thing possible to make anyway ?)
Thanks in advance.
Answer by tanoshimi · Nov 05, 2016 at 10:42 PM
You can't add to the Resources folder after your game is compiled, so that's not an option (and, even if it was, Unity Best Practice is very clear to avoid using the Resources folder at all).
So you'd need to save imported textures somewhere else (persistentDataPath seems a reasonable choice) and load them in using the WWW class.