webglvideocheck.cs 511 B

1234567891011121314151617181920212223242526272829
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using Nfynt;
  4. using UnityEngine;
  5. public class webglvideocheck : MonoBehaviour
  6. {
  7. public bool ismute;
  8. private void OnEnable()
  9. {
  10. if(ismute)
  11. {
  12. this.GetComponent<NVideoPlayer>().Mute();
  13. }
  14. else
  15. {
  16. this.GetComponent<NVideoPlayer>().Unmute();
  17. }
  18. Invoke("playerdelay",1f);
  19. }
  20. void playerdelay()
  21. {
  22. this.GetComponent<NVideoPlayer>().Play();
  23. }
  24. }