Search code examples
unity-game-enginespinnertextfieldeditbox

Text field with spinner control in Unity


I want to implement an Edit box with a spinner control in Unity. Something like this:

enter image description here

I couldn't find an off-the-shelf component for this. I've also looked up the Unity Forums and haven't found anything relevant. Does anyone know how I could do this?


Solution

  • If you do not find something fitting on the asset store either (there are some comprehensive UI libraries), create a textfield and two buttons. For the arrows you could use special Unicode symbols which are supported by TextMeshPro UI Text renderers. The script to make use of the buttons should be fairly trivial. Don't forget to turn it all into a prefab for reusage.