Download

Need to spawn door blueprint from construction script in level generation BP

Greetings,

Most of my base level generation is complete and now I’m getting down to details, decorations and deterrents. I’ve got a ‘Door’ BP that I’ve created, and I’m trying to spawn it during the construction phase of the level by using the SpawnActor from Class and setting its class to be the Door. I’m giving it the transform location, but I’m not getting the actual door to show up anywhere. I can spawn it just fine from an event trigger on my character BP (For example, “Event G”) so when I press the key, it spawns during gameplay. I’m assuiming during the generation phase (Which is accomplished in the constructor so I can see and tweak the level in the editor) I cannot use SpawnActor, but I’ve found no other solution, and searching through here hasn’t given me any answers either.

Any help here would be appreciated. Thanks!

For the moment, this seems to be working for me:

add actor to scene.png

The only drawback to it is every time I compile or make changes I get another “(Deleted Actor)” in my World Outliner. Not really too much of a problem for me since after I play test, they all go away. But still interested to know if there’s a better way I should be doing this.

Thanks!