- Home /
Having trouble with iPhoneUtils.PlayMovie
I've not yet been able to get a video to play on the iPhone, and I'm assuming it has something to do with the if statement encapsulating the PlayMovie command. My iPhoneStreamingAssets folder is next to the Assets folder in the main file structure.
Here is the code I'm using:
if(GUI.Button (Rect ( (Screen.width*( (button_locX+5)/10)) - (button_sizeX / 2), (Screen.height*((button_locY+move+.2)/10)), 80, 35), "Preview") )
{
iPhoneUtils.PlayMovie("jump.mov", Color.black, iPhoneMovieControlMode.CancelOnTouch);
}
Answer by raminsh · Aug 16, 2010 at 02:46 AM
Hello to answer your question, first I must ask what version of unity iphone are you using? is it pro or is it basic. because it seems that there is nothing wrong with your code so I assume that your unity iphone is the basic version which unfortunately doesn't allow you to play video. I hope that helped
Answer by jtbentley · Sep 07, 2010 at 01:20 PM
If you're using Unity 3, keep this in mind (pasted from the beta changelog)
iPhone: iPhoneStreamingAssets is renamed to StreamingAssets and is now located under the Assets folder (visible from within the Editor).
Also, I would use .m4v, not .mov :)
I ran into a similar issue, in big part due to Unity's own online documentation still outlining the OLD StreamAssets folder placement info, placing it outside the assets folder. Thanks for the info JTBentley.
Your answer
Follow this Question
Related Questions
In priview good work, but on Iphone - incorect 2 Answers
Pausing a movie using iPhoneUtils.PlayMovie 2 Answers
How do you make an iPhone Game with Unity? 4 Answers
iOS Universal Binary Support? 1 Answer
Regulate Vibration 2 Answers