- Home /
Load resource from else than Resources folder
I had problems with getting a Texture2D loaded before I discovered that you must use the `Resources` folder in order for the `Resources.Load` to work. I don't like this.
I want to load resource from anywhere in the project. In future, I'll also want to load from external folders actually (for game Mods). Can I hack the Resources
to load the file from the Assets
root?
If not, how could I re-invent the Resources.Load
so that it serves my purpose?
Damn, the Markdown here really sucks. Look at those apostrophes in links...
Answer by robertbu · Nov 13, 2014 at 08:28 AM
Resources must be loaded from a resources directory. And the Resources folder does not exist in a build. Everything is rolled into an internal, read-only database. For reading textures, you can use the WWW class (for both local images and web images). The only folder that exists both in the editor and builds is StreamingAssets:
And how can I get Unity to create the folders with files? Or can I refference the project paths (Assets/Unit/Textures...)?
Your answer
Follow this Question
Related Questions
Loading a mesh? 1 Answer
Profile startup resources? 0 Answers
Finding resources folder on iOs 3 Answers
Resource.load general question 0 Answers
2D Infinite Runner questions 3 Answers