Possible to format int in input field?

Is it possible to format the integer in an input field?

I have a field at the start of the game asking how much money the player would like to start with.
But a number in the millions isn’t very readable without formatting. Hence I’d like to add numbergroup separators.

I’d say ‘OnValueChanged’ the game runs through my formatting code which puts the (local) numbergourp separators in place.

I have two problems with this:

  • Changing the text after ‘OnValueChanged’ probably triggers ‘OnValueChanged’ again and puts me in a loop.

  • I don’t think it would even allow me to put in the separators since it is a ‘int only’ field?

The last issue could be solved by setting the field to be a string field and checking whether it’s an int afterwards, but that’s not as pretty.

Is there a good solution to this? (especially the first issue then)

Well the easiest solution is: The input field always gets created with the place holder and the text

first duplicate the text. click on the first text object (the one created by unity) and set its color to transparent. know on the value changed of the inputfield format the int in the second text (the one duplicataed)