Check if Blueprint is being run within the editor (i.e if WITH_EDITOR in C++)

I’m looking for the Blueprint equivalent of #if WITH_EDITOR which is used in UE C++ to run perform certain actions only if the game is running within the context of the editor.

The main intention is to add useful debugging information in exceptional scenarios. Eg: Cast To MyActor fails and I want to print a simple message to the screen so I know that. I realize I can use the output log for this but I find it too verbose for this purpose. So does any such node exist to determine if game context is within the editor?

Not sure if the fact that blueprints being converted to a different form while cooking the game prevents such a check from being feasible.

1 Like

Bump. I’m having the same problem, anyone have any solution?

1 Like

I can’t believe that there’s no answer for this question!
The best way I know is GetPlatformName node, but I don’t think it’s a good way, since it only returns Windows for PIE.
So is there really no BP equivalent for WITH_EDITOR?!

1 Like


Yes im sure ive seen a bp node already that does this i’m not at my computer right now but I’ll look later and post it if I find it

Or you could do it yourself simple make a c++ function like this

//! Allow the blueprint to determine whether we are running with the editor or not

UFUNCTION( BlueprintPure, Category = Whatever )
bool IsWithEditor() const
return true;
return false;


Yes. I think I found a method. Try Is Shipping Build node. Make a branch and if Is Shipping Build is equal to true, then do whatever you want and if it is false, then do nothing. I tried it in 4.13 and it works.

Add a custom option, such as “-editor” inside the server game options line, found in Edit->EditorPreferences->Play(LevelEditor)->MultiplayerOptions->ServerGameOptions.

Then make a macro or a global function in BP to GetGameOptions->DoesOptionExist("-editor").

Rama’s free Victory Plugin has a node to identify whether game logic is running in Editor,PIE,or Game World!
(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required! - Blueprint Visual Scripting - Unreal Engine Forums!

Also the free Low Entry Standard Library plugin has a platform node (not exactly what you want, but it also has other useful stuff )

Since this is where google led me and it has NOT been updated, there is a ‘With Editor’ node now… You can just use that (its in the same place as the Is Shipping, Is Debug, Etc nodes)

Where are these With Editor and Is Shipping nodes that you speak of? I’ve tried adding using them in Blueprint in 4.24 but these nodes don’t exist. I’ve unticked Context Sensitive too, but they still don’t show up?

A bit late but in case people are still looking for it (like me XD )

There is the node “Print String”, which spawn the message you want in the editor during play.
Not sure if it’s what you are looking for as I don’t know C++, but here you go

Same issue here. Were these removed?

Or did the name change? This thread is literally the only result if I search for it.

1 Like

Maybe the poster was using a 3rd-Party Plugin for this and just forgot about it?
You can always this try below… Disclaimer: Didn’t do a whole lot of testing on it.

1 Like

As of 4.25, this is the correct answer:



Thanks, this is exactly what I was looking for!

This is NOT correct answer, as this have next code inside:

	static bool IsPackagedForDistribution()
		return true;
		return false;

Correct answer is to create Blueprint Library using C++ and use solution from @EniGmaa .

The node “Is Packaged For Distribution” works for me as well!

Some of us using Unreal Engine aren’t game developers and don’t use any C++

check the free plugin LE Extended Standard Library in Code Plugins - UE Marketplace
That has those nodes without the need to do anything more than install it and it’s free

If that is your plugin, you should make it 100% clear on the marketplace page if the plugin requires the project to support C++ or not. Right now, to me it seems as if it does, which disqualifies it for us.

The solution I posted works for those who do not wish to have C++ at all.