Last active
March 5, 2018 16:37
-
-
Save olokobayusuf/c7cb42e28280128fb712eedca25f5ba8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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