PlayerHud

Use these methods to change the player HUD.

Static members

Member

Description

hudGameModeEnabled

Controls visibility of the game mode hud.

hudPlayerEnabled

Controls visibility of the player hud.

killCameraEnabled

Controls the Killed By sequence.

playerOrderState

The current player squad order state.

uiElementsLeft

The elements shown on the left side of the player hud.

uiElementsRight

The elements shown on the right side of the player hud.

Static methods

Method

Description

ClampElementTracking(id, clampSize, activateWhenClamped, deactivateWhenClamped)

Clamps the tracked element to the screen inside a border of size clampSize in pixels.

HideUIElement(element)

Controls visibility of individual UI elements of the player hud.

RegisterElementTracking(transform, rectElement, activateWhenVisible)

Makes the rectElement automatically follow the transform position.

RegisterElementTracking(actor, rectElement, activateWhenVisible)

Makes the rectElement automatically follow the actor.

RegisterElementTracking(worldPosition, rectElement, activateWhenVisible)

Makes the rectElement automatically follow the worldPosition.

RegisterElementTracking(transform, localOffset, rectElement, activateWhenVisible)

Makes the rectElement automatically follow the transform position with an offset.

RegisterElementTracking(actor, worldOffset, rectElement, activateWhenVisible)

Makes the rectElement automatically follow the actor with a world offset.

RemoveElementTracking(id)

Removes tracking from the specified tracking ID. Returns true on successful removal.

ShowUIElement(element)

Controls visibility of individual UI elements of the player hud.

Details

class PlayerHud
static bool hudGameModeEnabled

Controls visibility of the game mode hud.

static bool hudPlayerEnabled

Controls visibility of the player hud.

static bool killCameraEnabled

Controls the Killed By sequence.

static const PlayerOrderState playerOrderState

The current player squad order state. This value is used to display the state info text label in the HUD

static const array<UIElement> uiElementsLeft

The elements shown on the left side of the player hud.

static const array<UIElement> uiElementsRight

The elements shown on the right side of the player hud.

static void ClampElementTracking(int id, float clampSize, GameObject activateWhenClamped, GameObject deactivateWhenClamped)

Clamps the tracked element to the screen inside a border of size clampSize in pixels.

static void HideUIElement(UIElement element)

Controls visibility of individual UI elements of the player hud.

static int RegisterElementTracking(Transform transform, RectTransform rectElement, GameObject activateWhenVisible)

Makes the rectElement automatically follow the transform position. This is done by modifying the anchoredPosition value of the Rect Transform. Please make sure that the rectElement is a child to a canvas object, and that its Anchor Min/Max values are set to 0. Returns the tracker ID.

static int RegisterElementTracking(Actor actor, RectTransform rectElement, GameObject activateWhenVisible)

Makes the rectElement automatically follow the actor.

static int RegisterElementTracking(Vector3 worldPosition, RectTransform rectElement, GameObject activateWhenVisible)

Makes the rectElement automatically follow the worldPosition.

static int RegisterElementTracking(Transform transform, Vector3 localOffset, RectTransform rectElement, GameObject activateWhenVisible)

Makes the rectElement automatically follow the transform position with an offset.

static int RegisterElementTracking(Actor actor, Vector3 worldOffset, RectTransform rectElement, GameObject activateWhenVisible)

Makes the rectElement automatically follow the actor with a world offset.

static bool RemoveElementTracking(int id)

Removes tracking from the specified tracking ID. Returns true on successful removal.

static void ShowUIElement(UIElement element)

Controls visibility of individual UI elements of the player hud.