LoginSignup
2
3

More than 5 years have passed since last update.

Unity5.4 MovieTextureの再生方法

Posted at
  • mp4をImport
  • マテリアルを作成してテクスチャ部分にmp4を設定
  • Planeなどをシーンに配置し、そのマテリアルを設定
  • そのPlaneに下記コードを付けてPlay
using UnityEngine;
using System.Collections;

public class PlayMovieTexture : MonoBehaviour {

    MovieTexture movieTexture;

    void Start () {
        movieTexture = (MovieTexture)(GetComponent<Renderer>().material.mainTexture);
        movieTexture.Play();
    }
}
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3