public void SetLabel(string text) { UnityEngine.UI.Text label = uiRect.GetComponent <Text>(); label.text = text; float angle = HexMapCamera.GetRotationAngle() + 30f; int delta = Mathf.FloorToInt(angle / 60f); if (delta == 6) { delta = 0; } uiRect.localRotation = Quaternion.Euler(0f, 0f, -60f * delta); }