# change text

**URL:** https://discussions.unity.com/t/change-text/441980
**Category:** Scripting
**Created:** [April 10, 2011, 12:50pm UTC](https://discussions.unity.com/t/change-text/441980 "2011-04-10T12:50:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![anon\_95677093](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon\_95677093](https://discussions.unity.com/u/anon_95677093)
#### Post date: [April 10, 2011, 12:50pm UTC](https://discussions.unity.com/t/change-text/441980/1 "2011-04-10T12:50:10Z")

</div>

how can i change my 3D text’s text with a java script?

---

<div class="post-metadata">

### Author: ![ZigZarc](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/zigzarc/32/1002609_2.png) [@ZigZarc](https://discussions.unity.com/u/ZigZarc)
#### Post date: [April 10, 2011, 1:26pm UTC](https://discussions.unity.com/t/change-text/441980/2 "2011-04-10T13:26:18Z")

</div>

```auto
private var textMesh : TextMesh;

function Awake ()
{
	textMesh = GetComponent(TextMesh);
}

function Update ()
{
	textMesh.text = yourText;
}

```
