如何使用 Google Cardboard SDK for Unity 创建 VR 视频播放器 [英] How to create VR Video player using Google Cardboard SDK for Unity

查看:32
本文介绍了如何使用 Google Cardboard SDK for Unity 创建 VR 视频播放器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了统一,我刚刚下载了 Google Cardboard SDK.我很好,能够创建 VR 项目.设置很好,一切正常.

I just downloaded Google Cardboard SDK for unity. I am fine and able to create VR project. Setup is fine and everything is working fine.

我是 VR 应用的菜鸟.刚刚涉足 VR 应用.

I am noob at VR Apps. Just stepped in VR Apps.

我打算为安卓创建自己的支持 VR 的视频播放器,就像默认的 Google Cardboard Youtube 播放器一样.

I am planing to create my own VR Enabled Video Player for android, Just like the default Google Cardboard Youtube player.

谁能给我建议一个链接或指导我开发这个应用程序.

Can any one suggest me a link or can guide me in developing this app.

推荐答案

Scott Driscoll 的回答完全有效.我在让 Easy Movie Texture Unity 插件为我工作时遇到了一些最初的问题,但最终弄明白了,它完美地工作.现在,我在 iPhone 6 的球体内部以纹理的形式运行 360 度全景视频.我不得不说,我认为这不会发生.

Scott Driscoll's answer totally works. I had some initial problems getting the Easy Movie Texture Unity plug-in to work for me, but finally figured it out, and it works flawlessly. I now have 360-video running as a texture on the inside of a sphere on my iPhone 6. And I have to say, I didn't think it would happen.

为了在 Mac 上工作,这是我所做的:

For working on a Mac, here's what I did:

  1. 从 Unity Asset Store 下载 Easy Movie Texture 插件
  2. 从 Assets/EasyMovieTexture/Scene 打开 Demo Sphere 演示场景
  3. 为您的项目创建一个新的(空的)预制件,并将球体游戏对象从演示球体场景拖到预制件上.
  4. 重新打开 Cardboard 场景并将新的视频球预制件拖到您的层次结构中.
  5. 在 Quicktime 中打开源 360 视频
  6. 文件 -> 导出 -> 720p
  7. 将文件扩展名从.mov"更改为.mp4"
  8. 将您的新 mp4 文件拖到您的项目 Assets/Streaming Assets 目录中.注意:不要通过菜单系统导入,因为这会强制 Unity 转换为 OGG.
  9. 在 videosphere GameObject 的Media Player Ctrl"脚本组件上,找到Str_File_Name"字段并提供完整的文件名.确保将扩展名包含在字符串mymovie.mp4"中.

很确定这就是一切.希望它可以帮助其他人解决这个问题.感谢斯科特·德里斯科尔!

Pretty sure that's everything. Hope it helps other folks stuck on this problem. Thanks Scott Driscoll!

最后一点,您只能在手机上查看视频,不能在编辑器中预览.如果它不这样工作会更好,但实际上一旦解决了最初的分辨率和放置问题,我真的不需要每次在编辑器中运行场景时都看视频.

One last note, you can only view the video on the phone, not in preview in the editor. It would be better if it didn't work this way, but really once the initial issues of resolution and placement are resolved, I don't really need to see the video every time I run the scene in the editor.

这篇关于如何使用 Google Cardboard SDK for Unity 创建 VR 视频播放器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆