Unity状态机代码添加变量

mac2025-10-13  9

AnimatorControllerParameter,对应状态机编辑器的parameters

官方API:

AnimatorControllerParameter

class in UnityEngine

/

Implemented in:UnityEngine.AnimationModule

Leave feedback

Description

Used to communicate between scripting and the controller. Some parameters can be set in scripting and used by the controller, while other parameters are based on Custom Curves in Animation Clips and can be sampled using the scripting API.

Properties

defaultBoolThe default bool value for the parameter.defaultFloatThe default float value for the parameter.defaultIntThe default int value for the parameter.nameThe name of the parameter.nameHashReturns the hash of the parameter based on its name.typeThe type of the parameter.

 

示例代码见:http://icelily.xyz/wordpress/?p=725

最新回复(0)