How to Combine this two string together to display?

yanggood

New member
Joined
Apr 28, 2021
Messages
1
Programming Experience
Beginner
timeText.text = string.Format("{0:0}:{1:00}", minutes, seconds);
timeText.text = Mathf.CeilToInt(time).ToString();



Hi! anybody can help? how to combine these two string above together in one workable script?
 
Concatenate the two strings first, then assign to your text property.
 
Think about what you're doing there. The first line already combines multiple values into a single string. Why can't you just add one more value to that?
C#:
timeText.text = string.Format("{0:0}:{1:00} {2}", minutes, seconds, Mathf.CeilToInt(time));
 
Back
Top Bottom