A project I’m working on will be using some video which will need to be placed in the StreamingAssets folder for playback on mobile. The problem we’re having is that if we want to export our project as a unitypackage anything in the StreamingAssets folder that is linked to a component in the inspector gets the link broken.
So I’m under the impression that this is not the proper way to do things. Probably since items in the StreamingAssets folder should only be accessed via code (please confirm this).
So I am wondering what is the best way to handle this for multiplatform and ease of editing/collaboration?
Do we need to make scripts to load files into their proper places via the streaming assets folder?
Should we keep all of the videos in a regular folder while working on the project and move them to a streaming assets folder only before building?
It seems like there should be a better workflow for this, but I’m not familiar with the StreamingAssets folder enough to know it and there’s not much info out there on this.
Thanks!!
OK well after a lot of tinkering I’ve not found any great way to do this. Basically if you’re building for multiple platforms where you won’t always need StreamingAssets then it’s a bit of a pain. So the reason we don’t always want to use StreamingAssets is
- It makes the raw data for our assets accessible and easy to read / tinker with.
- Videos don’t get compressed to OGG which is typically smaller file size per quality.
- You can’t link StreamingAssets to inspector components.
So for now we have to live with it unless someone can suggest a better workflow. Right now we’re going to be only accessing video via script. In the Editor and Standalone builds we’ll put the videos in a Resources folder. In Mobile builds we have to move them to the Streaming Assets folder. Seems a bit wonky, but it works. I would love to hear alternative suggestions!