- Home /
Question by
J_Blyth · May 03, 2012 at 05:08 PM ·
javascriptguiguiskin
Adding GUI Skin to a script in the project library
I am using AddComponent to get a GUI script from the project library but it does not add the custom GUI Skin to it when it loads. Is there a way for me to be able to pre-determine what GUI skin the script uses so it loads in game with the correct skin?
Comment
Answer by ZionGames · Oct 02, 2012 at 09:24 PM
public GUISkin gs;
Void OnGUI() { GUI.skin = gs; }
// just drag your GUISkin onto the variable in the inspector view