Wait For the API calls in a world plugin
Hello,
It's pretty clear that the API calls are asynchronous when called inside the worldUpdate function.
I was wondering if there a exist a function that can be used to wait for the end of the calls ?
The idee behind it would be to pause the simulation, call a few function from the API, advance from one step while knowing that the previous calls have been executed, then call new API functions, etc.
Thanks a lot for anyone that can help, TTDM
What API calls are you referring to? Usually things which don't use transport shouldn't be asynchronous.
For exemple a spawn model. If I do the 2 following step: - "spawn a heigthmap using insertModelSdf (or string)" - "get the height of the heigthmap", this function crash because the heightmap does not exit. What i do at the moment is if start it right after OR on the next "au update" callback. What I currently do is to wait for 500 iterations before using the heigthmap.