# Spawning Actors

There are two methods to spawning an actor in our current 3D level: from [an unreal class](https://docs.unrealengine.com/5.2/en-US/PythonAPI/class/EditorActorSubsystem.html#unreal.EditorActorSubsystem.spawn_actor_from_class) or from [an asset](https://docs.unrealengine.com/5.2/en-US/PythonAPI/class/EditorActorSubsystem.html#unreal.EditorActorSubsystem.spawn_actor_from_object).

## From an Unreal Class

For Unreal Classes such as a CineCameraActor we can use:

```python
EditorActorSubsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)

actor = EditorActorSubsystem.spawn_actor_from_class(
    unreal.CineCameraActor, 
    unreal.Vector()
)
```

## From a Content browser Asset

For assets such as Blueprints and Static Meshes in the Content browser we can use:

```python
EditorActorSubsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)

asset_path = "/Game/some/asset/path"
asset = unreal.load_asset(asset_path)
actor = EditorActorSubsystem.spawn_actor_from_object(
    asset, 
    unreal.Vector()
)
```

## Default Location

The second parameter on both of these functions is the Location parameter, with additional code you can spawn actors along a path, under the mouse, or in front of the viewport camera as a few examples


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bkortbus.gitbook.io/unreal-python-recipe-book/actors/spawning-actors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
