Skip to content

SusNameplate

SusNameplate

Compact unit label — name, optional level, optional HP strip, faction slot.

Package

SusKit · World (commercial)

Open in Playground

SusKit · World

Props

NameTypeDefault
UnitNameProp<string>""
LevelProp<int>0
HpFractionProp<float>-1f
AlignProp<string>"start"v-model

Slots

Name
faction

Events

No public events.

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • np-hp-bar
  • np-hp-fill
  • np-level
  • np-name
  • np-root
  • np-root--align-center
  • np-root--align-end
  • np-root--align-start
  • np-row
  • sus-slot

Usage

csharp
var plate = new SusNameplate();
plate.UnitName.Value = "Knight";
plate.Level.Value = 12;
plate.HpFraction.Value = 0.72f;
plate.Align.Value = "start";
xml
<template>
  <sus:SusNameplate :UnitName="Name.Value"
                    :Level="Level.Value"
                    :HpFraction="Hp.Value"
                    :Align="Align.Value">
    <template #faction>
      <!-- Optional faction badge / icon -->
    </template>
  </sus:SusNameplate>
</template>

<script>
public Prop<string> Name = new("Knight");
public Prop<int> Level = new(12);
public Prop<float> Hp = new(0.72f);
public Prop<string> Align = new("start");
</script>
PropRole
UnitNameDisplay name
Level> 0 shows Lv.N; 0 hides level
HpFraction≥ 0 shows HP bar; default -1 hides it
Alignstart · center · end

Notes

  • Default slot name for the faction chrome: faction.
  • For world-tracked plates with auto-bind to a Transform, prefer SusUnitNameplate.