// Invoked by NatCorder once recording is finished void OnReplay(string path) { // Get the video thumbnail Texture2D thumbnail = Sharing.GetThumbnail(path, 5f); // Get the thumbnail after 5 seconds of video // Do stuff with the thumbnail DisplayThumbnail(thumbnail); // Save the path to the replay so we can use it in `OnShare` this.pathToReplay = path; }
void doShare() { path = recordingPath.Value; if (path == null) { return; } texture2d = Sharing.GetThumbnail(path); texture = texture2d; thumbnail.Value = texture; }