EffectEvaluationContext
public readonly struct EffectEvaluationContextContext passed to effect evaluation. Contains all timing and effect area information needed for effect computation without accessing global state.
Fields
Section titled “Fields”
glyphIndex
Section titled “glyphIndex”public readonly int glyphIndexIndex of the glyph within visible glyph array.
Returns
System.Int32
totalGlyphs
Section titled “totalGlyphs”public readonly int totalGlyphsTotal visible glyph count.
Returns
System.Int32
wordIndex
Section titled “wordIndex”public readonly int wordIndexWord index the glyph belongs to.
Returns
System.Int32
lineIndex
Section titled “lineIndex”public readonly int lineIndexLine index the glyph belongs to.
Returns
System.Int32
public readonly AnimationPhase phaseCurrent animation phase for this glyph.
Returns
TextStudio.AnimationPhase
phaseProgress
Section titled “phaseProgress”public readonly float phaseProgressProgress within the current phase (0–1).
Returns
System.Single
public readonly float timeTime since text controller started (seconds).
Returns
System.Single
playbackTime
Section titled “playbackTime”public readonly float playbackTimeTime since the current effect invocation started (seconds). This normally matches
TextStudio.EffectEvaluationContext.time, but previews may restart finite playback without resetting the
continuous clock used by oscillators and procedural motion.
Returns
System.Single
deltaTime
Section titled “deltaTime”public readonly float deltaTimeDelta time since last evaluation (seconds).
Returns
System.Single
normalizedIndex
Section titled “normalizedIndex”public readonly float normalizedIndexNormalized position of glyph within the current effect binding (0–1).
Returns
System.Single
public readonly TextStudioEffectAreaMode areaReturns
TextStudio.TextStudioEffectAreaMode
groupSize
Section titled “groupSize”public readonly int groupSizeReturns
System.Int32
unitIndex
Section titled “unitIndex”public readonly int unitIndexReturns
System.Int32
unitCount
Section titled “unitCount”public readonly int unitCountReturns
System.Int32
unitStartGlyph
Section titled “unitStartGlyph”public readonly int unitStartGlyphReturns
System.Int32
unitGlyphCount
Section titled “unitGlyphCount”public readonly int unitGlyphCountReturns
System.Int32
indexInUnit
Section titled “indexInUnit”public readonly int indexInUnitReturns
System.Int32
normalizedIndexInUnit
Section titled “normalizedIndexInUnit”public readonly float normalizedIndexInUnitReturns
System.Single
normalizedUnitIndex
Section titled “normalizedUnitIndex”public readonly float normalizedUnitIndexReturns
System.Single
normalizedIndexInBinding
Section titled “normalizedIndexInBinding”public readonly float normalizedIndexInBindingReturns
System.Single
randomSeedIndex
Section titled “randomSeedIndex”public readonly int randomSeedIndexReturns
System.Int32
playbackOffset
Section titled “playbackOffset”public readonly float playbackOffsetReturns
System.Single
sourcePosition
Section titled “sourcePosition”public readonly Vector3 sourcePositionGlyph center from the source TMP layout, before placement.
Returns
UnityEngine.Vector3
sourceTextNormalizedPosition
Section titled “sourceTextNormalizedPosition”public readonly Vector3 sourceTextNormalizedPositionGlyph center normalized inside the complete source-text visual bounds. This remains stable when placement, animation, or object transforms move the glyph.
Returns
UnityEngine.Vector3
sourceColor
Section titled “sourceColor”public readonly Color sourceColorImmutable center sample of the glyph’s original four-corner source color.
Returns
UnityEngine.Color
hasSourceColor
Section titled “hasSourceColor”public readonly bool hasSourceColorWhether the active renderer supplied an original source-color sample.
Returns
System.Boolean
spatialPosition
Section titled “spatialPosition”public readonly Vector3 spatialPositionGlyph center after the active Text Studio placement.
Returns
UnityEngine.Vector3
worldPosition
Section titled “worldPosition”public readonly Vector3 worldPositionPlaced glyph center transformed into world space by the owning hub.
Returns
UnityEngine.Vector3
hasInfluenceTarget
Section titled “hasInfluenceTarget”public readonly bool hasInfluenceTargetWhether the owning hub currently supplies a shared spatial effect target.
Returns
System.Boolean
influenceTargetLocalPosition
Section titled “influenceTargetLocalPosition”public readonly Vector3 influenceTargetLocalPositionShared effect target transformed into the owning hub’s local text space.
Returns
UnityEngine.Vector3
influenceTargetWorldPosition
Section titled “influenceTargetWorldPosition”public readonly Vector3 influenceTargetWorldPositionShared effect target in world space.
Returns
UnityEngine.Vector3
Constructors
Section titled “Constructors”
EffectEvaluationContext(int, int, int, int, AnimationPhase, float, float, float, float)
Section titled “EffectEvaluationContext(int, int, int, int, AnimationPhase, float, float, float, float)”public EffectEvaluationContext(int glyphIndex, int totalGlyphs, int wordIndex, int lineIndex, AnimationPhase phase, float phaseProgress, float time, float deltaTime, float normalizedIndex)Creates evaluation context without extended source-unit metadata.
Parameters
| Name | Type |
|---|---|
glyphIndex |
System.Int32 |
totalGlyphs |
System.Int32 |
wordIndex |
System.Int32 |
lineIndex |
System.Int32 |
phase |
TextStudio.AnimationPhase |
phaseProgress |
System.Single |
time |
System.Single |
deltaTime |
System.Single |
normalizedIndex |
System.Single |
EffectEvaluationContext(int, int, int, int, AnimationPhase, float, float, float, float, in TextStudioEffectUnitContext)
Section titled “EffectEvaluationContext(int, int, int, int, AnimationPhase, float, float, float, float, in TextStudioEffectUnitContext)”public EffectEvaluationContext(int glyphIndex, int totalGlyphs, int wordIndex, int lineIndex, AnimationPhase phase, float phaseProgress, float time, float deltaTime, float normalizedIndex, in TextStudioEffectUnitContext unit)Creates evaluation context with renderer-neutral source-unit metadata.
Parameters
| Name | Type |
|---|---|
glyphIndex |
System.Int32 |
totalGlyphs |
System.Int32 |
wordIndex |
System.Int32 |
lineIndex |
System.Int32 |
phase |
TextStudio.AnimationPhase |
phaseProgress |
System.Single |
time |
System.Single |
deltaTime |
System.Single |
normalizedIndex |
System.Single |
unit |
TextStudio.TextStudioEffectUnitContext |
EffectEvaluationContext(int, int, int, int, AnimationPhase, float, float, float, float, float, in TextStudioEffectUnitContext)
Section titled “EffectEvaluationContext(int, int, int, int, AnimationPhase, float, float, float, float, float, in TextStudioEffectUnitContext)”public EffectEvaluationContext(int glyphIndex, int totalGlyphs, int wordIndex, int lineIndex, AnimationPhase phase, float phaseProgress, float time, float playbackTime, float deltaTime, float normalizedIndex, in TextStudioEffectUnitContext unit)Creates complete evaluation context including source-text normalized position.
Parameters
| Name | Type |
|---|---|
glyphIndex |
System.Int32 |
totalGlyphs |
System.Int32 |
wordIndex |
System.Int32 |
lineIndex |
System.Int32 |
phase |
TextStudio.AnimationPhase |
phaseProgress |
System.Single |
time |
System.Single |
playbackTime |
System.Single |
deltaTime |
System.Single |
normalizedIndex |
System.Single |
unit |
TextStudio.TextStudioEffectUnitContext |