Table of Contents

Class OffsetBundle

Calculates offsets for characters (to be used with e.g. Wave).

[Serializable]
[TMPParameterBundle("OffsetBundle")]
public class OffsetBundle
Inheritance
OffsetBundle
Inherited Members

Properties

Cache

Whether to cache offsets.

public bool Cache { get; set; }

Property Value

bool

IgnoreAnimatorScaling

Whether to ignore animator scaling (for relevant offset types).

public bool IgnoreAnimatorScaling { get; }

Property Value

bool

Provider

The ITMPOffsetProvider used to calculate offsets.

public ITMPOffsetProvider Provider { get; }

Property Value

ITMPOffsetProvider

Uniformity

The uniformity that should be applied to the offset.

public float Uniformity { get; }

Property Value

float

ZeroBasedOffset

Whether to zero base offset, i.e. whether to shift offsets so that the minimum offset is zero.

public bool ZeroBasedOffset { get; }

Property Value

bool

Methods

ClearCache()

Clear the cached offsets (offsets will only be cached if Cache is true).

public void ClearCache()

GetOffset(CharData, IAnimatorDataProvider, ITMPSegmentData)

Get the offset for the given CharData in the context of the given SegmentData.
Be aware that if Cache is true, this will cache offsets internally. You may clear the cache using ClearCache().

public float GetOffset(CharData cData, IAnimatorDataProvider animatorData, ITMPSegmentData segmentData = null)

Parameters

cData CharData

The CharData to get the offset for.

animatorData IAnimatorDataProvider

Data about the animating TMPAnimator.

segmentData ITMPSegmentData

Data about the contextual segment.

Returns

float

The offset for the given CharData.

GetOffset(CharData, IAnimationContext)

Get the offset for the given CharData in the context of the given SegmentData.
Be aware that if Cache is true, this will cache offsets internally. You may clear the cache using ClearCache().

public float GetOffset(CharData cData, IAnimationContext context)

Parameters

cData CharData

The CharData to get the offset for.

context IAnimationContext

The IAnimationContext of the animating TMPAnimator.

Returns

float

The offset for the given CharData.