From a video file. Anyway at all?
I can tell you what was told me when i did the same exact question (in order of difficulty):
-
remove the video cut scene and make a series of static screenshots
-
make a cutscene using the in game engine instead of a video
-
transform the movie in a sequence of static screenshots; add a sound device that plays the audio and spend hours to sync the images with the audio simulating a video stream
4)buy pro (is just hard on your pocket if all that you need is to launch a video; otherwise is pretty easy
)
- make an app with Xcode that plays the movie and then loads the app that Unity compile and creates
good luck
What is this Xcode? I can’t find any info on it.
And would Unity really allow external code to cover up the screen and then render a video to it? Doesn’t it block that?
XCode is a development Environment on Mac, like Visual Studio on Windows, except it is built into the Operating System when you buy it. But the 5th Idea is not bad. If you just need an Intro-Video, make an app with C++ oder C#, whatever, let it play the video, then launch the Game from inside that App :-).
regards.
Nico said all ![]()
Just FYI; Unity does not do anything other than pack everything in Xcode, compile and run the procedure to spin a build; so once that you do that you will have the same app that you can have for any other software; this means that if you wanna use applescript; automator; xcode; perl…whatever runs on a mac, you can just make a simple app that launch a movie and then launch the game ![]()
Unity is not running once that you compile
what is running is the app that unity created; plus the libraries from Unity to use the render engine (please throw me a bone if i am not saying the truth; still new with MacOs compared to windows
); so when you launch your app; the game that you made in Unity is not even launched until the video is done playing; then once that you do all your stuff, you simply do a system call to execute the app and that’s it…plain and simple
(hint: the same thing that you do when you use terminal to open a file or launch an app…you can even write a shell script to do this :P)
Good luck now with your project!
This isn’t true…Unity only uses Xcode for anything if you’re running Unity iPhone.
–Eric
So the compiling process is done by Unity without calling anything at all? This sound strange to me, but if you say so I believe you Eric ![]()
It would be much stranger if it required Xcode. Not everybody is going to have the multi-gigabyte developer tools installed, and since Unity uses Mono, none of that can be compiled in Xcode. Even with Unity iPhone, Xcode is basically used for linking together some stuff that’s already compiled by Unity (I think the small AppController.mm file is the only thing actually compiled by Xcode). Not to mention, Xcode doesn’t run on Windows. If you didn’t feel like believing me, you could run Activity Monitor while building a Unity project, and you’ll see Xcode fail to appear at all…
–Eric
Well, all that i know on mac uses xcode (unless is java; then is idea, eclipse, netbeans); so my assumption was that when the game is compiled; everything is converted in xcode-ish (same thing of when you open 3d files: they are opened c4d, converted and added in Unity, or on 3dsmax on win boxes) and the app deployed .
Mono is the porting of .net; xcode is the IDE; let’s not mix the language (obj-C); the technology (Cocoa) and the IDE (xcode), because they are 3 different things; so you can use whatever IDE you like to compile using Mono resources (i didn’t tried but I bet you could even launch the console compiler and create an app using Mono).
I assume that for the iphone is different, since it requires cocoa touch and other resources that are in the SDK that works only if you link them with xcode (maybe the nib files? xcode project management always gave me headaches…i love VS and is not something that i hide lol) ; but otherwise the concept should be the same: the IDE does not count, what it counts is the concept ![]()
On win platform of course you can compile in VS since xcode is obviously not available on win platform; but my point is not what you use; because honestly was not the point of this discussion
I’ve simply requested to say if i was saying something that was not true, and you replied very kindly ![]()
Whatever is used, once that you have the app file you can do what you like; automate or create a launcher that launch the movie and then the app itself
that is basically the entire point.
Sorry for the off-topic ![]()
Potentially it makes more sense if people read what was said in relation to XCode: create a standalone app that plays the video and then starts your unity game.
There was nothing said in relation to use XCode in and with Unity itself
For short loops you can use an animated texture.
This basically involves splitting your video into it’s component frames and putting them on a texture sheet which you then use in conjunction with a script like this one:
http://www.unifycommunity.com/wiki/index.php?title=Animating_Tiled_texture
You enter in the number of tiles on the X and Y planes of your texture sheet in the component box the script adds in the Editor and your movie should play.
Fine for short clips and low framerates, not going to work for War and Peace.
You can see it in action here: http://web.mac.com/hayesdavies/Portfolio/First%20build.html
It’s jumpy because was after that sort of effect, it’s supposed to look like big LED screens, and I didn’t bust a gut lining up the frames in the texture sheet. Plus God that was tedious.
Use a plane created in Unity to stick your animated texture on. I found imported geometry sometimes isn’t happy about having materials applied in Unity.