private void renderLabel() { if (GameManager.instance.UIManager.sceneCanvas && (canvas = GameManager.instance.UIManager.sceneCanvas.gameObject)) { if (floatingIcon == null) { floatingIcon = iconCallBack(uiable.getIconableInfo()); floatingIcon.SetActive(false); floatingIcon.transform.SetParent(canvas.transform); setPosition(); } if (shouldRender()) { setPosition(); floatingIcon.SetActive(true); } else { floatingIcon.SetActive(false); } } }
public void set(IUIable infoable) { obj = infoable; Debug.Log("SET SPACEABLE ICON"); mesh.materials[0].mainTexture = obj.getIconableInfo().icon.texture; }