HI everyone!I am developing an AR app in Unity using the vuforia videoplayblack example and I found a problem I can not solve by myself...The app has like 20 videos and I don't want to put all this data in the assets folder like in the example, so I download all them in a first scene and save into:Application.persistentDataPath +"/"+ filename;because is the only place I can write files following the Unity scripting reference.I've changed the VideoPlayerHelper script that is in charge of setting the path to the video in this way:
if (videoPlayerIsFileInAssetsFolder(filename) || filename.Contains("://")) {
this never happen because I set the video in the scene just with the name of the video ("example.mp4") Debug.Log("exist in fileassetfolder or web"); mFullScreenFilename = filename; } else {
this is what I've changed, because the place where I save the videos is this path and the commented one doesn't work //mFullScreenFilename = "file://" + filename; mFullScreenFilename = Application.persistentDataPath + "/" + filename; }
this is for android and I did in a similar way for iOS. In iOs it works fine fullscreen and render on texture, but in android when the image target is detected and show the video, the icon displays the cross icon, like if an error had ocurred. If I tap on video It changes to the sand clock and plays the video in fullscreen.My android device version is 4.1.1, and in the default example can play video on texture so I guess the path is the problem.Any help to set the path properly?
Render video on texture not working
Hi, could you post this in the Unity section of the Forum, as it is more appropriate: