Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
5
Question by Luke · Dec 12, 2009 at 08:45 PM · graphicsvideorenderermovietexture

How do I play a full screen video?

I would like to have a video play in full screen on a trigger.

Anyone know how to do it?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Luke · Dec 14, 2009 at 02:53 AM 0
Share

from: http://unity3d.com/unity/features/audio-and-video

3D Audio and Video Play back video on any surface in your game, or directly in full-screen. Sync or syncopate audio and video.

I assumed this was a little more straight forward.

avatar image cregox · Oct 24, 2012 at 12:52 PM 0
Share

may be related: http://answers.unity3d.com/questions/25660/load-movie-realtime.html

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by baha · Mar 06, 2010 at 01:09 AM

I think you may want to draw a GUI Texture with the size of the screen and asign the movie texture to it with a scale mode = stretch to fill, use the following ( i guess) :P

GUI.DrawTexture(Rect(0,0,Screen.width,Screen.height),MovieTexture,ScaleMode.StretchToFill);

then play the movie texture using MovieTexture.Play();

you may also want to set Screen.fullScreen = true;

and hide the cursor using Screen.showCursor = false;

and when Escape is pressed and released you may want to re-show the cursor and minimize the screen to its original location:

function Update() {
    if (Input.GetKeyUp(KeyCode.Escape)) {
        Screen.showCursor = true;
        Screen.fullScreen = false;
        // in webplayer the fullscreen mode is automatically escaped when "Escape" is pressed
   }
}
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by jester · Dec 13, 2009 at 06:04 PM

i can't test this since i don't have unity pro (so apologies if i'm answering out of turn), but this page tells how to set it up:

http://unity3d.com/support/documentation/Manual/Video%20Files.html

you should be able to create a new camera and a cube off screen from your main camera. scale the cube to fill the screen space of the new camera and attach the movie texture to it. when your trigger script fires off, disable the main camera and then activate the new camera. through that same script, tell the movie to start playing. that should get you an full screen cutscene effect.

To let your player run in full screen, set Screen.fullScreen to true.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
-2

Answer by pkamat · Dec 13, 2009 at 06:00 PM

Humm just a shot in the dark, I would create a plane with a movie texture and place it right in front of the camera. here is the pseudo code.

On each tick - Convert screen pos (width/2, height/2) to world position using ScreenToWorld() - translate the plane with the texture to the world position above - set plane direction to -camera.forward

so no matter where how the user moves he will always see the video in front of him :)

hope its clear...

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image duck ♦♦ · Dec 13, 2009 at 10:39 PM 0
Share

I don't think this is a good idea. Even if you wanted to keep a plane in front of a moving camera, it would be a better idea to just parent the plane to the cam, rather than keep updating its position via code. But really, you should consider using a 2nd cam, or one of the GUI methods of displaying a texture on-screen. (will write a fuller answer if time permits)

avatar image
-3

Answer by amr nasr · Jul 26, 2010 at 09:51 PM

Can you write the full script please?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image yoyo · Jan 01, 2011 at 06:09 PM 1
Share

UnityAnswers helps those who help themselves. Try the suggestions, read the documentation, poke around, learn some things. If it doesn't work, post pieces of what you have and ask more questions. Rinse and repeat.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

2-3 MovieTexture from same file, bug ?? 2 Answers

Render a camera multiple times in a single frame? 1 Answer

Playing Video on a Game Object 2 Answers

Knowing the position 1 Answer

Draw 2D onto a 3D surface 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges