Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Is Viewport in Editor?


Is there a blueprint node/variable that can tell me if the current viewport is running within the UE4 editor as opposed to the viewport of a cooked/packaged exe?

Product Version: Not Selected
more ▼

asked Sep 10 '14 at 04:55 PM in Blueprint Scripting

avatar image

509 73 66 99

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

There is a '#if WITH_EDITOR' in C++. Not entirely sure about the blueprints but you may want to look into that variable for a blueprint equivalent.

more ▼

answered Sep 11 '14 at 09:16 AM

avatar image

1.9k 53 40 200

avatar image ash22 Sep 11 '14 at 10:02 AM

Thanks Dune,

I did a quick search in the docs/wiki/forum and found several code references to WITH_EDITOR,
unfortunately there was no mention of any equivalent Blueprint usage.

Hopefully UE staff can confirm whether or not there is an equivalent blueprint node/function I can use.

UE is quite flexible so I wouldn't be surprised if there are other ways to test for IsViewportInEditor.

I could probably write some C++ to expose the WITH_EDITOR state to a blueprint but I'm trying to stay 'pure blueprint' for now. We'll see.

avatar image ash22 Oct 01 '14 at 06:35 PM

Anyone on staff with any comments?

Is there anything like a [IS_VIEWPORT_RUNNING_WITHIN _EDITOR] blueprint node?


avatar image ash22 Nov 20 '14 at 10:54 AM

I'll assume it is impossible.

avatar image Rudy Q ♦♦ STAFF Nov 21 '14 at 03:04 PM

Hello ash22,

There is no direct way to check and see if the your game is running in the editor via blueprints. However, if you could provide more information as to what it is that you are trying to achieve I may be able to supply a workaround more specific to your issue.

avatar image ash22 Nov 21 '14 at 03:43 PM

It isn't really an issue per se, more a convenience.

Basically, I use on-screen debug info in the editor that I don't necessarily want to see when the standalone game is launched. I manually turn debugging off when I don't need to see it in a cooked project, but thought it would be nice if I didn't have to, i.e. some IsRunningInEditor flag & branch would do it automatically.

Not a big deal.

If I really need it I supppose I could write a BP wrapper for #if WITH_EDITOR.
I just thought there might exist a reciprocal BP call for that particular C++ property.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question