Search Unity

Combat log, scroll rect text limits?

Discussion in 'UI Toolkit' started by flipwon, May 22, 2019.

  1. flipwon

    flipwon

    Joined:
    Dec 29, 2016
    Posts:
    179
    I was thinking of making a rich-text combat log for my game, but was wondering if there any any limitations to scrolls rects etc? Is there a certain number of characters or length of string that starts to kill unity? Is there another way I should look at doing this?

    The last thing I read was from quite a while ago saying unity crapped the bed when I reached around 4000 characters but I was wondering if this is still the case etc.
     
  2. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    Look into pooling/recycling Log entry lines. That's what I do for most long/"infinite" scrollers, although it complicates layout. There are several code samples up on github but we've eventually had to just roll our own solution as we had specific animation needs.

    EDIT: Replied before I realized this was UI elements sub-forum. That may have a completely different performance characteristics for long lists, my advice was for the old UI system.
     
  3. flipwon

    flipwon

    Joined:
    Dec 29, 2016
    Posts:
    179
    I'll give it a shot anyhow. Seems like a reasonable solution either way