자산 불러오기

1307 단어
#pragma strict



var s1 : GUISkin;

var s2 : GUISkin;



function Start () {

  s1 = AssetDatabase.LoadAssetAtPath("Assets/Amiga500GUISkin.guiskin",GUISkin); 

  s2 = AssetDatabase.LoadAssetAtPath("Assets/MetalGUISkin.guiskin",GUISkin);



}



function OnGUI() {

    GUI.skin = s1;    

    if (GUI.Button(Rect(10,110,70,30), "A button"))

            Debug.Log("Button has been pressed");

            

    GUI.skin = s2;    

    if (GUI.Button(Rect(110,110,70,30), "A button"))

            Debug.Log("Buwwerwqqq");

}

좋은 웹페이지 즐겨찾기