Log in or register to post comments

How to load Image when marker detect in Videoplayback sample

November 22, 2012 - 2:33am #1

Hi Nalin, I hope you are doing great, i am following VideoPlayBack sample project and playing videos when marker deteted. Now my task is how to show image instead of video when marker detected. I also want to show image from Document directory path for iOS i also successfully download and write onto document directory of image, but i don't know how and where i should do this. One more question is this i want to play video from Document directory.

I did following code in "TrackableEventHandler.cs" class to show image texture when marker detected but my code is not working.

if(mTrackableBehaviour.TrackableName.Equals("myMarker"))

string fileName = Application.persistentDataPath + "/myMarkerImage.jgp";

if (File.Exists(fileName)){

print("Yes File exist ...");

renderer.material.mainTexture.name = "fileName";

 

}

How to load Image when marker detect in Videoplayback sample

November 22, 2012 - 9:53am #2

You may need to use asset bundles which are a pro only feature.

You can try searching the forums to see whether anyone has tried something similar, and it's also worth searching the forums at Unity, because you are trying to download models remotely and display them.

HTH

N

 

Log in or register to post comments