因此小弟很有上進心的跑去找系上Unity最厲害的學長詢問
學長給了一篇連結並告訴我照著做就可以了:http://www.youtube.com/watch?v=-vd9Mdb2r34
小弟都照著做直到某一步驟讓小弟差點把電腦給砸了 (卡了4個小時)

因此小弟特地把解決方法放到網路上供新手解決
解決方法(solving):
1. 下載QuickTime安裝 (download QuickTime and install)
http://www.apple.com/tw/quicktime/download/
2. 將影片匯入Unity (import your video)
PS:請注意格式 (please notice your video format)
4. 將影片檔塞入Material材質中 ( Put the video file into the Material texture)
5. 將Material帶到 Cube 中(take the Material to the Cube)
6. 建立 C# Script (create the C# Script)
7. 將程式帶入Cube中 (put the script to the Cube)
8. 打上下列程式(type the follow code)
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public MovieTexture mov;
// Use this for initialization
void Start () {
renderer.material.mainTexture = mov;
mov.Play();
}
// Update is called once per frame
void Update () {
}
}
PS: 記得存檔及按下F8執行(Please remember save file and press F8 to compile)
9. 將影片檔放到Script下的mov (put the video file in the mov variable of Script)
10. 完成 可以試跑程式了 (Finish!!)










沒有留言:
張貼留言