Skip to main content

QuickAccessMenuSettings

A class in Root.Township, Alta.QuickAccessActions.

Global settings for the quick access (wrist) menu: where its bubbles spawn, how it follows the hand and how titles show.

Constructors​

MemberWhat it is
QuickAccessMenuSettings()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

17 private and internal fields
MemberWhat it is
private float centerTitleBackgroundDiameterBacking field for CenterTitleBackgroundDiameter, the size of the background behind the center title.
private GameObject centerTitleBackgroundPrefabBacking field for CenterTitleBackgroundPrefab, the background shown behind the center title.
private int centerTitleMaxCharactersBacking field for CenterTitleMaxCharacters, the character limit for the center title (default 24).
private int centerTitleMaxLinesBacking field for CenterTitleMaxLines, the line limit for the center title (default 2).
private bool displayTitlesInCenterBacking field for DisplayTitlesInCenter, whether the selected bubble's title shows in the middle of the menu.
private bool isLerpingTowardsHandPositionBacking field for IsLerpingTowardsHandPosition. When true the menu follows the hand once it gets far enough away.
private float maxAngleBeforeLerpBacking field for MaxAngleBeforeLerp, degrees the menu can lag behind its target rotation before it starts turning to face the player.
private float maxBubbleDistanceSquaredBacking field for MaxBubbleDistanceSquared, how close (squared) the controller must be to a bubble to select it.
private float maxDistanceBeforeLerpBase distance the hand can move from the menu before it starts following. Used by MaxDistanceBeforeLerp.
private PooledObjectDefinition menuPrefabDefinitionBacking field for MenuPrefabDefinition, the pooled bubble prefab.
private float nestedMaxDistanceBeforeLerpExtra follow distance added per nesting level in MaxDistanceBeforeLerp.
private QuickAccessMenuSettings.QuickAccessMenuBubbleSelectEvent onSelectBubbleEventsSound and visual effects played when a bubble is selected, split by whether the bubble is active.
private AnimationCurve positionLerpSpeedOverDistanceBacking field for PositionLerpSpeedOverDistance, follow speed by how far the hand is from the menu.
private float rotationLerpSpeedBacking field for RotationLerpSpeed, how fast the menu turns towards the player.
private float spawnNestedRadiusBacking field for SpawnNestedRadius, the radius nested bubbles spawn at.
private float spawnRadiusBacking field for SpawnRadius, the radius top level bubbles spawn at around the hand.
private float targetDistanceBeforeLerpSquaredBacking field for TargetDistanceBeforeLerpSquared, extra squared distance where following stops.

Properties​

MemberWhat it is
float CenterTitleBackgroundDiameter { get; }Size of the centre title background.
GameObject CenterTitleBackgroundPrefab { get; }Background shown behind the centre title.
int CenterTitleMaxCharacters { get; }Most characters in a centre title.
int CenterTitleMaxLines { get; }Most lines in a centre title.
bool DisplayTitlesInCenter { get; }Whether bubble titles show in the middle of the menu.
bool IsLerpingTowardsHandPosition { get; }Whether the menu moves to follow the hand.
float MaxAngleBeforeLerp { get; }Angle the controller can turn before the menu starts following.
float MaxBubbleDistanceSquared { get; }Squared distance a hand must be within to pick a bubble, probably.
PooledObjectDefinition MenuPrefabDefinition { get; }Pooled prefab for the menu.
AnimationCurve PositionLerpSpeedOverDistance { get; }Follow speed by distance from the hand.
float RotationLerpSpeed { get; }How fast the menu turns to follow the controller.
float SpawnNestedRadius { get; }Radius for bubbles of a nested menu.
float SpawnRadius { get; }Radius bubbles are placed at around the menu centre.
float TargetDistanceBeforeLerpSquared { get; }Squared distance at which the menu stops following, probably.

Methods​

MemberWhat it is
float MaxDistanceBeforeLerp(int nestedLevel)Squared distance the hand can move before the menu follows; grows with nesting level.
void PlaySelectMenuEffects(QuickAccessMenuBubble bubble)Plays the active or inactive select sound and effect for a bubble.

Used in​

Members of other types that take, return or hold a QuickAccessMenuSettings: