SusNameplate

Compact unit label — name, optional level, optional HP strip, faction slot.
Package
SusKit · World (commercial)
Props
| Name | Type | Default | |
|---|---|---|---|
UnitName | Prop<string> | "" | |
Level | Prop<int> | 0 | |
HpFraction | Prop<float> | -1f | |
Align | Prop<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-barnp-hp-fillnp-levelnp-namenp-rootnp-root--align-centernp-root--align-endnp-root--align-startnp-rowsus-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>| Prop | Role |
|---|---|
UnitName | Display name |
Level | > 0 shows Lv.N; 0 hides level |
HpFraction | ≥ 0 shows HP bar; default -1 hides it |
Align | start · center · end |
Notes
- Default slot name for the faction chrome:
faction. - For world-tracked plates with auto-bind to a Transform, prefer SusUnitNameplate.