- Home /
Drawing Gizmos in Editor Slow?
just wanted a confirmation, but is it me or is drawing out gizmos REALLY slow (of course this may be more system dependant)? Any tips for speeding things up?
Also does it continually run what's in OnDrawGizmosSelected() / OnDrawGizmos() or does it only run once upon refresh / changes to the view?
Answer by Bunny83 · May 08, 2012 at 02:41 AM
Well usually it's not that slow. How many gizmos are you drawing? Unity's editor is completely event driven, so usually it's only executed when certain events occur like a mousemove / click / drag.
Debug.Log (or print) is quite heavy if it's executed every frame or in repeatedly executed functions.
about 16 gizmos, not much I believe. I'm calling some functions that setup a layout and then draws it out. It can be kind of slow changing values in the inspector so I thought OnDrawGizmos() was constantly being called.
Also I tried running through this tutorial (http://active.tutsplus.com/tutorials/workflow/how-to-add-your-own-tools-to-unitys-editor/), but it crashed my Unity trying to change the size from 32 to some value like 1.
commented out a bunch of the Debugs, it's much faster now! Thank you!
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Draw a line via script and make a solid with it.. 1 Answer
Debug.draw rect 2 Answers