unity 背景 按鈕 場景跳轉

2022-07-31 00:03:15 字數 578 閱讀 9328

public texture2d pic;

private bool cl = false;

void ongui()   

gui.drawtexture(new rect(0, 0, screen.width, screen.height), pic);        

guistyle style = new guistyle(); //例項化乙個新的guistyle,名稱為style ,後期使用        

style.fontsize = 50; //字型的大小設定數值越大,字越大,預設顏色為黑色        

style.normal.textcolor = new color(0, 2, 4); //        

guilayout.label("太空大戰",style);

if (guilayout.button("開始遊戲"))

cl = true;

if (cl)

檔案中有兩個場景  c1  c2

方法二

button按鈕跳轉頁面

頁面一 button按鈕onclick事件 var page localizer.aspx?mastertable 表名 usetype add formname 跳轉到表單名 relationtype 引數1,引數2 relationvalue 引數一,引數二 跳轉語句 var getstring...

unity 場景載入

gui.draw texture 繪製紋理 static function drawtexture position rect image texture scalemode scalemode scalemode.stretchtofill alphablend bool true,imageas...

Kinect跳轉場景

其實網上一查就能查到了,這裡只是給總結一下,親測有效 首先先說kinect自帶的跳轉場景的demo,你去看可能覺得很好啊,沒有問題,那是他沒有跳轉回到第乙個場景,我們在做遊戲的時候經常要回到主介面的,在kinect自帶demo中,如果你讓他回到第乙個場景,那麼你會發現kinectmanger還是會疊...