public void AddUnitUI(Transform canvasTransform) { hasUI = true; UnitUI unitui = Instantiate(unitUIPrefab, Camera.main.WorldToScreenPoint(transform.position), Quaternion.identity, canvasTransform); unitui.gameObject.name = "SelectedUnitUI"; unitui.Init(this); }
public IUnitUI SetUpUnitUI(UnitUI toSetUp, IUnit data) { toSetUp.Init(data); _factory.instanceManager.RegisterNewElement(toSetUp); return(toSetUp); }