Be careful when using #if WITH_EDITOR
#if WITH_EDITOR
GEditor->SelectNone(true, true, false);
#endif
⚠️ This code crashes ⚠️ in Standalone Editor because:
-
#if WITH_EDITOR returns true
-
GEditor doesn’t exist in editor standalone
It doesn’t hurt to add a nullptr check