Table of Contents

Class InteractionPrompt

Namespace
S1API.Interaction
Assembly
S1API.dll

Managed handle for a native Schedule One interaction prompt.

public sealed class InteractionPrompt : IDisposable
Inheritance
InteractionPrompt
Implements
Inherited Members
Extension Methods

Properties

AngleLimit

The current angle restriction in degrees.

public float AngleLimit { get; }

Property Value

float

Input

The current native input action.

public InteractionPromptInput Input { get; }

Property Value

InteractionPromptInput

IsAngleLimited

Whether the prompt currently applies an angle restriction.

public bool IsAngleLimited { get; }

Property Value

bool

IsRemoved

Whether this handle has been removed or its target destroyed.

public bool IsRemoved { get; }

Property Value

bool

Message

The current prompt message.

public string Message { get; }

Property Value

string

Priority

The current overlap priority.

public int Priority { get; }

Property Value

int

Range

The current maximum interaction range.

public float Range { get; }

Property Value

float

State

The current native prompt state.

public InteractionPromptState State { get; }

Property Value

InteractionPromptState

Target

The GameObject containing the native prompt component.

public GameObject Target { get; }

Property Value

GameObject

Methods

ClearDisplayLocation()

Resets prompt positioning to the target transform.

public InteractionPrompt ClearDisplayLocation()

Returns

InteractionPrompt

This prompt for fluent chaining.

CreateBuilder(GameObject)

Creates a builder for a mod-owned GameObject.

public static InteractionPromptBuilder CreateBuilder(GameObject target)

Parameters

target GameObject

The GameObject whose collider should be interactable.

Returns

InteractionPromptBuilder

A new interaction prompt builder.

Dispose()

public void Dispose()

Remove()

Removes the owned native prompt component.

public bool Remove()

Returns

bool

true when this call performed the removal.

SetAngleLimit(float)

Applies a horizontal angle restriction.

public InteractionPrompt SetAngleLimit(float angleLimit)

Parameters

angleLimit float

A finite angle greater than zero and at most 180 degrees.

Returns

InteractionPrompt

This prompt for fluent chaining.

SetDisplayLocation(Collider)

Updates the prompt display anchor to a collider.

public InteractionPrompt SetDisplayLocation(Collider displayCollider)

Parameters

displayCollider Collider

The collider used for display positioning.

Returns

InteractionPrompt

This prompt for fluent chaining.

SetDisplayLocation(Transform)

Updates the prompt display anchor to a transform.

public InteractionPrompt SetDisplayLocation(Transform displayPoint)

Parameters

displayPoint Transform

The transform whose position should be used.

Returns

InteractionPrompt

This prompt for fluent chaining.

SetInput(InteractionPromptInput)

Updates the native input action.

public InteractionPrompt SetInput(InteractionPromptInput input)

Parameters

input InteractionPromptInput

The interaction input action.

Returns

InteractionPrompt

This prompt for fluent chaining.

SetMessage(string)

Updates the native prompt message.

public InteractionPrompt SetMessage(string message)

Parameters

message string

Non-empty player-facing prompt text.

Returns

InteractionPrompt

This prompt for fluent chaining.

SetPriority(int)

Updates the overlap priority.

public InteractionPrompt SetPriority(int priority)

Parameters

priority int

A higher value takes precedence.

Returns

InteractionPrompt

This prompt for fluent chaining.

SetRange(float)

Updates the maximum selection distance.

public InteractionPrompt SetRange(float range)

Parameters

range float

A finite distance between zero and four metres.

Returns

InteractionPrompt

This prompt for fluent chaining.

SetState(InteractionPromptState)

Updates the native prompt state.

public InteractionPrompt SetState(InteractionPromptState state)

Parameters

state InteractionPromptState

The visual and interaction state.

Returns

InteractionPrompt

This prompt for fluent chaining.

WithoutAngleLimit()

Clears the horizontal angle restriction.

public InteractionPrompt WithoutAngleLimit()

Returns

InteractionPrompt

This prompt for fluent chaining.

Events

Hovered

Invoked while the native interaction manager selects this prompt.

public event Action? Hovered

Event Type

Action

InteractionEnded

Invoked when the native interaction ends.

public event Action? InteractionEnded

Event Type

Action

InteractionStarted

Invoked when the native interaction starts.

public event Action? InteractionStarted

Event Type

Action