Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.