# Name of Unit

Grammar — Name of unit
FlagsNative | Function

Returns the name of a specific unit. This function should be preferred if you wish to account for behavior-based name overrides rather than displaying the name of the unit type.

# Arguments

  • unit — Unit

Returns — text

native text UnitGetName(unit inUnit);

Category: Unit / Basic

# Examples

# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod

LibPEB1.galaxy

// L5837
UnitGetName(libGame_gv_players[libNtve_gf_KillingPlayer()].lv_heroUnit)
// L6635
UnitGetName(libGame_gv_players[libGame_gf_HeroKilledKillingPlayer()].lv_heroUnit)
// L10782
UnitGetName(libGame_gv_players[lv_casterPlayer].lv_heroUnit)
// L10784
UnitGetName(libGame_gv_players[lv_targetPlayer].lv_heroUnit)
// L10810
UnitGetName(libGame_gv_players[lv_casterPlayer].lv_heroUnit)
// L10812
UnitGetName(libGame_gv_players[lv_targetPlayer].lv_heroUnit)
// L4543
UnitGetName(libNtve_gf_KillingUnit())
// L5219
UnitGetName(libGame_gv_players[libGame_gf_HeroKilledKillingPlayer()].lv_heroUnit)
// L5226
UnitGetName(libGame_gv_players[libGame_gf_HeroKilledKillingPlayer()].lv_heroUnit)

# mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod

LibPVEB.galaxy

// L930
UnitGetName(libGame_gv_players[lp_playerIndex].lv_heroUnit)
// L2342
UnitGetName(lv_targetHero)
// L2344
UnitGetName(lv_caster)
// L2410
UnitGetName(lv_resurrecter)
// L2473
UnitGetName(lv_itUnit)

# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod

LibPVEM.galaxy

// L488
UnitGetName(libGame_gv_players[lp_playerIndex].lv_heroUnit)
// L1897
UnitGetName(lv_targetHero)
// L1899
UnitGetName(lv_caster)
// L1963
UnitGetName(lv_resurrecter)
// L2030
UnitGetName(lv_itUnit)

# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod

LibPVEU.galaxy

// L1397
UnitGetName(lp_boss)

# mods/heroesdata.stormmod

SupportLib.galaxy

// L8827
UnitGetName(auto8C3F4A95_var)

# mods/heroesdata.stormmod

UILib.galaxy

// L4586
UnitGetName(lv_itHero)
// L7117
UnitGetName(lv_transportUnit)
// L7282
UnitGetName(lv_targetUnit)
// L7474
UnitGetName(lp_targetUnit)
// L7743
UnitGetName(lp_targetUnit)
// L7878
UnitGetName(lp_targetUnit)
// L7979
UnitGetName(lp_pingedUnit)
// L8071
UnitGetName(lp_pingedUnit)
// L8096
UnitGetName(lp_pingedUnit)
// L8196
UnitGetName(lv_pingingPlayerHero)

# mods/heroesmapmods/battlegroundmapmods/alteracpass.stormmod

LibMMAP.galaxy

// L496
UnitGetName(lv_closestEnemy)
// L2652
UnitGetName(lv_defenderUnit)

# mods/heromods/auriel.stormmod

LibHAUR.galaxy

// L175
UnitGetName(lp_unit)

# mods/novastoryassets.sc2mod

MapScript.galaxy

// L7317
UnitGetName(UnitFromId(895))
// L7323
UnitGetName(UnitFromId(1340))
// L7317
UnitGetName(UnitFromId(895))
// L7323
UnitGetName(UnitFromId(1340))

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L15458
UnitGetName(EventUnit())
// L15465
UnitGetName(EventUnit())

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L13848
UnitGetName(UnitLastCreated())

# mods/starcoop/starcoop.sc2mod

LibCOUI.galaxy

// L3021
UnitGetName(libCOUI_gv_cU_HeroUnit[lp_index][lp_player])

# mods/warcoop/warclassic.sc2mod

WarClassic.galaxy

// L1066
UnitGetName(lv_u)

# mods/warcoop/warmeleeai.sc2mod

LibW3AI.galaxy

// L326
UnitGetName(lv_u)