728x90 float to string1 Unity & C# ~ 시간을 나타내는 법(float to string) float timeValue = 90; // second try { string time1 = string.Format("{0:#0}:{1:00}", Mathf.Floor(timeValue / 60), Mathf.Floor(timeValue) % 60); Debug.Log($"Change time second : {time1}"); } catch(Exception e) { Debug.LogError($"timeValue error {e}"); } try { string time2 = string.Format("{0:00}:{1:00}", Mathf.Floor(timeValue / 60), Mathf.Floor(timeValue) % 60); Debug.Log($"Change time second2 : {.. 2023. 11. 3. 이전 1 다음 SMALL