I’m slowly going insane (by Vaas’ defineeeetion of insanity at least); I am making a game similar to Bit.Trip: Beat as a fun little side project, but this problem I can’t seem to fix and the internet isn’t helping!
I have a list that acts as a queue for when to spawn different types of entities, e being a string of one of those variables in the list, and I want to load them dynamically so I can avoid a ridiculous amount of if/else statements that I no doubt will have.
this is the line of interest:
GameObject p = Resources.Load("Prefabs/" + e.z);
Whenever I try to Resources.Load
with a variable (even if it’s a string that I KNOW is right,) it will spit out an error of the prefab being null, but when I use
GameObject p = Resources.Load("Prefabs/Basic Pip");
‘Basic Pip’ being the name of the current test entity, it will work fine!