PropertyChaining.SetReference<T>

Extension Method in PropertyChaining

Declaration

public static T SetReference<T>(this T tween, UnityEngine.Component reference)
    where T : Tween

Description

Sets the id and scene index of the tween to the reference component so the tween can be retrieved and destroyed based on that component.

Type Parameters

TThe type of the tween.

Parameters

tweenThe tween to assign the reference to.
referenceThe reference component.

Returns

TThe tween itself to allow for chaining.

Overload

Declaration

public static T SetReference<T>(this T tween, UnityEngine.GameObject reference)
    where T : Tween

Description

Sets the id and scene index of the tween to the reference game object so the tween can be retrieved and destroyed based on that game object.

Type Parameters

TThe type of the tween.

Parameters

tweenThe tween to assign the reference to.
referenceThe reference game object.

Returns

TThe tween itself to allow for chaining.

Overload

Declaration

public static T SetReference<T>(this T tween, UnityEngine.Object reference)
    where T : Tween

Description

Sets the id and scene index of the tween to the reference object so the tween can be retrieved and destroyed based on that object.

Type Parameters

TThe type of the tween.

Parameters

tweenThe tween to assign the reference to.
referenceThe reference object.

Returns

TThe tween itself to allow for chaining.