TextStudioReactionContext
public readonly struct TextStudioReactionContextImmutable event data. Unit indices refer to the source generation that emitted the event.
Fields
Section titled “Fields”
Trigger
Section titled “Trigger”public readonly TextStudioReactionTrigger TriggerReturns
TextStudio.TextStudioReactionTrigger
UnitIndex
Section titled “UnitIndex”public readonly int UnitIndexReturns
System.Int32
Generation
Section titled “Generation”public readonly uint GenerationReturns
System.UInt32
SessionId
Section titled “SessionId”public readonly uint SessionIdReturns
System.UInt32
SourceGeneration
Section titled “SourceGeneration”public readonly uint SourceGenerationReturns
System.UInt32
TransactionId
Section titled “TransactionId”public readonly ulong TransactionIdReturns
System.UInt64
ChangeKind
Section titled “ChangeKind”public readonly TextStudioReactionChangeKind ChangeKindReturns
TextStudio.TextStudioReactionChangeKind
EventTime
Section titled “EventTime”public readonly double EventTimeReturns
System.Double
WordStart
Section titled “WordStart”public readonly int WordStartHalf-open semantic word and line spans, or -1 when unavailable.
Returns
System.Int32
WordEnd
Section titled “WordEnd”public readonly int WordEndHalf-open semantic word and line spans, or -1 when unavailable.
Returns
System.Int32
LineStart
Section titled “LineStart”public readonly int LineStartHalf-open semantic word and line spans, or -1 when unavailable.
Returns
System.Int32
LineEnd
Section titled “LineEnd”public readonly int LineEndHalf-open semantic word and line spans, or -1 when unavailable.
Returns
System.Int32
SelectedStart
Section titled “SelectedStart”public readonly int SelectedStartHalf-open selected span, or -1/-1 for All or no selected scope.
Returns
System.Int32
SelectedEnd
Section titled “SelectedEnd”public readonly int SelectedEndHalf-open selected span, or -1/-1 for All or no selected scope.
Returns
System.Int32
public readonly string NameReturns
System.String
TargetBindingKey
Section titled “TargetBindingKey”public readonly string TargetBindingKeyReturns
System.String
Intensity
Section titled “Intensity”public readonly float IntensityReturns
System.Single
ResponseDuration
Section titled “ResponseDuration”public readonly float ResponseDurationReturns
System.Single
RandomSeed
Section titled “RandomSeed”public readonly uint RandomSeedStable per-response variation seed; independent of Unity random and runtime session IDs.
Returns
System.UInt32
Constructors
Section titled “Constructors”
TextStudioReactionContext(TextStudioReactionTrigger, int, uint, string, float, uint, uint, ulong, TextStudioReactionChangeKind, double, int, int, int, int, int, int, string, float, uint)
Section titled “TextStudioReactionContext(TextStudioReactionTrigger, int, uint, string, float, uint, uint, ulong, TextStudioReactionChangeKind, double, int, int, int, int, int, int, string, float, uint)”public TextStudioReactionContext(TextStudioReactionTrigger trigger, int unitIndex = -1, uint generation = 0, string name = null, float intensity = 1, uint sessionId = 0, uint sourceGeneration = 0, ulong transactionId = 0, TextStudioReactionChangeKind changeKind = TextStudioReactionChangeKind.None, double eventTime = 0, int wordStart = -1, int wordEnd = -1, int lineStart = -1, int lineEnd = -1, int selectedStart = -1, int selectedEnd = -1, string targetBindingKey = null, float responseDuration = 0, uint randomSeed = 0)Creates an immutable reaction event context containing text identity, semantic ranges, timing, targeting, intensity, and random seed.
Parameters
| Name | Type |
|---|---|
trigger |
TextStudio.TextStudioReactionTrigger |
unitIndex |
System.Int32 |
generation |
System.UInt32 |
name |
System.String |
intensity |
System.Single |
sessionId |
System.UInt32 |
sourceGeneration |
System.UInt32 |
transactionId |
System.UInt64 |
changeKind |
TextStudio.TextStudioReactionChangeKind |
eventTime |
System.Double |
wordStart |
System.Int32 |
wordEnd |
System.Int32 |
lineStart |
System.Int32 |
lineEnd |
System.Int32 |
selectedStart |
System.Int32 |
selectedEnd |
System.Int32 |
targetBindingKey |
System.String |
responseDuration |
System.Single |
randomSeed |
System.UInt32 |