Answer the question
In order to leave comments, you need to log in
How to play video in Unity VR (Cardboard)?
Hello, the task was to launch a 360-degree video in the game so that the player could move his head, thereby watching this video. If someone knows how to do this (without buying plugins from the Asset Store), then I will be very grateful. And also what video format you want to add to the project, as I understand it, MovieTexture will be used, on which the video will hang.
Thank you all in advance for your answers, this is my first experience with VR.
Answer the question
In order to leave comments, you need to log in
Unity 5.6 , which came out today,
has 360 video support out of the box. The documentation on the site has not been completely updated yet, but you can use it. Support for all VR platforms is also there.
https://docs.unity3d.com/ScriptReference/Video.Vid...
https://docs.google.com/document/d/1gZa5z_jEEETDk8...
As a matter of fact you argue, MovieTexture is necessary. and translate the texture from it into the material.
Natively supported videos so that codecs are not added)
it is most convenient to have an mp4 container of some kind with h.264 + AAC inside.
Well, in fact, it’s still a plugin from the asset store that can work with the native implementation of the video player for the axis (andra and ios) and it’s not unimportant to play video streams from a memory card, etc. (and the texture movie should be parsed in advance and added to the project)
The principle of the plugin (suddenly decide to dig and write your own) essentially boils down to
- create a native player activity
- "feed" it a video
- receive a texture from the video player (of the same activity) (frame)
- drag this texture onto the antisphere (for 360)
(spice it all up with shaders for rendering and wrappers for working from unity)
But just to clarify, I’ll clarify once again that in fact the plug-in for 70 - 150 bucks will save you time (and money more than its cost)
And another moment MovieTexture support will soon stop in Unity, they are rolling out a new api for video in version 5.6, and the old one will be covered up as super inconvenient and almost useless ((
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question