Hi,
I'm trying to implement a GUIskin into my game, but i keep getting a cannot convert error.
The exact error is "Assets/Scripts/GUISkin.js(6,20): BCE0022: Cannot convert 'GUISkin' to 'UnityEngine.GUISkin'."
Below is my code.
#pragma strict
var mySkin : GUISkin;
function OnGUI () {
// Assign the skin to be the one currently used.
GUI.skin = mySkin;
// Make a button. This will get the default "button" style from the skin assigned to mySkin.
GUI.Button (Rect (10,10,150,20), "Skinned Button");
}
I don't understand why I am getting this error. The syntax appears to be correct.
Thanks
↧