What is the Priority in BindToRenderStep?

ive read the docs of it but i still dont understand, can someone explain it easier?

Basically when Roblox renders and calculates things in every frame, or multiple times per frame, it does it in a specific order, according to the task scheduler.

When providing a priority in :BindToRenderStep, it allows you to assign a function to be called when a cartain point in the task scheduler is reached.

You will notice that in that image, there are events such as “Heartbeat” “RenderStepped” and “Stepped”. These events are fired every frame but only when that point in the rendering process is reached. The reason you might use :BindToRenderStep in place of these events is because it gives the developer more precise control to their systems if that makes sense when it comes to relations with the task scheduler.

For a quick example, in some cases you may want to change properties after the camera is updated in cases like adding onto preset camera behaviour (for example clamping one of the camera’s rotation axes should be done after the camera is updated, else you might notice the camera sort of jitters).

If you want to read up on the task scheduler, you can do so here: Task Scheduler | Roblox Creator Documentation


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