x


Update() only in Edit mode

Hey guys,

I currently have a script attached to a gameobject. It has [ExecuteInEditMode] enabled. This script is supposed to manage some gameobjects during edit mode. Additionally the script is supposed to do nothing during the game itself. I would love to use Update() to do some of the operations, but as far as I know Update is called during the game as well. Is there a way to determine whether you are in Edit mode inside of the script, or another way to solve my problem?

more ▼

asked Aug 03 '12 at 12:41 AM

DrahtMaul gravatar image

DrahtMaul
37 1 3 5

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

1 answer: sort voted first
more ▼

answered Aug 03 '12 at 12:42 AM

DaveA gravatar image

DaveA
26.5k 151 171 256

Thank you a lot!

Aug 03 '12 at 12:50 AM DrahtMaul
(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:

x3328
x495
x12
x10

asked: Aug 03 '12 at 12:41 AM

Seen: 307 times

Last Updated: Aug 03 '12 at 12:50 AM