Version: 2021.2

AnimatorJobExtensions

class in UnityEngine.Animations

切换到手册

描述

用于为 Animator 和动画 C# 作业提供扩展方法的静态类。

此类中的扩展方法可以直接在 Animator 上使用。

另请参阅:IAnimationJobPlayable

静态函数

AddJobDependency在动画器作业和提供的作业句柄代表的作业之间创建依赖关系。要添加多个作业依赖关系,请为每个需要在动画器作业之前运行的作业调用此方法。
BindCustomStreamProperty在 AnimationStream 中创建自定义属性,以将额外数据传递给图形中的下游动画作业。在 AnimationStream 中创建的自定义属性不存在于场景中。
BindSceneProperty创建一个 PropertySceneHandle,用于表示场景中 Transform 的 Component 属性上的新绑定。
BindSceneTransform创建一个 TransformSceneHandle,用于表示场景中 Animator 与 Transform 之间的新绑定。
BindStreamProperty创建一个 PropertyStreamHandle,用于表示已绑定到 Animator 的 Transform 的 Component 属性上的新绑定。
BindStreamTransform创建一个 TransformStreamHandle,用于表示已绑定到 Animator 的 Animator 与 Transform 之间的新绑定。
CloseAnimationStream关闭已使用 OpenAnimationStream 打开的流。
OpenAnimationStream在 Animator 上打开一个新流。
ResolveAllSceneHandles在运行作业时,新创建的句柄总是在下次访问时延迟解析。为了在评估作业时避免出现 CPU 峰值,您可以手动解析主线程中的所有句柄。
ResolveAllStreamHandles在运行作业时,新创建的句柄总是在下次访问时延迟解析。为了在评估作业时避免出现 CPU 峰值,您可以手动解析主线程中的所有句柄。
UnbindAllSceneHandlesRemoves all PropertySceneHandles and TransformSceneHandles associated with the Animator instance. Use this method to manage the lifecycle of scene handles when the animated hierarchy changes.
UnbindAllStreamHandlesRemoves all PropertyStreamHandles and TransformStreamHandles associated with the Animator instance. Use this method to manage the lifecycle of stream handles when the animated hierarchy changes.