How to get play mode?

Hi.

how can I get the play mode? ( PIE , Standalone game or Simulation).

c++ and BP solution are both fine :slight_smile:

why would you need to? its not something that will exist in the finished game

only for development purposes . I want to change level stream method for different play modes on World’s begin play

I wrote this CPP function

bool AMyCodeGameModeBase::IsWithEditor()
{
#if WITH_EDITOR
	return true;
#endif
	return false;
}

but it returns true in standalone game

WITH_EDITOR is true when you make editor build of module, not to mention this is compile time preprocess cindition, so this is aplided during compilation and can’t dynamic change.

There GIsEditor

…you can also WorldType in UWorld