Hi!
I have a Resources folder with different prefabs inside but most of them have similar names like “ball_1” “ball_2” and “cube_1” “cube_2”. I want to load the Resources in my C# script to put them into an array, but i want to sort the different objects into their own arrays so that the balls are in one array and cubes in the other.
So far I only load all of them in with
myballs = Resources.LoadAll<GameObject>(resourcesPath) as GameObject[];
but it loads all the GameObjects from the resources folder, so when i add the follwing i just get Errors.
myArmors = Resources.LoadAll<GameObject>(resourcesPath + / + "ball") as GameObject[];