顯示具有 scene 標籤的文章。 顯示所有文章
顯示具有 scene 標籤的文章。 顯示所有文章

2019年6月16日 星期日

Unity 學習筆記 - 等待一段時間後才載入場景

直接上程式碼


public void NextLevel()
    {
        // 播放音效
        audioSource.Play();
        // 獲取音效時間長度
        float audioTime = audioSource.clip.length;
        // 獲取當前場景編號
        int index = SceneManager.GetActiveScene().buildIndex;
        // 播放完音效後才載入下一個場景
        StartCoroutine(DelayAndLoadScene(audioTime, index + 1));
    }

private IEnumerator DelayAndLoadScene(float time, int sceneIndex)
    {
        yield return new WaitForSeconds(time);
        SceneManager.LoadScene(sceneIndex);
    }

2019年6月11日 星期二

Unity 學習筆記 - 場景轉換


程式碼:

public void ChangeToScene(int sceneIndex)
    {
        SceneManager.LoadScene(sceneIndex);
    }

sceneIndex 為在 Build Settings Scenes In Build 場景的排序號碼

如下圖紅框處:



[Android][App] Pin Poke Challenge 隱私權保護政策

非常歡迎您使用「 Pin Poke Challenge 」,為了讓您能夠安心使用此 App 的各項服務與資訊,特此向您說明 Pin Poke Challenge的隱私權保護政策,以保障您的權益,請您詳閱下列內容: 一、隱私權保護政策的適用範圍 隱私權保護政策內容,包括...