- Home /
Movie cutscene how to?
Hey, is it possible to import and movie file and set up a scene like and cutscene, is so how? if not how would I go about getting the same effect?
Answer by Persona · Oct 11, 2010 at 01:39 PM
Movie textures if you have Pro edition.
http://unity3d.com/support/documentation/Manual/Video%20Files.html
Otherwise you'll have to wing it. You can set up cutscenes using triggers to activate certain cameras and movements, but I'm no expert in that department.
Answer by Randycooper · Sep 02, 2010 at 01:33 AM
Well If you have Unity 2.6.1 you can not put a movie file in. If you have Unity pro you can if I were you I would put together a ton of pictures and animate them. Like what they do cartoons.
Answer by name111 · Sep 24, 2010 at 09:24 PM
well sense randycooper says you cant add a video
you could do pictures or create the animation in unity or a similar program like cinema 4d then simply trigger the animation in the game
(although i cant figure out the exporting animation part)
Answer by Simon Wittber · Jan 06, 2011 at 04:00 AM
The way we have tackled this problem seems to work well.
Construct your cutscene in a separate level. The level should be built in a special way, so that all the GameObjects in the level are parented under one main GameObject which has a name like "CutScene1". Make sure all the GameObjects are in a layer called "CutScene". When the level loads, it should automatically start playing the animations, moving its camera, etc. The camera should only render objects on the CutScene layer.
Then, in your game world level, set things up so you can call LoadLevelAdditive("CutScene1") when needed. When it has loaded, set the new cut scene camera to render over your game world, and toggle your AudioListener components if required. When the cutscene finishes, make sure you clean up by destroying the "CutScene1" root GameObject, and your game world level should be left untouched.
Answer by dimmduh · Nov 13, 2013 at 02:55 PM
You have to convert you video to Theora format (ogv)
using System;
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(AudioSource))]
public class ATest : MonoBehaviour
{
protected MovieTexture movieTexture;
protected bool streamReady = false;
void Start ()
{
StartCoroutine(StartStream(@"file://C:/video.ogv"));
}
protected IEnumerator StartStream (String url)
{
WWW videoStreamer = new WWW (url);
movieTexture = videoStreamer.movie;
audio.clip = movieTexture.audioClip;
while (!movieTexture.isReadyToPlay) {
yield return 0;
}
audio.Play ();
movieTexture.Play ();
streamReady = true;
}
void OnGUI ()
{
if (streamReady) {
int width = 100;
int height = 100;
GUI.DrawTexture (new Rect (0, 0, width, height), movieTexture);
}
}
}
Your answer
Follow this Question
Related Questions
How to Play a Movie in Unity 0 Answers
How do I make this small somewhat cutscene? 1 Answer
show a movie intro before game? 1 Answer
How to trigger a cutscene movie? 2 Answers
Script: import a 3d model to the scene from an outside folder 2 Answers