I am getting garabge with PoolBoss.Despawn. Specifically with GetPrefabName(), within that it is String.substring, string.substringunchecked, and string.internalAllocateStr() and Object.get_name. It is a pretty big spike. Any idea what might be causing this and how to fix it? I must be Depawning incorrectly because I am also getting it all over the place. Here is an example of what im doing. Im also getting spikes from GameObject.SetActive and GameObject.Deativate sometimes with garbage sometimes without.
Post by DarkTonic Dev on Sept 30, 2017 5:55:54 GMT
That's what happens for us to get the "non-clone" name of the game object. If you already happen to know what that is, you can pass it in as the 2nd parameter of the Despawn call, and it won't need to do string operations to figure it out.