u3d 控制animation播放速度

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AniSpeed : MonoBehaviour {
    Animation m_ani;
    public float m_speed = 1.0f;
    // Use this for initialization
    void Start () {
        m_ani = transform.GetComponent();
        foreach (AnimationState state in m_ani)
        {
            state.speed = m_speed;
        }
    }
}

你可能感兴趣的:(Unity3D实用技术笔记,Unity3d技术笔记)