SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using VoxelBusters.ReplayKit;
  5.  
  6. public class StartStopRecording : MonoBehaviour
  7. {
  8. void Start ()
  9.     {
  10.         if(ReplayKitManager.IsRecordingAPIAvailable())
  11.             ReplayKitManager.Initialise();
  12.         else
  13.             Debug.LogError("Recording API not available!");
  14.     }
  15.  
  16. public void StartStopRec()
  17.     {  
  18.     if (ReplayKitManager.Initialise() == false)
  19.         {
  20. ReplayKitManager.StartRecording(true);
  21.         }
  22.     else if (ReplayKitManager.Initialise() == true) 
  23.         {
  24. ReplayKitManager.StopRecording();
  25.         }
  26.     }
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top