GUI.Skin Fade?

How would I do a GUI.Skin fade? , I know how to do a button, scene and a GUI Fade but for me its really impossible to fade the GUI.Skin.

And I already searched google for this… no answers.

This is my current code:

using UnityEngine;
using System.Collections;
public class GUI_Button : MonoBehaviour {
	public bool debugMode = false;
	public string title = string.Empty;
	private float alpha= 1.0f;

	public Texture2D buttonImage = null;
	public Rect position = new Rect(15,15,150,150);
	public GUISkin skin = null;

	void Update () {

	 void OnGUI() { =  skin;
		if(debugMode || Application.isPlaying) {
			if(GUI.Button(position, buttonImage))
				transform.position += new Vector3(0, 1.5f, 0);


This is my other code where I spawn the GUI.Skin

using UnityEngine;
using System.Collections;
public class Pause : MonoBehaviour {

	float count=0.5f;
    public GameObject myCube;
    public Vector3 spawnSpot = new Vector3(0,2,0);

    void Start() {
    void Update() {
		if(Input.GetMouseButtonDown(1)) {
			  GameObject cubeSpawn = (GameObject)Instantiate(myCube, new Vector3(0,2,0), transform.rotation);
		} else {
			if(Input.GetMouseButtonUp(1)) {
			        Destroy(GameObject.Find("lolz(Clone)"), 1);


Before I answer your question with a link to the documentation, I’d like to note a couple things :slight_smile:

-Before posting on Unity Answers with code, you should spend a little time making the code readable. 5 consecutive empty lines, incorrect indentation and a complete lack of comments makes it very hard to understand what you are doing (in general)

-A GUISkin is simply a container for images and settings used when rendering GUI elements. A GUISkin cannot be “spawned”, neither does it have the ability to “fade” or be “faded”. It is simply a container of information. Nothing more, nothing less…

Now for the most probable answer:


Hope this helps,