- Home /
Setting Text.text in UI efficiency?
Would it make a difference if I set the text of a UI Text only when it changes, vs every update/FixedUpdate?
So I guess the question, is SendMessage/BroadcastMessage actually more efficient than just updating a variable every frame? I don't have time right now to test it
Answer by Jessespike · Dec 15, 2015 at 05:59 PM
Yes, creating a new string when it's needed is more efficient than creating a new string every frame.
SendMessage VS Updating a string every frame? Those are two different things, I mean, you don't need SendMessage to update a variable. SendMessage isn't very efficient, so I wouldn't use it. But updating a string every frame even when not needed isn't efficient either. Just update the string when needed.
Your answer
Follow this Question
Related Questions
How to add string once to the UI text, but update the substring every frame in unity? 0 Answers
Having lots of Update Functions 2 Answers
Unity 4.6: GetComponent().onClick... how do you add an event to button click? 6 Answers
Unity to Check Arduino LED Status 0 Answers
Button.onClick.AddListener 1 Answer