i need a little help here, i would like to define few
GUIStyles that i will be using across the project. where is safe to define them? in separate script, and how will i use them then?
thanks!
i need a little help here, i would like to define few
GUIStyles that i will be using across the project. where is safe to define them? in separate script, and how will i use them then?
thanks!
If you want a consistent look for the GUI across the game, you should probably consider using a GUI skin. This is an asset that you can edit in the inspector. You can use it in any script by creating a variable of type GUISkin and then dragging the asset to that variable. Within the script, you just need to assign the GUISkin to the GUI.skin property:-
var mySkin: GUISkin;
function Start() {
GUI.skin = mySkin;
}