Push play in the Unity Editor and your video will start playing on the 2D UI Panel. Be sure to set your panel or canvas size to your preferred size, but be sure to keep a similar aspect ratio to the one you set in the VideoTexture. Materials in the 3D Video Player are covered in Part 2: How to Set Up Unity’s Video Player for 3D Viewing.Īdd the Video Player component to your UI panel, assign the VideoSample file to the Video Clip property on the Video Player.Īssign the VideoTexture to the Target Texture on the Video Player. 367 15K views 3 years ago All VR Tutorial In this tutorial, I will show you how to record and save 360 pictures. This allows you to use a material instead of a texture. Notice there is a material property in the Raw Image property. The Raw Image component allows you to make video players for UI purposes specifically. Select the Panel, remove the Image component in the inspector, and Add Component > Raw Image to the panel, instead.Īssign the VideoTexture to the Texture property on the Raw Image component. Out of the box, the Unity Reflect Viewer allows for quick and easy design reviews on desktop, AR, and VR. This will automatically create a Canvas, with the new Panel inside of it, and an EventSystem in the scene. Right click in the Hierarchy and navigate to UI > Panel. 1920 x 1080 is a common aspect ratio in the size property, but you need to set this to the common resolution of the video files you will be playing. Now that you have both assets in place, select the VideoTexture file. It will redirect you to the Unity archive webpage, in. You can add to or change this later, if desired. Unity VR Tutorial: In Unity Hub, click on Installs (left) and later on Install editor (blue button, right) For this tutorial we’ll use the 2021.2.8f1 version, so we’ll need to click on the Archive tab and click on download archive link (blue text, see image below). Import any sample video files you would like to use into the same Project/Assets/VideoPlayer folder. Right click in the VideoPlayer folder and Create -> Render Texture, naming the texture VideoTexture. You will need to create a folder under the Project/Assets folder called VideoPlayer. First, you will want to set up some structure so that you can find and reference everything you need for setting up the Video Player.
0 Comments
Leave a Reply. |