SyncSketch's Unity integration should automatically stop recording, upload the file and then exit playmode upon reaching a given end time.