Lower time taken for Objects (Pre-Events) - Debugger

So my game is quite complex but I did manage to make it faster using the debugger by a lot. Fixed all bottlenecks as far as i know. Now looking at the debugger what i see is there is a lot of time being used to process the “objects (pre-events)”. These include pathfinding and tweens… So its about 30% of the processing so naturally i would like to lower it. I did already make it so pathfinding behaviour is only activated just before the player moves and deactivated just after.

Any help would be nice…

You can try to make a 1sec timer, with hold limit path founding to player. It should be about 30 times optimised for path founding behavior.

Do not forget about “for each object” and personal timers for each enemy. You can also pause the timers when enemies doesn’t needs to path found.

1 Like

The Pathfinding behaviour is only activated when they need to move. Rest of the time it’s disabled. So i don’t directly see how the timer can help because its the minimum time it is active already. It’s a turn based game, so I click a player and it activates the behaviour and it deactivates when its stopped.