AnimationState.wrapMode 循环模式


var wrapMode : WrapMode

Description描述

Wrapping mode of the animation.

动画的循环模式

By default wrapMode is initialized to the value   set in the Animation component's wrap   mode.

默认的,wrapMode将初始化动画组件的循环模式

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {animation["Walk"].wrapMode = WrapMode.Loop;}}
// Set the wrap mode of the walk animation to loop// 设置walk动画的wrapMode模式为循环播放animation["Walk"].wrapMode = WrapMode.Loop ;


,