How "expensive" is LateUpdate?

I am running into issues where changing the aspect ratio mid-game moves 3d objects acting as menu items into undesired and potentially hazardous locations, such as on screen when it is supposed to be off screen. It seems that I cannot prevent a player from doing this in every circumstance (like hitting alt-enter to full-screen it, which adjusts the ratio if needed. Not helpful for me.) I have two options. I can create a series of scripts that will keep the aspect ratio the same, no matter the resolution, or I can add scripts to the buttons that place them according to the horizontal screen resolution. I can do this, but notice that it would still not prevent the player from changing the ratio with full-screening the game. So I considered using LateUpdate to always ensure the button is in the correct place. Of course, that would create a lot of needless checks every frame, which raises the question, how expensive is LateUpdate? Is that a good solution or should I pursue forcing the ratio the entire time? Thanks.

The same expense as Update. It’s merely a loop that runs later, after a bunch of other stuff, but still in the same frame. It’s organisational. Perhaps you want to defer some actions until later, perhaps after animation has been calculated. Docs explain it. Docs are lonely. Nobody visits the docs.

5 Likes

Thanks for the help.

for the record, docs are my #1 go-to. I like docs. they’re pretty good company.