The TextMeshPro Input field will make your life easy, whether you need to allow players to rename characters, buy items, or input values in-game.
In this video, I will guide you step by step through the process of creating a TextMeshPro Input Field in Unity. Starting from a simple scene setup, we will explore all the key features and components of the TextMeshPro Input Field, explaining how to customize them to best fit your game.
From creating and customizing the input field to writing a simple script for grabbing the player's input, you'll learn everything you need to know to utilize this super helpful feature.
Moreover, I'll provide tips on how to limit characters, filter input content, and enhance the user experience by manipulating caret appearance, placeholder text, and much more. By the end of this video, you will know how to build an input field from scratch and how to use the advanced features of TextMeshPro Input Field in Unity to make your game more interactive and engaging.
📖 Chapters 🔖
00:00 What to use the TextMeshPro Input field for
00:22 Our final outcome of this tutorial
00:41 Setup of the basic scene
00:57 Adding a TextMeshPro input field
01:21 Structure of the TextMeshPro input field and customizing the look
01:53 How to get value from TextMeshPro Input Field
02:29 UnityEvents provided by the TextMeshPro Input Field
02:53 Call a method when player hits enter in Input field
03:24 Test run
03:46 How to limit number of characters the player can enter in the input field
04:19 How to set up the TextMeshPro input field to only allow for numbers, letters or special cases
04:33 In case of Numbers: Add parsers to your script that parse from string to int or float
04:43 How to display stars instead of input values for passwords
04:49 How to disable Rich tag entry and why you should care
05:14 Quality of life features
05:28 Customizing the look of the caret and selection color
05:44 How to grab your player's attention for input fields: animation
06:51 Adding a button to click set the value instead of enter
📁 Get the PDF Version of my tutorials
Would you rather read a book? I have a collection of eBooks on the Unity UGUI System here:
📘 Itch: https://christinacreatesgames.itch.io/
💬 Join the Discord
You are very welcome to join / discord !
🎮 Play My Games
🎲 https://christinacreatesgames.itch.io
🛍️ Recommended Assets
https://assetstore.unity.com/lists/hi... [affiliate]
📖 List of books all around Gamedev and Design I recommend: https://www.christinacreatesgames.com...
Otherwise, using my affiliate codes for these stores helps to support my channel:
🛒 Unity Asset Store: https://assetstore.unity.com/?aid=110... [affiliate]
🏪 Synty Store: https://syntystore.com/christinacreat... [affiliate]
🪸 Envato Elements: https://1.envato.market/ChristinaCrea... [affiliate]
🔖Humble Bundle: https://humblebundleinc.sjv.io/xLGLNR [affiliate]
🌟 Actionable UI Feedback for Your Game
I offer UI consulting for gamedev projects! With 15+ years of design experience and a background of a teacher, I’m here to help:
👉 Learn more: https://www.vennegerts.com/en/gamedev...
☕ Support Me on Ko-fi
If you enjoy the content and want to support my work:
💛 Buy me a cocoa: https://ko-fi.com/christinacreatesgames
#unitytutorial #unity3d #gamedev #indiedev