言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

Animation.wrapMode

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public var wrapMode: WrapMode;
public WrapMode wrapMode;
public wrapMode as WrapMode

Description

再生済みのクリップをどう扱うか

WrapMode.Default:クリップからラップモードを読み込む。(クリップのデフォルトはOnceです)
WrapMode.Once: 再生が終わるとアニメーションを停止します。
WrapMode.Loop: 再生が終わると最初から再生します。
WrapMode.PingPong: 行ったり来たりするアニメーションを再生します。
WrapMode.ClampForever: アニメーションを再生します。再生が最後まで来た時は最後のフレームのサンプリングを保持します。

	// Make the animation loop
	animation.wrapMode = WrapMode.Loop;
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Example() {
        animation.wrapMode = WrapMode.Loop;
    }
}
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	def Example() as void:
		animation.wrapMode = WrapMode.Loop