#Uff it s a bit spagetti but I ll try to

1 messages · Page 1 of 1 (latest)

raw sundial
#

I'll make it a thread

#

Game is a tower defence where you can interact with the board through powers that can: instantiate seeds, make those seeds grow, burn plants etc.

sick smelt
#

Okay

#

By the way, just to make sure, did you profile in the editor or in a build?

raw sundial
#

Editor

#

Didnt even know you could profile in the build xD

#

In any case, the "Other" category was unchecked

sick smelt
#

Can you try a development build with auto attach profiler on? There could be something wonky going on in the editor that causes problems like this. And then we both spend time on something that isn't a problem.

#

Yeah, I learned a long time ago to not trust the editor when profiling. I only trust development build profiles. The amount of headaches I got from it... Then suddenly it was because of an animation window being open somewhere and stuff like that.

raw sundial
#

I did, and the peak seems to be lessened, but it still goes bellow 60 fps

#

Can I pause execution to analize the results?

sick smelt
#

Okay, so there is still a problem in the code then.

#

Yeah sure

raw sundial
#

How? the pause button doesn't seem to do anything xD

sick smelt
#

If you just click a frame it should stop in the profiler

#

Doesn't work? Then maybe just kill the game.

raw sundial
#

Okey, couple of things xD

#

Seems to be locked at 60 fps, and, maybe the peaks were because it does that when I alt+tab out of it

#

Give me a sec

sick smelt
#

Yeah, seems plausible, disable VSYNC

raw sundial
#

Found the culprit, thank you very much! xD

sick smelt
#

What was it? UnityChanHuh

raw sundial
#

pathfinding, every time I instantiate a new seed/plant, I have to find the easiest way to the centre of the map. I'm gonna have to redo the implementation of A* I was using

#

Could have been worst