using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class AngleToNumber : MonoBehaviour { public Handler handle;//крутилка public TextMeshPro number;//счетчик private void Start() { handle = this.gameObject.GetComponent(); } private void LateUpdate() { if (handle.drag) { var k = handle.gameObject.transform.localEulerAngles.z; int count = 9-(int)(handle.gameObject.transform.localEulerAngles.z / 36); number.text = count.ToString(); } } }