文档

Unity Engine

Unity Engine

speed

The playback speed of the animation. 1 is normal playback speed.
阅读时间1 分钟最后更新于 20 天前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AnimationModule
public float speed { get; set; }

Remarks

A negative playback speed will play the animation backwards.

Examples

using UnityEngine;using System.Collections;public class ExampleScript : MonoBehaviour{ public Animation anim; void Start() { // Walk at normal speed anim["Walk"].speed = 1.0f; // Walk at double speed anim["Walk"].speed = 2.0f; }}