Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- /*
- * example script to send text to an STM object.
- */
- [RequireComponent(typeof(SuperTextMesh))]
- public class STMTextSend : MonoBehaviour
- {
- public SuperTextMesh stm;
- [TextArea(3,10)]
- public string text;
- public void OnValidate()
- {
- if(stm == null) return;
- stm.text = text;
- }
- public void Reset()
- {
- stm = GetComponent<SuperTextMesh>();
- text = stm.text;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment