Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Video : MonoBehaviour
  6. {
  7. public MovieTexture movie;
  8. //private new AudioSource audio;
  9.  
  10. // Use this for initialization
  11. void Start()
  12. {
  13. GetComponent<Renderer>().material.mainTexture = movie as MovieTexture;
  14. //audio = GetComponent<AudioSource>();
  15. // audio.clip = movie.audioClip;
  16.  
  17. }
  18.  
  19. public void MetodoPlay()
  20. {
  21. movie.Play();
  22. //audio.Play();
  23.  
  24. }
  25.  
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement