Why Update the Text Every Frame?

Is it overkill to update the text every single frame? You seem to use events a lot, so I would have expected you to create an event or something to handle when text needed to be updated.

Since there are so many grid objects and every single one is updating every frame, it just seems like a waste of resources.

1 Like

Ideally, you’re absolutely right. Often, as we build a game, we take care of the basics, and then worry about improving the performance at a later time.

Most UI is better served via events than constant changes through Update()

2 Likes

Yes you are right you should use events for updating things that change very infrequently.

However in this case this is a Debug class, it’s not something that will ever be used in the final game, only in development, so in such cases performance really isn’t a concern, unless the performance is so bad that it causes issues during development which for a simple text update should not be the case.

2 Likes

Thank you for the (fast) responses! As I’m still learning, it’s helpful to verify that I’m thinking about things in the right way. I’m understanding things a lot better now.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms