MovieTexture.duration 持续时间

var duration : float

Description描述

The time, in seconds, that the movie takes to play back completely.

获得影片完全播放的时间,以秒为单位。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    public MovieTexture mov;
    public GUIText gui;
    void Start() {
        gui.text = mov.duration.ToString();
    }
}
var mov: MovieTexture;
var gui: GUIText;

function Start() {
    gui.text = mov.duration.ToString();
}
Page last updated: 2012-4-12