Skip to content

Instantly share code, notes, and snippets.

@olokobayusuf
Created February 15, 2020 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olokobayusuf/ba528cb80ade17d61b97f7c95ca80eb8 to your computer and use it in GitHub Desktop.
Save olokobayusuf/ba528cb80ade17d61b97f7c95ca80eb8 to your computer and use it in GitHub Desktop.
Streaming the camera preview from a camera device in NatDevice.
async void StartPreview () {
// Start the camera preview
ICameraDevice device = ...;
Texture2D previewTexture = await device.StartRunning();
// Display the preview texture on a UI panel
rawImage.texture = previewTexture;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment