Show / Hide Table of Contents

Class WeaverArrowPrompt

Used to display an arrow prompt with text above an object. Mainly used by WeaverBench and WeaverNPC

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
WeaverArrowPrompt
Namespace: WeaverCore.Assets.Components
Assembly: WeaverCore.dll
Syntax
public class WeaverArrowPrompt : MonoBehaviour

Fields

| Edit this page View Source

DestroyOnHide

Declaration
[Tooltip("Should the prompt automatically be destroyed when it fades out?")]
public bool DestroyOnHide
Field Value
Type Description
bool

Properties

| Edit this page View Source

Animator

Declaration
public WeaverAnimationPlayer Animator { get; }
Property Value
Type Description
WeaverAnimationPlayer
| Edit this page View Source

DefaultPrefab

Declaration
public static WeaverArrowPrompt DefaultPrefab { get; }
Property Value
Type Description
WeaverArrowPrompt
| Edit this page View Source

IsVisible

Is the prompt currently visible?

Declaration
public bool IsVisible { get; }
Property Value
Type Description
bool
| Edit this page View Source

Label

The text object for displaying the label

Declaration
public TextMeshPro Label { get; }
Property Value
Type Description
TextMeshPro
| Edit this page View Source

Owner

The owner of this arrow prompt. If the owner is destroyed, so is the prompt

Declaration
public GameObject Owner { get; }
Property Value
Type Description
GameObject
| Edit this page View Source

OwnerSet

Does this prompt have an owner configured?

Declaration
public bool OwnerSet { get; }
Property Value
Type Description
bool
| Edit this page View Source

Renderer

The main sprite of the prompt

Declaration
public SpriteRenderer Renderer { get; }
Property Value
Type Description
SpriteRenderer
| Edit this page View Source

Shadow

The sprite for displaying a drop shadow

Declaration
public SpriteRenderer Shadow { get; }
Property Value
Type Description
SpriteRenderer

Methods

| Edit this page View Source

Hide()

Hides the prompt. If DestroyOnHide is true, this will also destroy the prompt object when done

Declaration
public void Hide()
| Edit this page View Source

HideInstant()

Instantly hides the prompt

Declaration
public void HideInstant()
| Edit this page View Source

SetLabelText(string)

Sets the prompt's text to a new value

Declaration
public void SetLabelText(string text)
Parameters
Type Name Description
string text

The new text to set

| Edit this page View Source

SetLabelTextLang(string, string)

Sets the prompt's text to a new value by finding the language key and sheetTitle

Declaration
public void SetLabelTextLang(string langKey, string sheetTitle = "Prompts")
Parameters
Type Name Description
string langKey

The lang key to retrieve

string sheetTitle

The sheet title to retrie

| Edit this page View Source

Show()

Shows the prompt

Declaration
public void Show()
| Edit this page View Source

ShowInstant()

Instantly shows the prompt

Declaration
public void ShowInstant()
| Edit this page View Source

Spawn(GameObject, Vector3)

Spawns a new arrow prompt. Use the Show() function to make the prompt visible

Declaration
public static WeaverArrowPrompt Spawn(GameObject owner, Vector3 spawnPosition)
Parameters
Type Name Description
GameObject owner

The owner of the arrow prompt. If the owner is destroyed, so is the prompt

Vector3 spawnPosition

The position of the new prompt

Returns
Type Description
WeaverArrowPrompt

Returns an instance to the arrow prompt

| Edit this page View Source

Spawn(Vector3)

Spawns a new arrow prompt. Use the Show() function to make the prompt visible

Declaration
public static WeaverArrowPrompt Spawn(Vector3 spawnPosition)
Parameters
Type Name Description
Vector3 spawnPosition

The position of the new prompt

Returns
Type Description
WeaverArrowPrompt

Returns an instance to the arrow prompt

| Edit this page View Source

Spawn(WeaverArrowPrompt, GameObject, Vector3)

Spawns a new arrow prompt. Use the Show() function to make the prompt visible

Declaration
public static WeaverArrowPrompt Spawn(WeaverArrowPrompt prefab, GameObject owner, Vector3 spawnPosition)
Parameters
Type Name Description
WeaverArrowPrompt prefab

The arrow prompt prefab to spawn

GameObject owner

The owner of the arrow prompt. If the owner is destroyed, so is the prompt

Vector3 spawnPosition

The position of the new prompt

Returns
Type Description
WeaverArrowPrompt

Returns an instance to the arrow prompt

| Edit this page View Source

Spawn(WeaverArrowPrompt, Vector3)

Spawns a new arrow prompt. Use the Show() function to make the prompt visible

Declaration
public static WeaverArrowPrompt Spawn(WeaverArrowPrompt prefab, Vector3 spawnPosition)
Parameters
Type Name Description
WeaverArrowPrompt prefab

The arrow prompt prefab to spawn

Vector3 spawnPosition

The position of the new prompt

Returns
Type Description
WeaverArrowPrompt

Returns an instance to the arrow prompt

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾