Search Unity

Adding the ARCamera to videoPlayer.targetCamera

Discussion in 'Vuforia' started by Jim_in_dorris, Mar 19, 2018.

  1. Jim_in_dorris

    Jim_in_dorris

    Joined:
    Aug 12, 2015
    Posts:
    25
    Well I can now play video full screen using the metadata from a cloud target, however I have to pre set the video player to ARCamera. I would like to be able to add the video player component in script using addComponent, but am unable to set videoPlayer.TargetCamera to the ARCamera in the script. I need to do this so that I can remove the component when I am done rather than leaving it attached to the image target because the next target may or may not need the video player and I don't want to leave unused components laying around in the app. Any help figuring out how to add it would be appreciated. BTW, to clear the last frame of the video, pause the video, set the source to blank and change the render mode then call videoPlayer.play. its gone.
     
  2. Jim_in_dorris

    Jim_in_dorris

    Joined:
    Aug 12, 2015
    Posts:
    25
    Ok, this is solved. I can now do this without getting the error i initially got. The core sample code only needed minor modifications to make it work for me.