GUISkin from example code not working

I am looking at this example code: GitHub - facebookarchive/friendsmash-unity: Unity Friend Smash Sample

There is a GUISkin in there called MenuSkin.guiskin which is supposed to emulate a facebook themed dialog.

I copied that file into my project, assigned it to a GUISkin variable then in my OnGUI I made a simple button like so:

if (GUI.Button (new Rect(), “hi”, MenuSkin.GetStyle(“menu_button”))) {

}

But the text is just fully white with no facebook themed stuff. Why doesn’t it work?

Try applying the GUISkin globally and see what happens, like this:

GUI.Skin = skin;
1 Like

That worked, thanks a lot