Hello everyone,
I’m actually using DrawMeshInstanced and I have a performance problem.
Actually, Object.CompareBaseObjects() is taking most of the time for this function.
It’s it possible to not check the the UnityEngine.Object but only if the object passed is null ?
GameObject Obj;
if(Obj == null)
Is actually slower than
if( (object)Obj == null)
If not, is it possible to provide an Unsafe Function that do not use CompareBaseObjects.
Actually when using DrawMeshInstanced, user already check if Mesh or GameObjects are alive.
If not, why this take so much time to compare objects and how to reduce this latence problem ?
This spike/lag doesn’t occur all frames, but sometimes randomly. It’s may be related to the GC Collect, but i’m not able to find any GC call during this spikes.
Thank you.
