Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Why am I getting a cannot convert error?

$
0
0
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

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>