c# - Why am I getting 30 draw calls from an empty GameObject in my scene in Unity3D? -
first of all, i'm talking setpass calls, understand draw calls.
i have empty gameobject use camera target in game. i've positioned above character , when reaches x height camera moves up.
with camera target enabled, 60 setpass calls. when disable it, around 30.
why simple object produce many setpass calls?
here's screenshot empty gameobject enabled:
here's screenshot without gameobject enabled:
here empty gameobject:
this reference empty gameobject(cameratarget):
void fixedupdate(){
if (cameratarget != null){ if (cameratarget.transform.position.y > thistransform.position.y) { thistransform.position = new vector3 (0, mathf.smoothdamp (thistransform.position.y, cameratarget.transform.position.y, ref velocity.y, smoothtime), 0); } }
}
when disable empty gameobject during gameplay game runs fine , camera still follows empty gameobject though it's disabled , i'm getting way less setpass calls... weird.
edit:
the label icon attached empty gameobject causing increase in draw calls:
edit:
i disabled "gizmos" in game window , has removed draw calls across of scenes. guess it's issue when running game in editor.
unity 5 have neat feature called frame debugger. can capture frame , see going on exactly, more informations here http://blogs.unity3d.com/2014/07/29/frame-debugger-in-unity-5-0/
Comments
Post a Comment