导入VideoPlayback示例,去掉SampleUI,将VideoPlaybackTapHandler挂到ARCamera上。接着小小地改动一下VideoPlaybackTapHandler中的代码
protected override void OnDoubleTap()
{
//自己改的
//base.OnDoubleTap();
if (mPlayVideo == null)
{
mPlayVideo = FindObjectOfType
();
}
if (mPlayVideo)
{
mPlayVideo.playFullscreen = true;
mPlayVideo.TryPickingVideo();
}
// Get currently playing video, if any,
// and pause it before the UI menu is opened.
// This is needed in Unity 5 in order to show the UI menu
VideoPlaybackBehaviour video = GetPlayingVideo();
if (video != null && video.VideoPlayer.IsPlayableOnTexture()) {
video.VideoPlayer.Pause();
}
}