I have images of 0 to 9 numbers. I want to use them to show numbers like score and health, etc. The system will calculate the score and health and then show. To show it as image, I think the system needs to find out the number of each unit of a number. Then combine the numbers to form score or health. But how can I do that by C# script?
It’d probably be easiest to make your images 1 - 9 into a font and draw that to the GUI.
Otherwise, you’d need to do something like breaking the score (for example, an int
) into its component digits by converting it to a string, then to a charArray, then map each element of that array to the corresponding number image.