Game Development Community

Am I in World Editor or Game?

by Edward Rotberg · in Technical Issues · 12/14/2009 (8:15 pm) · 4 replies

Is there a quick way to determine if my code is running in the World Editor, as opposed to running in the game?

Thanks in advance,

= Ed =

#1
12/14/2009 (9:55 pm)
Do you exec your scripts from your game directory or from the editor directory? Alternatively, did you make any editor changes to the C++ code or was it all to the core engine files?
#2
12/14/2009 (10:34 pm)
I guess I should have been more specific. I am interested in determining this from my custom RenderDelegate, in C++. I have no need to know this in a script.

= Ed =
#3
12/14/2009 (10:45 pm)
extern bool gEditingMission;

...


if (gEditingMission)
{
// I'm in the editor!
}
#4
12/14/2009 (11:48 pm)
Got it! Thanks Kaimi!

= Ed =