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
Input
The current native input action.
public InteractionPromptInput Input { get; }
Property Value
IsAngleLimited
Whether the prompt currently applies an angle restriction.
public bool IsAngleLimited { get; }
Property Value
IsRemoved
Whether this handle has been removed or its target destroyed.
public bool IsRemoved { get; }
Property Value
Message
The current prompt message.
public string Message { get; }
Property Value
Priority
The current overlap priority.
public int Priority { get; }
Property Value
Range
The current maximum interaction range.
public float Range { get; }
Property Value
State
The current native prompt state.
public InteractionPromptState State { get; }
Property Value
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
targetGameObjectThe 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
SetAngleLimit(float)
Applies a horizontal angle restriction.
public InteractionPrompt SetAngleLimit(float angleLimit)
Parameters
angleLimitfloatA 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
displayColliderColliderThe 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
displayPointTransformThe 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
inputInteractionPromptInputThe interaction input action.
Returns
- InteractionPrompt
This prompt for fluent chaining.
SetMessage(string)
Updates the native prompt message.
public InteractionPrompt SetMessage(string message)
Parameters
messagestringNon-empty player-facing prompt text.
Returns
- InteractionPrompt
This prompt for fluent chaining.
SetPriority(int)
Updates the overlap priority.
public InteractionPrompt SetPriority(int priority)
Parameters
priorityintA higher value takes precedence.
Returns
- InteractionPrompt
This prompt for fluent chaining.
SetRange(float)
Updates the maximum selection distance.
public InteractionPrompt SetRange(float range)
Parameters
rangefloatA 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
stateInteractionPromptStateThe 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
InteractionEnded
Invoked when the native interaction ends.
public event Action? InteractionEnded
Event Type
InteractionStarted
Invoked when the native interaction starts.
public event Action? InteractionStarted