void DespawnerHUDName() { if (null != HudName) { UIHudManager.Instance.Despawner(HudName.Cache); HudName.SetTarget(null); HudName = null; } }
void CreateHUDName() { DespawnerHUDName(); GameObject go = UIHudManager.Instance.SpawnerHUD(); HudName = Util.AddComponent <UIHUDName>(go); HudName.Init(); HudName.SetTarget(CacheModel); HudName.SetName(RoleName); HudName.Cache.localScale = Vector3.one; }