keijiro / KlakHap

HAP video player plugin for Unity
Other
341 stars 27 forks source link

.mov video is white blank only in build #47

Closed tanakawatanabe closed 3 months ago

tanakawatanabe commented 3 months ago

I'm using HAP Player for in-game TV, projector, etc.

スクリーンショット 2024-05-16 053145 I changed Path Mode to "Local File System" because StreamingAssets folder is accessible in build and the movie in it is openable by explorer, so it could cause spoiler to some users by mistake. In editor it shows video correctly, both in edit mode and play mode. But it becomes totally white blank when it comes to the build.

This doesn't happen when I put video on StreamingAssets folder and set Path Mode as well, but like I said above I'd like to use Local File System mode.

Unity 2021.3.8f HDRP DXR KlakHAP 0.1.20

keijiro commented 3 months ago

A simple answer is "You can't do it in that way". Files under Assets are not referrenceable as an individual file in runtime.

You have to implement a custom solution to completely hide those files from users. Or you can change the .mov suffix to another one like .blah (users can peek it by renaming them, though).

tanakawatanabe commented 3 months ago

Thx for the reply and understood. I searched some forums and it looks like storing videos in AssetBundle is the only way to prevent easy peeking. I've never used this feature and not sure it works with HAP Player well but I'll look into it.

keijiro commented 3 months ago

Unfortunately, you can't use the Asset Bundles for this purpose. In short, it's not used for streaming.

tanakawatanabe commented 3 months ago

Alright, I have no choice then. Thanks for the quick response.