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.

Static methods

Method

Description

ClampElementTracking(id, clampSize, activateWhenClamped, deactivateWhenClamped)

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

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.

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 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 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.