For the actors you put in the level in the editor, does the constructor script executes when the level is loaded in the packaged game? I suppose it shouldn’t run but I want to be sure.
I’ve put a printstring in the construction script, it prints when I load the level in the editor but also when i play “Standalon Game” from the editor.
What happens in the packaged game? (printstring don’t work obviously so I don’t know is it executed or not)
No, they don’t. The construction (not constructor, that’s a different thing) script is editor-only. With ordinary Blueprints (no custom C++ base class), the first thing that gets executed is BeginPlay().
Objects pre-placed in a level have their construction scripts ran at cook/“package” time. They are solidified in the level during that process.
Dynamically spawned objects however will run their constructions scripts as they’re created. Events like BeginPlay, where some setup/initialization script can be placed will also be executed at runtime
Interesting. I stand corrected. Maybe that’s something that changed, because I’m reasonably certain that when I started learning UE4 (which was some time ago), they really hammered the point that construction scripts don’t get executed in.