Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement