Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BindStreamProperty

Create a PropertyStreamHandle representing the new binding on the Component property of a Transform already bound to the Animator.
Read time 2 minutesLast updated 12 days ago

Definition

BindStreamProperty(Animator, Transform, Type, string)

Create a PropertyStreamHandle representing the new binding on the Component property of a Transform already bound to the Animator.
public static PropertyStreamHandle BindStreamProperty(this Animator animator, Transform transform, Type type, string property)

Parameters

animator

The Animator instance that calls this method.

transform

The Transform to target.

type

The Component type.

property

The property to bind.

Returns

Type

Description

PropertyStreamHandleReturns the PropertyStreamHandle that represents the new binding.

Remarks

You can bind a property that doesn't exist yet. For example you can bind a property on a MonoBehaviour that will be added later dynamically. In this case, you need to manually resolve the handle after adding the MonoBehaviour on the GameObject, using AnimatorJobExtensions.ResolveAllStreamHandles.

BindStreamProperty(Animator, Transform, Type, string, bool)

Create a PropertyStreamHandle representing the new binding on the Component property of a Transform already bound to the Animator.
public static PropertyStreamHandle BindStreamProperty(this Animator animator, Transform transform, Type type, string property, bool isObjectReference)

Parameters

animator

The Animator instance that calls this method.

transform

The Transform to target.

type

The Component type.

property

The property to bind.

isObjectReference

isObjectReference need to be set to true if the property to bind does animate an Object like _sprite.

Returns

Type

Description

PropertyStreamHandleReturns the PropertyStreamHandle that represents the new binding.

Remarks

You can bind a property that doesn't exist yet. For example you can bind a property on a MonoBehaviour that will be added later dynamically. In this case, you need to manually resolve the handle after adding the MonoBehaviour on the GameObject, using AnimatorJobExtensions.ResolveAllStreamHandles.