How to spawn actor from Python scripting?

The first thing to mention here is that Python is only for use within the Editor to help automate activities, but it can’t be used during ‘play’ time. So, if you want to place an actor when you’re creating a scene / world then you can use Python, but if you want to do it at runtime (i.e. press play, do something and have an actor spawn), then you can not. More information here: https://docs.unrealengine.com/en-us/Studio/Python

I’ve never done this, but a quick look suggests that the examples here will help:

More specifically, this example which deals with spawning

1 Like