Skip to content

Commit c5ed5cb

Browse files
committed
Add Record example
1 parent 5558fa4 commit c5ed5cb

File tree

10 files changed

+3533
-1
lines changed

10 files changed

+3533
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ git clone https://github.com/SpectacularAI/unity-wrapper.git
1919
* **[unity-examples:](https://github.com/SpectacularAI/unity-wrapper/tree/main/unity-examples)** contains source code for the Unity wrapper and a couple of examples that demonstrate the usage:
2020
* **[HelloDepthAI](https://github.com/SpectacularAI/unity-wrapper/tree/main/unity-examples/Assets/SpectacularAI/Examples/HelloDepthAI)** Minimal OAK-D example. Shows how to use the SDK to track the pose of OAK-D device in real-time.
2121
* **[MappingVisu](https://github.com/SpectacularAI/unity-wrapper/tree/main/unity-examples/Assets/SpectacularAI/Examples/MappingVisu)** SLAM example. Build and visualize 3D point cloud of the environment in real-time using OAK-D device.
22+
* **[Record](https://github.com/SpectacularAI/unity-wrapper/tree/main/unity-examples/Assets/SpectacularAI/Examples/Record)** Recording tool. Enables recording datasets with OAK-D device for Replay API.
2223
* **[AprilTag](https://github.com/SpectacularAI/unity-wrapper/tree/main/unity-examples/Assets/SpectacularAI/Examples/AprilTag)** April Tag integration example. Place April Tags using Unity Editor. The April Tags are then input to the SDK enabling absolute positioning.
2324
* **[HelloReplay](https://github.com/SpectacularAI/unity-wrapper/tree/main/unity-examples/Assets/SpectacularAI/Examples/HelloReplay)** Minimal Replay API example. Shows how to use the Replay API in Unity to replay your recordings.
2425

@@ -31,6 +32,9 @@ git clone https://github.com/SpectacularAI/unity-wrapper.git
3132

3233
The examples in this repository are licensed under Apache 2.0 (see LICENSE).
3334

35+
A list of 3rd party copyright notices that should be included in
36+
redistributions is provided within `unity-examples/Assets/SpectacularAI/Plugins/<operating system>/LICENSE`.
37+
3438
The SDK itself (not included in this repository) is proprietary to Spectacular AI.
3539
For commerical licensing options and more SDK variants (ARM binaries & C++ API),
3640
contact us at https://www.spectacularai.com/#contact.

unity-examples/Assets/SpectacularAI/Examples/Common/Scripts/CameraPoseRenderer.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace SpectacularAI.Examples.Common
55
public class CameraPoseRenderer : MonoBehaviour
66
{
77
public float Scale = 0.1f;
8+
private MeshRenderer _meshRenderer;
89

910
private static readonly int[] _indices =
1011
{
@@ -33,9 +34,14 @@ private void Start()
3334
mesh.SetVertices(vertices, 0, vertices.Length);
3435
mesh.SetIndices(_indices, MeshTopology.Lines, 0);
3536

36-
gameObject.AddComponent<MeshRenderer>();
37+
_meshRenderer = gameObject.AddComponent<MeshRenderer>();
3738
MeshFilter meshFilter = gameObject.AddComponent<MeshFilter>();
3839
meshFilter.mesh = mesh;
3940
}
41+
42+
public void Show(bool show)
43+
{
44+
_meshRenderer.enabled = show;
45+
}
4046
}
4147
}

unity-examples/Assets/SpectacularAI/Examples/Record.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unity-examples/Assets/SpectacularAI/Examples/Record/Scenes.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)