Log in or register to post comments

Lauch movie form touching object

October 31, 2012 - 7:44am #1

Hello there,

basically what I want to do is a Target is detected, displaying an object let's say a Cube. 

By touching that Cube I want to launch a Full Screen Movie. 

This used to work as follows but now crashes. It seems it needs some kind of stopping the Qcar detection when launching the movie and restarting it when the movie is finished or when I click on done. 

Can someoneplease tell me what I have to add in my code to do that?



#pragma strict

#pragma implicit

#pragma downcast


function Update () {


    var hit : RaycastHit;


   for (var i = 0; i < Input.touchCount; ++i) {


     if (Input.GetTouch(i).phase == TouchPhase.Began) {


  var ray = Camera.main.ScreenPointToRay (Input.GetTouch(i).position);


  if (Physics.Raycast (ray,hit)) {


  Debug.Log(hit.transform.name+" touched"); 


if (hit.transform.name=="myobject") { 


Handheld.PlayFullScreenMovie ("mymovie.mp4", Color.black, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFit);













Lauch movie form touching object

November 9, 2012 - 6:32am #2

I did spend some time investigating this and I think this is a Unity issue that seems to appear only when compiling with Xcode 4.5 / iOS 6.

Essentially when I built with Xcode 4.4.1 using iOS5 clicking done it returned to the app as expected.

However after trying with the latest Unity4 RC this issue seems to be resolved.  It could be that Unity 3.5.X may still have a problem with this. 

So my current thinking it is that if you absolutely must have full-screen playback and you need it now then you may need to go back to Xcode 4.4.1  failing which you may need to wait for Unity 4.



Log in or register to post comments