Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Keeping 3D Text in box

Discussion in 'Scripting' started by fredyyanez, Jul 16, 2014.

  1. fredyyanez

    fredyyanez

    Joined:
    Jul 8, 2014
    Posts:
    33
    Is there a way to keep the 3D text in a cube so that the text wont be outside the boundaries of the cube? Thanks!
     

    Attached Files:

  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    you are really going to have to explain how you are getting that text into your scene: is it generated?, is it fixed in the scene?

    from what you've posted so far we don't know what you are trying to do, or how you are trying to do it, so answering it in a helpful way is going to be tricky; so more detail please :)
     
  3. fredyyanez

    fredyyanez

    Joined:
    Jul 8, 2014
    Posts:
    33
    So I'm getting the data from the cloud. Im using a JSON file to organize the data.


    But I think what you mean is the following. I have a cube and I have cube_text which I an instance of cube.
    Code (CSharp):
    1. GameObject.GetComponent<TextMesh> ().text = other.TextFunc("link");
    Where other.TextFunc("link") is the 'string' itself