- Home /
I think I abuse of Ressources.load
Hi, guys!
Ok so I'm a bit confused about Ressources.Load. I actually use it quite a lot and everyone seems to see this feature as pure evilness. In this documentation, it's even written "Don't use it". I searched a lot about this and found this post. It mostly says to use Ressources.Load only for rare assets, otherwise, performance could/will be harmed.
I can see why this could be a "bad" thing to use, but honestly, I don't know how not to use this in my situation.
Lets say I have a game with ~10 different races with couples of units per race. The user chose it's race and start the game. At this point, it seems normal to me to Ressource.Load only the assets related to this specific race, and not the other ones...
Also, let's say you have a combat scene, with many possible environments (ie: winter, forest, desert, etc.). Again, I wouldn't want to load anything else than the one I'm fighting on. So using Ressources.Load seems the perfect tool. No? Am I missing something important about Unity or what?
Thanks a lot
Answer by ShadyProductions · Aug 10, 2017 at 10:27 AM
Should be fine aslong as you do all your loading in the beginning of the game scene on loading transition, and not during gameplay itself.
Answer by Ignivome · Aug 11, 2017 at 06:14 PM
Thanks for your reply @ShadyProductions. I actually asked the same question on Stackoverflow, and had a really good answer.
As mentionned in Unity Documentation, Use of the Resources folder makes fine-grained memory management more difficult. So if I load my stuff via Ressources.load, will Unity have problem with that even if it's in the beginning. Does the caching work the same way?
Thanks
Your answer
Follow this Question
Related Questions
Resources.Load() Asset Management 0 Answers
Standalone Build - Do not bundle resources (just create a folder) 0 Answers
How to properly load textures? 2 Answers
Altering prefab at runtime. Works in editor, not in build. 2 Answers
Resources load on editor 0 Answers