if (Input.GetKeyDown(KeyCode.A))
{
transform.GetComponent<Animator>().runtimeAnimatorController = GameObject.Instantiate(
Resources.Load<RuntimeAnimatorController>("Anim/slap"));
}
if (Input.GetKeyDown(KeyCode.B))
{
transform.GetComponent<Animator>().runtimeAnimatorController = null;
}
Unity动态切换动态状态机测试
最新推荐文章于 2024-08-24 22:01:16 发布