Debug.profile errors in parallel lua

This is my first time working with parallel lua (or any parallel systems for that matter) however I’m having an issue with debug.profile. I know this is because of parallel because if I synchronise then it gets fixed.

Output:
image

Code:

debug.profilebegin("ClientLoader")
		
		-- Clone state tables before doing any parallel
		local PlayerState = self.PlayerState:clone()
		local GameState = self.GameState:clone()
		debug.profilebegin("physicsStep")
		print("hello world")
		
		
		
		debug.profileend()
		
		task.synchronize() -- Allow for the updating of states
		
		debug.profileend()

I figured out the reason was if you sync/desync the history of debugs will be lost

1 Like

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