x


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?

more ▼

asked May 08 '12 at 02:38 AM

useless.unity.user gravatar image

useless.unity.user
60 8 12 15

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered May 08 '12 at 02:41 AM

Bunny83 gravatar image

Bunny83
45.5k 11 49 207

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.

May 08 '12 at 03:17 AM useless.unity.user

commented out a bunch of the Debugs, it's much faster now! Thank you!

May 08 '12 at 03:49 AM useless.unity.user
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3753
x69
x65

asked: May 08 '12 at 02:38 AM

Seen: 777 times

Last Updated: May 08 '12 at 03:49 AM