View by Component
Physics , Physics 2D , Audio , UI , Tilemap , Cinemachine , Timeline , Network , Animation , Animator , Sprites , Scripting , Tips , Colliders , 2D Colliders , Rigidbody , Rigidbody 2D , Interaction , Editor , Game Mechanics , In-App Purchase , Material , General , Prefab , ProGrids , Light , Rendering , Ads , Scriptable Objects , Events , Level Design , Making Of , Assets , Procedural , ProBuilder , Particles , Machine Learning , News & Announcements , Conference , Enemy & NPC , PlayerPrefs , Post Processing , Interview , Shader , VFX , TextMeshPro , InputSystem , XR
How to display and format big numbers ? String formats, monospace and Text Mesh Pro
Uploaded by Christina Creates GamesShare: Twitter Facebook
Idle games, business sims and highscores have one thing in common: They display a lot of crucial big numbers. Sometimes on their own, more often as part of a table, especially in simulation games. Using just any font will lead to headaches on how to format them in a way that is easy to understand at a glance, so let's have a look at how we can solve this problem.
Links to the documentation pages mentioned:
Standard numeric font strings: https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
Custom numeric font strings: https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings
The video description won't let me add the code for displaying sprites, please see my pinned comment for that.
-- Chapters --
00:00 The topic and what we'll be creating
00:12 The chapters of this video
00:54 The right font for numbers in certain contexts: the monospace font
02:10 How to force any font into becoming a monospace font with Text Mesh Pro
03:12 Formating with a purpose
03:52 Standart numeric format strings
04:39 Custom numeric format strings
05:37 Bonus: old style numerals for inline numbers in text boxes
06:30 Liked the animations? Watch my Text Animator tutorial
06:42 Thank you for watching ?
#unitytutorial
Links to the documentation pages mentioned:
Standard numeric font strings: https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
Custom numeric font strings: https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings
The video description won't let me add the code for displaying sprites, please see my pinned comment for that.
-- Chapters --
00:00 The topic and what we'll be creating
00:12 The chapters of this video
00:54 The right font for numbers in certain contexts: the monospace font
02:10 How to force any font into becoming a monospace font with Text Mesh Pro
03:12 Formating with a purpose
03:52 Standart numeric format strings
04:39 Custom numeric format strings
05:37 Bonus: old style numerals for inline numbers in text boxes
06:30 Liked the animations? Watch my Text Animator tutorial
06:42 Thank you for watching ?
#unitytutorial