|
| 1 | +--- |
| 2 | +title: "Distribution" |
| 3 | +description: "Build and playback on other devices" |
| 4 | +lead: "Build and playback on other devices" |
| 5 | +date: 2020-11-16T13:59:39+01:00 |
| 6 | +lastmod: 2020-11-16T13:59:39+01:00 |
| 7 | +draft: false |
| 8 | +images: [] |
| 9 | +menu: |
| 10 | + docs: |
| 11 | + parent: "tutorials" |
| 12 | +weight: 160 |
| 13 | +toc: true |
| 14 | +--- |
| 15 | + |
| 16 | +## Build and ship |
| 17 | + |
| 18 | +If you intent to distribute your Application built with the Unity Geometry Sequence Streamer, you need to consider where you store your geometry sequence. |
| 19 | +In Unity, the best way is to create a [**Streamingassets**](https://docs.unity3d.com/Manual/StreamingAssets.html) folder inside of your root Asset path, and store all geometry sequences in there. This folder will be copied into your build, so that all files remain intact. |
| 20 | + |
| 21 | +1. Inside of the Unity project view, go to the "Assets" folder and create a **Streamingsassets** folder there: |
| 22 | + |
| 23 | +  |
| 24 | + |
| 25 | +2. Copy all your geometry sequences inside of this folder |
| 26 | + |
| 27 | +3. In your Geometry Sequence Player, either set the sequence via **Open Sequence** and then choose the folder inside of your streamingassets path *or* set the **Path Relation** to **Relative to Streamingassets** and then enter the path to your sequence, relative to the Streamingassets folder: |
| 28 | + |
| 29 | +  |
| 30 | + |
| 31 | +4. Test your changes and path in playmode, then you can build and distribute your application as usual. |
| 32 | + |
| 33 | +## Android |
| 34 | +On Android, the StreamingAssets path is a special case. Data stored into this path, will be compressed into the .apk and needs to be decompressed on load. For large files, like geometry sequences, this will make a noticable impact on playback performance, therefore the Streamingassets path is not supported. On Android, you have to use the applications [**Persistent Data Path**](https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html). The persistent data path is a special path, which stores data spefically for the appliaction. However Unity won't copy the files automatically on build, you have to **copy them manually**. |
| 35 | + |
| 36 | +> ⚠️The persistent data path will only be generated on the applications first run on the device. So you need to run the application once, then copy the files and then run the application again, or download the files onto the device before the Geometry Sequence Player runs. |
| 37 | +
|
| 38 | +1. Inside of your Geometry Sequence Player, set the **Path Relation** to **Relative to Persisten Data Path** and enter the relative path in which you later want to store your sequence, in this example we choose *"Sequence/MySequence"*. |
| 39 | + |
| 40 | +  |
| 41 | + |
| 42 | +2. Build the android app, install it on your Android device and run it, then quit the app. The Geometry Sequence won't be playing at this point. |
| 43 | + |
| 44 | +3. Connect your device to your PC via USB, enable File transfer and then go to the following path on the device: |
| 45 | +*"\Android\data\com.myCompanyName.myProductName\files"*. This is your applications **Persistent Data Path**. |
| 46 | + |
| 47 | +4. Copy your sequence files in the same relative path you set in the Geometry Sequence Player. |
| 48 | + |
| 49 | +5. Now run your app again, you should now see the sequence streaming successfully. |
0 commit comments