Hello,
Can anyone help me with this?
So basicly i want to add a gui selection in the inspector where you can assign the gui style.
Thanks!
using UnityEngine;
using System.Collections;
public class DemoControl : MonoBehaviour
{
public Texture2D pauseIcon, menuBackground, resumeButton, restartButton, fullscreenButton, muteButton, quitButton;
public GUISkin;
private const float cornerTextureSize = 48.0f;
private const float menuWidth = 200.0f, menuHeight = 241.0f, menuHeaderHeight = 26.0f, buttonWidth = 175.0f, buttonHeight = 30.0f;
private bool fullScreenAvailable = false, quitEnabled = true, directKeyQuit = true;
public static void Restart ()
{
DemoControl instance = (DemoControl)FindObjectOfType (typeof (DemoControl));
if (instance != null)
{
Destroy (instance.gameObject);
}
Time.timeScale = 1.0f;
Application.LoadLevel (0);
}
public bool AudioEnabled
{
get
{
return PlayerPrefs.GetInt ("Play audio", 1) != 0;
}
set
{
PlayerPrefs.SetInt ("Play audio", value ? 1 : 0);
UpdateAudio ();
}
}
*(REST NOT REVELANT)*