04-10 10:56
Notice
Recent Posts
Recent Comments
관리 메뉴

Scientific Computing & Data Science

Movie Texture Script 본문

CG & Video Games/Unity 3D

Movie Texture Script

cinema4dr12 2013. 5. 26. 12:01
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
    public MovieTexture movTexture;
      
    // Use this for initialization
    void Start () {
        renderer.material.mainTexture = movTexture;
        movTexture.loop = true;
        movTexture.Play();
    }
      
    // Update is called once per frame
    void Update () {
        if(Input.GetKeyDown("space")){
            movTexture.Stop();
            movTexture.Play();
        }
    }
}

'CG & Video Games > Unity 3D' 카테고리의 다른 글

VertextLit Shader  (0) 2013.05.26
Display Normal Shader  (0) 2013.05.26
Rendering with Different Cameras  (0) 2013.05.26
Random Number Generation in C#  (0) 2013.05.25
Line Rendering Script  (0) 2013.05.25
Comments