I’m currently using Unity3D, the free version. I’m aware that Unity3D Pro has the option to play videos with ease, but is there a way to play a video in Unity3D Free, like before (or after) the Unity3D water mark?
You can’t play videos on either, but you may show images very fast,simulating a video effect.
You could export your video as images (likely 24 images per second) instead of the video as a singular file. Then through script you could call the images in order at the rate that you want them to appear, for a 24fps setup you would bring up a image every 1/24 of a second.
I wrote a script wich reads out all pictures out of a folder. You can use [Virtualdub][1] to make your clip to pictures, load the folder into unity 3d and then type in the name of the folder in the script. The script looks like this.
pragma strict
var imageFolderName = "";
var MakeTexture = false;
var pictures = new Array();
var loop = false;
var counter = 0;
var Film = true;
var PictureRateInSeconds:float = 1;
private var nextPic:float = 0;
function Start () {
if(Film == true){
PictureRateInSeconds = 0.04166666666666666666;
}
var textures : Object[] = Resources.LoadAll(imageFolderName);
for(var i = 0; i < textures.Length; i++){
Debug.Log("found");
pictures.Add(textures*);*
}
}
function Update () {
if(Time.time > nextPic){
nextPic = Time.time + PictureRateInSeconds;
counter += 1;
if(MakeTexture){renderer.material.mainTexture = pictures[counter];}
}
if(counter >= pictures.length){
Debug.Log(“fertig”);
if(loop){
counter = 0;
}
}
}
you have to create a Resources folder and put the folder with the pictures into that folder. But it works great!
[1]: VirtualDub (32 Bit) Download – kostenlos – CHIP