Skip to content

Instantly share code, notes, and snippets.

💀
Holding on

Kevin LeBlanc DrSharky

View GitHub Profile
@DrSharky
DrSharky / Caret.cs
Last active Dec 14, 2018
A script for Unity3D to customize the caret of a Text Mesh Pro Input Field game object.
View Caret.cs
using System.Collections;
using UnityEngine;
using TMPro;
using System;
/// <summary>
/// This class is for creating a custom caret for TextMeshPro InputField GameObjects in Unity.
/// To use, create a Text Mesh Pro Text object to contain the caret itself with this script attached.
/// Create a Text Mesh Pro Input Field objext and set its caret blink rate to 0.
/// Position the Text object over the Input Field, where you want it to initially be positioned.
You can’t perform that action at this time.