ActionItemData
A class in Root.Township, Alta.QuickAccessActions.
Settings for an item summoned from the quick access menu: what to spawn, where, and when it despawns if the player walks away.
- Listed in Players and characters
- Inherits or implements
ScriptableObject - Attributes
CreateAssetMenu
Constructors
| Member | What it is |
|---|---|
ActionItemData() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
8 private and internal fields
| Member | What it is |
|---|---|
private SummonActionItemQuickAccess action | Backing field for Action, the quick access action that summons this item. |
private NetworkPrefab actionItemPrefab | Backing field for ActionItemPrefab, the prefab spawned for the action. |
private float distanceFromPlayer | Backing field for DistanceFromPlayer. Default 1. |
private float maxDistanceFromPlayerSquared | Backing field for MaxDistanceFromPlayerSquared, stored squared. Default 9 (3 m). |
private PositionEvent onActionItemDisappearEffects | Backing field for OnActionItemDisappearEffects, effects played where the item vanishes. |
private PositionEvent onActionItemSpawnEffects | Backing field for OnActionItemSpawnEffects, effects played where the item appears. |
private float outOfRangeHaptic | Backing field for OutOfRangeHaptic. Default 0.2. |
private float timeToDespawn | Backing field for TimeToDespawn. Default 4. |
Properties
| Member | What it is |
|---|---|
SummonActionItemQuickAccess Action { get; } | The quick access action that summons this item. |
NetworkPrefab ActionItemPrefab { get; } | The prefab spawned. |
float DistanceFromPlayer { get; } | How far in front of the player it spawns. |
float MaxDistanceFromPlayerSquared { get; } | Squared distance from the player's head beyond which the despawn timer runs. |
PositionEvent OnActionItemDisappearEffects { get; } | Event with a position, for effects when the item goes. |
PositionEvent OnActionItemSpawnEffects { get; } | Event with a position, for effects when the item appears. |
float OutOfRangeHaptic { get; } | Haptic strength on both hands while the item is out of range. |
float TimeToDespawn { get; } | Seconds out of range before the item is destroyed. Resets when back in range. |
Used in
Members of other types that take, return or hold a ActionItemData:
ActionItemHandler.ActionItemHandler, ActionItemHandlerCollection.ActionItemHandlerCollection, ActionItemHandlerCollectionMap.ActionItemHandlerCollectionMap, ActionItemHandlersBase.ActionItemHandlersBase, ActionItemHandlersBase.actionItems, ActionItemsManager.actionItems, ActionItemsManager.GetTargetPositionAndRotation, ActionItemsManager.PlayItemEffects.