x


Resources.Load folders path?

Hi, Im trying to load a resource Textures with script, this works ok except that i cant load the texture from a folder called "letters" that i put inside Recourses. How can i set the folder path ? Also, will this work with a String variable ?

renderer.material.mainTexture = Resources.Load("StringVarAaLetter"); ?????

TY

more ▼

asked Dec 28 '11 at 03:36 AM

amit-chai gravatar image

amit-chai
83 8 10 13

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

if StringVarAaLetters is in the path "Resources/letters/StringVarAaLetter":

  string texturePath = "letters/StringVarAaLetter";
  renderer.material.mainTexture = (Texture)Resources.Load(texturePath, typeof(Texture)); 
more ▼

answered Dec 28 '11 at 05:27 AM

Rod Green gravatar image

Rod Green
2.9k 3 9 42

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x455
x245
x223

asked: Dec 28 '11 at 03:36 AM

Seen: 3203 times

Last Updated: Dec 28 '11 at 05:27 AM