Update frequency / wait for GPU query

Hello,

The PlayCanvas docs mention that the update method is called every frame - does this imply that it is blocked by the GPU? i.e. PlayCanvas will wait until the frame has finished rendering, before it allows another CPU cycle to be run, and so there will only ever be one update called for each drawn frame?

Thanks in advance!

Matt

Hi @Matt_Newcombe and welcome,

That’s correct, each script update() method will be called once per frame. Specifically just before the frame is rendered.

You can see the pc.Application call stack order here:

2 Likes

Ace, thanks for the prompt response!

1 Like