Learn how to copy text from your Unity game to your system's clipboard to paste everywhere and add a colored highlight to your text to make it visible. This works with Text Mesh Pro You can paste text copied like this into input fields in your Unity game, or outside of your game, as it uses the operating system's clipboard. We go through four different ways to tackle this: Copy all of a text box's contents by button click, copy all of a text box's contents by clicking on the box itself, copy predefined words by utilizing the Text Mesh Pro link tag and copy text freeform like you are used to in a text editor.
DuckDuckQuack search field is a simple input field, the text block is an input field set to multi line :)
✍️ Script on Github
https://github.com/Maraakis/Christina...
📖 Chapters 🔖
00:00 Different ways to highlight and copy to clipboard
00:39 Copy to clipboard by button press
01:49 Adding colored marking to the text
03:03 Copy to clipboard by press on the textbox instead of button
03:18 Changing the color of the highlight
04:24 Copy and highlight predefined areas from a text with the link tag
08:53 Copy and highlight text like in a text editor - the problem
09:41 How to highlight and copy text from a text box - to solution
📁 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]
🟦 Amazon: https://amzn.to/3G8NgFq [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