#if WITH_EDITOR?

Excuse my ignorance, but why have this macro in the runtime code?

Becouse there are some parts where it adds some editor specific components or debug logic. That macro will be false if its a built build, so those editor debug components wont be needed. An example is the sprites in actors like the lights, the sprite isnt needed in a built game, so not even create it.