Spawn an actor in construction failed?

I tried to spawn an actor and then assigned it to an object reference variable in construction script. But when I use this variable. It’s invalid

Hi QuerryGL,

You aren’t really meant to be spawning actors in the construction script - in blueprint it will fail. It’s to stop accidentaly adding thousands of actors to a level.

There are ways around it:

  1. Create ChildActorComponents in the construction script instead (down side is too many are slow)
  2. Spawn them from begin play or somewhere else
  3. Use a loop hole (google ue5 spawn construction loophole)
  4. Create StaticMesh Instances instead of actors and control them all from your 1 actor
  5. Use a managed spawn system that handles those created actors.

If you’re interested in options 4) or 5) - I have a plugin on the marketplace that can make those two things much easier, fast and safe. search for rdInst if that is an option for you.