Hi.
I have some code that I only want to execute when the game is running, either in PIE or Standalone mode.
void MyActor::OnConstruction(FTransform transform)
{
Super::OnConstruction(transform);
DoSomething();
}
void MyActor::Tick(....)
{
Super::Tick(...)
DoSomething();
}
void MyActor::DoSomething()
{
// .. do something here...
if (IsPlayingInEditor) { DoSomethingMore }
else { DoSomethingElse }
}
Obviously this is not the exact code. Is there a global variable or anything I can use to determine if the game is running?
Thanks