It seems that using subfolders inside Resources no longer works with Resources.Load
Examples:
Works:
var ind = Instantiate(Resources.Load(“Indicator”, typeof(GameObject))) as GameObject;
Folder structure:
Resources
— Indicator.prefab
According to this and a few other sources, this should work, yet it doesn’t:
var ind = Instantiate(Resources.Load(“UI/Indicator”, typeof(GameObject))) as GameObject;
Folder structure:
Resources
— UI
— — Indicator.prefab
The documentation says:
The path is relative to any Resources folder inside the Assets folder of your project, extensions must be omitted.
If it’s relative, then it should be working.
The only other way I’ve found to be able to organize the assets is to put a “Resources” folder inside every asset category. This really doesn’t seem ideal to me, and will most likely result in a mess:
var ind = Instantiate(Resources.Load(“Indicator”, typeof(GameObject))) as GameObject;
Folder structure:
Resources
— UI
— — Resources
— — — Indicator.prefab
Does Unity really not support subfolders inside Resources anymore? Or am I doing something wrong? I’ve been trying to wrap my head around something I must be doing wrong, but it’s getting quite frustrating and I’ve found no reason for it not to work.
Additionally, I’ve tried posting this issue on the Unity Support forum, but everytime I click on Submit New Thread, it does nothing and takes me to the forum.