Skip to content

TextStudioReactionUIParticleLease

StructTextStudioTextStudio
public readonly struct TextStudioReactionUIParticleLease

A versioned output owned by the active UI renderer.

TextStudioReactionUIParticleLease(ITextStudioReactionUIParticleOutput, int, uint)

Section titled “TextStudioReactionUIParticleLease(ITextStudioReactionUIParticleOutput, int, uint)”
public TextStudioReactionUIParticleLease(ITextStudioReactionUIParticleOutput owner, int slot, uint version)

Creates a versioned UI particle lease for an output provider slot.

Parameters

Name Type
owner TextStudio.ITextStudioReactionUIParticleOutput
slot System.Int32
version System.UInt32

TrySet(int, in TextStudioReactionUIParticle)

Section titled “TrySet(int, in TextStudioReactionUIParticle)”
public bool TrySet(int index, in TextStudioReactionUIParticle particle)

Attempts to write a particle at the specified index while this lease is valid.

Parameters

Name Type
index System.Int32
particle TextStudio.TextStudioReactionUIParticle

Returns

System.Boolean

public bool Commit()

Publishes the particle values written through this valid lease.

Returns

System.Boolean

public void Release()

Releases the particle output through its owner when this lease is valid.

public bool IsValid { get; }

Returns

System.Boolean