raymond
New Member
Posts: 47
Posts: 47
|
Post by raymond on Aug 29, 2018 4:17:31 GMT
Hello, I am optimizing my game. When my game begins and I move the player for the first time there is a big performance spike. As far as I have seen this happens only once on the players first move at the beginning of my game. Every other move in the game there is no spike or link to Core Gamekit. My Player does not have any scripting that links it with Core Gamekit, not even spawning. I did have a MasterAudio Event Sounds Script on the player but I disabled it. So I don't understand what the Profiler is showing. This may be an issue outside of Core Gamekit but according to the Profiler there seems to be a link. ![]() Here are 2 screenshots. This first one is Players First Move. ![]()  This second screenshot is representative of every move after that.  Thanks, Raymond
|
|
|
Post by DarkTonic Dev on Aug 29, 2018 5:13:18 GMT
I take it you're profiling the Unity editor, not on the device itself? I remember reading that there is no longer any Garbage Collection for Coroutines in a Unity fix a year or two ago on the device, but the profiler reports it incorrectly inside Unity when using the editor.
Let me know if you've profiled on the device, because I can change that - the only remaining CoRoutine, to not be one.
Although I have no idea why that CoRoutine would only do that once your player moves. It should not care and already be running its loop. I usually do a "deep profile" (there's a button on the profiler) for more information.
|
|
raymond
New Member
Posts: 47
Posts: 47
|
Post by raymond on Aug 29, 2018 5:58:05 GMT
I am Profiling within Unity Editor, not on a device. Here is the deep profile.  Attachments:
|
|
|
Post by DarkTonic Dev on Aug 29, 2018 7:38:59 GMT
Right. As I tried to say, see if that garbage collection is still there when you deploy to device and profile there. There are bugs with the profiler when using the editor.
|
|