"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Video plays automatically

Hi all.

I'm using Unity 2017.3.1f1 and vuforia.

 

I could show 3D model and video using video player.

But it seems when I play the scene,the video plays automatically.

I wanted to play video at the same time  I found the marker.

(I mean at the same time to show 3D model)

 

I roughly know it is because I checked "Play on Awake" but when I unchecked it , I couldn't play video anymore.

Do I need a custom C# script to control video play?

 

I'll attach the config.

 

 

 

 

Yes you need some custom scripting.  Check out OnTrackingFound in DefaultTrackableEventHandler.  Uncheck play on awake, and in that method do something like: GameObject.Find("SomeGameObject").GetComponent<VideoPlayer>().Play();

Seagull1234

Sun, 03/18/2018 - 14:12

dpizzle , Thank you for your quick reply!!

(and sorry for late reply)

 

I checked the 「DefaultTrackableEventHandler」 and I tried some custom script  but it doesn't work well.

Actually I'm not familiar with #C and Unity...

Seagull1234

Mon, 03/19/2018 - 00:12

Dear dpizzle 

 

Thank you for your suggestion.(and sorry for late reply)

I could do what I wanted to do.

 

I unchecked "Play On Awake" and edited 「DefaultTrackableEventHandler」 in the ImageTarget.

Thank  you so much... this is what i have been searching for.  one other question... I there any way to reset the video play when tracking is lost?

Hi,

Based on the error the class TrackableBehaviour does not recognize the parameter "NOT_Found". I checked which parameters the class accepts and NOT_FOUND is not on the list.

Attachment