语言英语
  • C#

AnimatorJobExtensions.BindStreamProperty

声明

public static Animations.PropertyStreamHandle BindStreamProperty(Animator animator, Transform transform, Type type, string property);

声明

public static Animations.PropertyStreamHandle BindStreamProperty(Animator animator, Transform transform, Type type, string property, bool isObjectReference = false);

参数

animator 调用此方法的Animator 实例。
transform 要目标化的Transform
type Component 类型。
property 要绑定的属性。
isObjectReference 如果要绑定的属性对像 SpriteRenderer.sprite 那样动画化一个对象,则需要将 isObjectReference 设置为 true。

返回值

PropertyStreamHandle 返回表示新绑定的 PropertyStreamHandle。

描述

在已绑定到 AnimatorTransformComponent 属性上创建表示新绑定的 PropertyStreamHandle。

您可以绑定尚未存在的属性。例如,您可以在稍后动态添加的 MonoBehaviour 上绑定属性。在这种情况下,您需要在 GameObject 上添加 MonoBehaviour 后使用 ResolveAllStreamHandles 手动解析句柄。


Did you find this page useful? Please give it a rating: