3d Video switch to full screen playback

Source: Internet
Author: User

Project: Play a small-window video in a 3d scene, click on the video, and zoom in to full screen video. Then click on the video and zoom out for the original small window of the video to continue playing the video.


1.unity3d, play video in three-dimensional scene, put the video component under the corresponding plane, adjust its position, zoom, rotate.

2. Place the world-space UI canvas Button on the plane attached to the video, in the same size, in a transparent state, noting that the Ugui image component cannot remove,button the clicked effect can be set to none.

3. Play the video in full screen, you need to join the screen UI Canvas, add the child node raw image component, and then add the aspect ratio fitter component to adapt the RAW image UI to the screen, proportional to the aspect ratio of the video.


4. Important: The phone vertical screen shows the video as normal video (such as 1024*720), the mobile phone horizontal screen display video is clockwise rotation of the video, such as (720*1024).

The texture of 5.raw image gets the texture of the original video for each frame, and the material is also set to the material of the original video so that the video can be displayed on the screen UI.

6. After the full screen button is the child node of the raw image, anchors settings, click Alt Set the position full parent UI. Also set the effect of the button on the original video.

7. Two buttons simply accept the button-down trigger control, and do not care whether the object being controlled or not. In fact, the video only has to be loaded to make the button trigger valid.

8.Button State flow control, the attached game object whether disable or enable should go back to the initial state, accept the trigger of the click, and then send a message.

9.button the message receiver, only the corresponding state response is migrated state instead of the global event direct migration to perform the next state.

3d Video switch to full screen playback

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.