DefaultSkillBar

Handles the default skill bar UI.

Inherits from SkillTreeUI.

Properties

NameDescription

skillSlotPrefab

Skill slot prefab object that will be instanced.

DefaultSkillSlot

placement

Placement of the skill bar.

DefaultSkillBar.Placement

slotCount

The number of slots that should be instantiated.

int

slotSpacing

Spacing between skill slots.

float

barSize

The size of the bar.

float

barPadding

Padding of the skill bar.

RectPadding

contentPadding

Padding of skill bar's content.

RectOffset

slotAlignment

Alignment of the skill bar content.

TextAnchor

slots

The skill slot instances.

List<DefaultSkillSlot>

canUseSkill

If the player is able to use a skill.

bool

isLocked

If the skill bar is currently locked. Locking prevents the player from using the skill bar.

bool

instance

The active DefaultSkillBar instance. This may be null if no DefaultSkillBar is in the scene.

DefaultSkillBar

Methods

Validate

Validates the skills in each slot to ensure the player has obtained them.

IsAssigned

Return Type: bool

Checks if a skill is assigned to a specific slot.

Parameters

NameDescriptionType

skill

The skill.

SkillNode

slotIndex

The index of the slot.

int

AssignSkillToSlot

Assigns a skill to a slot.

Parameters

NameDescriptionType

skill

The skill to assign.

SkillNode

slotIndex

The index of the slot.

int

UnassignSkillFromSlot

Unassigns a skill if it's assigned to a slot.

Parameters

NameDescriptionType

skill

The skill to unassign.

SkillNode

UnassignSkillToSlot

Unassigns the skill at a slot index.

Parameters

NameDescriptionType

slotIndex

The index of the slot.

int

UseSkill

Uses a skill by triggering its slot.

Parameters

NameDescriptionType

slotIndex

The index of the slot.

int

UpdatePlacement

Updates the placement of the skill bar based on the properties.

Enums

Placement

Supported skill bar placements.

NameDescription

Bottom

Place at the bottom of the screen.

Top

Place at the top of the screen.

Left

Place on the left side of the screen.

Right

Place on the right side of the screen.

Last updated