- Home /
Question by
G_Sacristan · Aug 15, 2011 at 03:26 PM ·
resources.load
Get file in project using it's path
Hi...
i would like to add a GUISkin to variable by using path to it: Assets/GUI.guiskin
Could someone write a code snippet for me?
Something like this
private var guiSkin: GUISkin=GetFile("Assets/GUI.guiskin");
Comment
Best Answer
Answer by Statement · Aug 15, 2011 at 03:35 PM
Use Resources.Load. Your skin must be in the resources folder (read the info in the link).
private var guiSkin : GUISkin;
guiSkin = Resources.Load("YourGUISkin", GUISkin);
Your answer
Follow this Question
Related Questions
Resources.Load Instantiate Yield problems 1 Answer
Reading binary file from Resources folder 2 Answers
Overwrite an Object's AudioSource's AudioClip? 0 Answers
Resources.Load makes Featureless Oddity 0 Answers
Resources.load absolute path 2 Answers