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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

String Too Long for TextMeshGenerator

Discussion in 'Scripting' started by hamsterbytedev, May 15, 2015.

  1. hamsterbytedev

    hamsterbytedev

    Joined:
    Dec 9, 2014
    Posts:
    353
    So, I've got a problem. I have a Text component that I am using to display a string, but as that string gets to a certain length I get an error in the console that says 'String too long for TextMeshGenerator' Cutting characters...

    I have more or less resigned to the fact that I have to split this text between several different components and objects, but I would really rather not do that. Is there a way that I can just display a very large string, i.e. a few pages from a text file, without having to split that string into pieces and display it with multiple instances of the Text component.

    I'm using Unity 5 with the new UI features. Any advice would certainly be appreciated. Thanks!
     
  2. hamsterbytedev

    hamsterbytedev

    Joined:
    Dec 9, 2014
    Posts:
    353
    I've come up with a solution that allows me to use only one text component, but it's a little hacky. Still open to other suggestions.
     
  3. proto_monkey

    proto_monkey

    Joined:
    Jun 7, 2015
    Posts:
    18
    What was your solution ? I have run into this, and would rather not go the route of having multiple text objects.