Skip to content

Instantly share code, notes, and snippets.

@olokobayusuf
Last active March 5, 2018 16:37
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/c7cb42e28280128fb712eedca25f5ba8 to your computer and use it in GitHub Desktop.
Save olokobayusuf/c7cb42e28280128fb712eedca25f5ba8 to your computer and use it in GitHub Desktop.
// Invoked by NatCorder once recording is finished
void OnReplay (string path) {
// Get the video thumbnail
Sharing.GetThumbnail(path, OnThumbnail, 5f); // Get the thumbnail after 5 seconds of video
// Save the path to the replay so we can use it in `OnShare`
this.pathToReplay = path;
}
// Invoked by NatCorder once thumbnail has been loaded
void OnThumbnail (Texture2D thumbnail) {
// Do stuff with the thumbnail
// ...
}
// Invoked by UI when user clicks share button
void OnShare () {
// Share the replay using the native sharing UI
Sharing.Share(this.pathToReplay);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment