- Home /
GUI Skin not included when built
Hey everyone, I have recently been building my game to give to other people for testing, and I have a script that has a GUI Skin that is passed in through the editor and used for a menu. When I build the project and play it the GUI Skin is not applied to the menu like it is inside Unity. Anyone got some ideas?
Answer by Nikola-B · Jun 30, 2014 at 06:59 AM
Unity only includes assets (likes skins for instance) that are referenced in a scene when your a creating a build. In order to tell Unity that you want certain assets to be included because you are planning on loading those at runtime, they must be contained in a folder named Resources.
http://docs.unity3d.com/Manual/LoadingResourcesatRuntime.html
Seems very strange that they do that for only certain things like this GUI Skin, but thank you because it worked. Also to sum up the changes for anyone reading: Put the GUI skin in a folder you make called Resources, then use something like the following in your code: skin = Resources.Load("Selection GUISkin");
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Build completed with a result of failed (can't build my android game) 2 Answers
Mouseover using GUI.Tooltip 0 Answers
How do I make my menu slide into the screen? 0 Answers
Script work in editor but not in build 0 Answers