Hi, I’m struggling to get a list of the textures found in the Assets/Resources folder of my project using Resources.LoadAll. Here are the pertinent parts of my script:
var clientName : String;
clientName = "ClientX";
function Start ()
{
var textures : Object[] = Resources.LoadAll(("Textures/ClientArt/"+clientName), Texture2D);
var tex : Texture2D;
for (tex in textures)
{
print ( tex.ToString );
}
}
Just as a test I’m printing the result to the console. Here’s the result I get (I placed only one texture in the ClientX directory):
CompilerGenerated.loadResourceTest_Start$callable1$17_29
UnityEngine.MonoBehaviour:print(Object)
Not what I was hoping for, which is the actual name of the texture object. What do I need to do differently? Thank you.