统一播放视频后返回菜单

时间:2017-02-20 11:28:41

标签: unity3d

我想在团结播放视频后返回菜单。这是我的代码:

#pragma strict

function Start () {
        Handheld.PlayFullScreenMovie ("Cinderella.mp4", Color.black, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFill);

    }

function Update () {

}

1 个答案:

答案 0 :(得分:4)

Handheld.PlayFullScreenMovie"暂停"执行Unity应用程序后,您可以在调用此函数后立即加载菜单场景:

#pragma strict
import UnityEngine.SceneManagement;

function Start ()
{
     Handheld.PlayFullScreenMovie ("Cinderella.mp4", Color.black, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFill);
     SceneManager.LoadScene("Menu");
}