|
| 1 | +--- |
| 2 | +title: Samples |
| 3 | +description: "Get to know the package through sample scenes" |
| 4 | +lead: "Get to know the package through sample scenes" |
| 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: 115 |
| 13 | +toc: true |
| 14 | +--- |
| 15 | + |
| 16 | +The samples contain demo scenes, that you can refer to for how to set up your own scenes and playback your own sequences. If you've never used the plugin before, we highly recommend to take a look at the samples! |
| 17 | + |
| 18 | +## Importing the samples |
| 19 | + |
| 20 | +As this package is distributed as a UPM package, you need to install the samples into your projects first: |
| 21 | + |
| 22 | +1: Open the Package Manager from **Window -> Package Manager** |
| 23 | + |
| 24 | +2: Click on **In Project** on the left side of the window, and then select the **Geometry Sequence Player** package. |
| 25 | + |
| 26 | +3: Click on the **Samples** tab to the right |
| 27 | + |
| 28 | +4: **Import** the Sequence Samples. They will now be installed in your projects Asset Directory in the **Assets -> Samples** folder. |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +You can now open the sample scenes to take a look how [mesh playback](#sample-01-basic-playback), [pointcloud playback](#sample-02-pointcloud-playback), [timeline playback](#sample-03-timeline-playback) and the [scripting API](#sample-04-scripting-api) works. |
| 33 | + |
| 34 | +## Samples |
| 35 | + |
| 36 | +### Sample 01: Basic Playback |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +This scene contains a simple mesh sequence with per frame textures. When you open the scene, you should see a static 3D thumbnail of the first frame of the sequence in the editor viewport. Press Play in Unity to enter the game mode and start playback of the sequence. In the game window, you can move the camera around the sequence by clicking and holding the left mouse button and moving the mouse, and zoom with the scrollwheel. The scene setup includes: |
| 41 | + |
| 42 | +- A Gameobject **Sequence Player** which contains the **Geometry Sequence Player** and **Geometry Sequence Stream** components neccessary for playback |
| 43 | +- The **path to the sequence** has already been added to the **Geometry Sequence Player** component |
| 44 | +- The **Play at start** and **Loop** options have been enabled in the **Geometry Sequence Player** component |
| 45 | + |
| 46 | +You can inspect the sequence that has been used at: |
| 47 | + |
| 48 | +`Assets\Samples\Geometry Sequence Player\1.1.0\Sequence Samples\ExampleData\TexturedMesh_Sequence_Sample` |
| 49 | + |
| 50 | +> Try playing around with the media controls on the **Geometry Sequence Player** component |
| 51 | +
|
| 52 | +[More info](Unity_Geometry_Sequence_Player/docs/tutorials/playback/) |
| 53 | + |
| 54 | +### Sample 02: Pointcloud Playback |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +The pointcloud playback sample is identical in setup to the basic playback scene, the only difference is that a **pointcloud sequence** instead of a mesh sequence has been used. |
| 59 | + |
| 60 | +You can inspect the sequence at: |
| 61 | + |
| 62 | +`Assets\Samples\Geometry Sequence Player\1.1.0\Sequence Samples\ExampleData\Pointcloud_Sequence_Sample` |
| 63 | + |
| 64 | +> Try changing the **point size** and **point type** options on the **Geometry Sequence Stream** component |
| 65 | +
|
| 66 | +[More info](Unity_Geometry_Sequence_Player/docs/tutorials/playback/) |
| 67 | + |
| 68 | +### Sample 03: Timeline Playback |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | +This scene shows how to setup and control sequence playback from the Unity Timeline. Open the Unity timeline window and select the **Sequence Player** to see how the timeline is setup. Press the **Play** Button to go into game mode and see the timeline playback in action. The scene contains: |
| 73 | + |
| 74 | +- A Gameobject **Sequence Player** which contains a **Geometry Sequence Stream** component (**but not a Geometry Sequence Player** component!) |
| 75 | +- This gameobject also contains a **Playable Director** component, to which the timeline is attached (the playable director is automatically added when a new Timeline asset is created from the timeline window) |
| 76 | +- A **Geometry Sequence Track** has been added to the timeline, and the **Sequence Player** Gameobject has been assigned to the track |
| 77 | +- A **Geometry Sequence Clip** was added to the **Geometry Sequence Track**. The sample mesh sequence from the [basic playback sample](#sample-01-basic-playback) is being used in this clip |
| 78 | + |
| 79 | +> Try adding the pointcloud sequence to the timeline, so that it plays after the mesh sequence has finished |
| 80 | +
|
| 81 | +[More info](Unity_Geometry_Sequence_Player/docs/tutorials/timeline/) |
| 82 | + |
| 83 | + |
| 84 | +### Sample 04: Scripting API |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +This scene is mostly identical to the [basic playback scene](#sample-01-basic-playback), but the **Sequence Player** Gameobject additionally contains the **Geometry Sequence API Example** script, which shows how to use the Scripting API for playback control and how to listen to playback events. The script is well-commented, so we recommend to read it to see how the playback API works. Press **Play** to enter the game mode. The sequence should play halfway three times before stopping, just as programmed in the script. |
| 89 | + |
| 90 | +[More info](Unity_Geometry_Sequence_Player/docs/tutorials/scripting-api/) |
0 commit comments