MovieTextureCtrl.cs 317 B

12345678910111213141516171819202122
  1. using System;
  2. using UnityEngine;
  3. public class MovieTextureCtrl : MonoBehaviour
  4. {
  5. private void Start()
  6. {
  7. this.mt = (base.GetComponent<Renderer>().material.mainTexture as MovieTexture);
  8. this.mt.Stop();
  9. }
  10. public void Play()
  11. {
  12. this.mt.Play();
  13. }
  14. private void Update()
  15. {
  16. }
  17. private MovieTexture mt;
  18. }