獲取方式就我所知,有兩種:
第一種:if (Input.Getkey(KeyCode.xxx));
第二種是獲取Unity自帶的方法,
float x = Input.GetAxis("xx");
xx必須和場景內的名稱保持一致,
實體化寫法:GameObject.Instantiate(預設物,起始位置,最終位置);
切換(跳轉)一般寫在Update里面,
if(Input.GetKey(KeyCode.xxx))//獲取觸發跳轉的方式
SceneManager.LoadScene("xx");
xx是要跳轉到的場景的名稱,
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/344863.html
標籤:其他
