Because the graph is updated by the MonoManager component, there is a 1 frame delay between instantiating an object containing a graph and the first pass through that graph. So objects that should have been placed by the first pass through the instanced graph are rendered in their default (i.e. from prefab) positions for that frame.
I’ve made the following change in Graph.cs StartGraph, which seems to solve the problem:
1
2
3
4
5
6
if(autoUpdate){
MonoManager.current.onUpdate+=UpdateGraph;
UpdateGraph();
}
Is this the proper way to do it, or is there a better one?
This should work correctly. Just make sure to move this whole piece of code you posted at the very end of the StartGraph method, so that the other callbacks (OnGraphStarted etc) are called first and before the UpdateGraph.
I will do some further testing to see if this does not impose any other issues and if not, I will make the change as well.
Thanks 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.