i am trying to make a simple gui for my game(its called “Apocalypse”), but i dont like the gui skin wich unity uses. i am pretty sure thers a way to change it but i dont know how.
please help me, the faith of the apocalypse depends on you
You can create a new GUISkin asset from the editor (menu: Assets > Create > GUI Skin) and edit its settings. Then, in your GUI script set the GUI.skin property to your new skin:-
var newSkin: GUISkin; // Assign this in the inspector.
function OnGUI() {
GUI.skin = newSkin;
}
I’m lost here. Where do I put that code? Does this involve creating prefabs? Is this only available in Pro? I’ve got a picture of where I’m at but no clue how I’m supposed to run the code you’ve got written.
You can run that code by putting it in a JavaScript file and then attaching that file to a GameObject. Typically, you would create an empty GameObject in the scene (menu: GameObject > Create Empty), and add your GUI code to that.
I have done this but the skin in the inspector doesn’t seem connected to the code. I’m assuming newSkin is what you name the asset as well? What am I missing?