- Home /
Menu to game play JAVA Script
I am developing a small game.
I will get straight to the point.
What I am trying to do is. When the game starts A video will play on a cube that will read as a animated texture. This is one scene. I have a other scene that is my main menu that will show up right after the video is finished playing.
What do I have.
What code to i need to write, to go from one scene to the other when clicking on a item, or after a time based.?????
Do you have Unity Pro? You can't do a movie as a texture in Unity Basic.
Answer by aiibee · Nov 07, 2012 at 11:16 PM
H3y,
First, thank you for your responds, love to meet new people and share information.
However, I have unity pro, the code did work, but my audio is not playing. I have saved the audio separately, and I have attached the audio to the cube(plane). It works but it is of sync.
Also, the quality of the video seems a little washed out. Will this change once i actually make a build>?
I was researching and I came across a different approach to execute this. Its with GUI. It allows you to call in a video as well, but not sure how to approach it, or what code to use.
Regards, Aldin B
Firstly, if you're not actually answering a question, you should use the "add new comment" button ins$$anonymous$$d of "post your answer". Neither of your posts are answers.
The audio and video are separate. One is an audio file, and one is a texture. You need to start them at the same time for them to be in sync.
The video quality is "washed out"? Are you texturing something with your video, and if so, how are you lighting it?
Answer by aiibee · Nov 08, 2012 at 08:21 PM
"The video quality is "washed out"? Are you texturing something with your video, and if so, how are you lighting it?"
well i am using the video texture assigned to a cube as a in game cut scene. When i watch the video outside unity, it looks clean and sharp, when i play and test the video in unity it looks washed out, and the quality is low. like it is being compressed.
Please start using "add new comment", like I've done here. It keeps conversations making more sense.
Videos in Unity are compressed, using Ogg Vorbis compression. You can change some settings of how compressed they are, but there will always be some. An uncompressed video is too large to be usable.
Do you have lights in your scene? Are they shining on the cube? What shader are you using on the cube?
I have no lights, I have set the material to self illu$$anonymous$$e. If i don't I would need a light in the scene.