如何在Unity中为桌面VR应用程序逐帧显示360视频?

Dee*_*ewy 6 unity-game-engine virtual-reality 360-panorama 360-virtual-reality

是否可以通过事件控制360度视频在时间上向前或向后移动(帧+/- 1),例如按下控制器按钮?

这里的想法是从视频中提取环境.视频不应该播放.按下按钮时,我们可以转到下一个/上一个帧.

有关于此的一些文件吗?我只找到了Skybox-PanoramicBeta.shader.

小智 2

您是否尝试过通过暂停视频并设置帧来实现此目的?

https://docs.unity3d.com/ScriptReference/Video.VideoPlayer-frame.html

VideoPlayer.frame 
public long frame;
Run Code Online (Sandbox Code Playgroud)

VideoPlayer 当前显示的帧索引。剪辑的第一帧的值为 0,第二帧的值为 1,依此类推。

https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.html

你能尝试一些类似的事情吗?

public long currentFrame; // something to hold the frame that's currently paused
VideoPlayer.Pause(); // pause the video
currentFrame = VideoPlayer.frame; //set the current frame to the current frame
// then when you want to move to the next frame
void PlayNext()
{
    VideoPlayer.frame = currentFrame + 1; //set the frame being played to one more than the one saved
}
Run Code Online (Sandbox Code Playgroud)