AGENT SKILL

unreal-actor-editing

Manage actors in UE levels via UCP. Use when the user asks to spawn, delete, move, duplicate, select, or otherwise manipulate actors in the Unreal Engine editor.

License 许可
MIT
最近更新
2026-11-12
Stars
★ 3
Forks
1

01 前言 Front Matter

name
unreal-actor-editing
description
Manage actors in UE levels via UCP. Use when the user asks to spawn, delete, move, duplicate, select, or otherwise manipulate actors in the Unreal Engine editor.

03 SKILL.md 正文

Unreal Actor Editing

Manage actors in Unreal Engine levels through UCP's call command. This skill guides you to use engine-provided actor subsystems and libraries.

Prerequisite: The unreal-client-protocol skill must be available and the UE editor must be running with the UCP plugin enabled.

Engine Built-in Actor Libraries

UEditorActorSubsystem

CDO Path: /Script/UnrealEd.Default__EditorActorSubsystem

This is the primary API for actor manipulation in the editor:

Function Description
GetAllLevelActors() Get all actors in the current level
GetAllLevelActorsOfClass(ActorClass) Get all actors of a specific class
GetSelectedLevelActors() Get currently selected actors
SetSelectedLevelActors(ActorsToSelect) Set actor selection
SelectNothing() Deselect all actors
SpawnActorFromClass(ActorClass, Location, Rotation) Spawn a new actor
SpawnActorFromObject(ObjectToUse, Location, Rotation) Spawn from an existing asset
DuplicateActor(ActorToDuplicate, ToWorld, Offset) Duplicate an actor
DuplicateActors(ActorsToDuplicate, ToWorld, Offset) Duplicate multiple actors
DestroyActor(ActorToDestroy) Delete an actor
DestroyActors(ActorsToDestroy) Delete multiple actors
SetActorTransform(Actor, WorldTransform) Set actor transform
ConvertActors(Actors, ActorClass) Convert actors to a different class

Examples

Get all actors in level:

{"object":"/Script/UnrealEd.Default__EditorActorSubsystem","function":"GetAllLevelActors"}

Get all static mesh actors:

{"object":"/Script/UnrealEd.Default__EditorActorSubsystem","function":"GetAllLevelActorsOfClass","params":{"ActorClass":"/Script/Engine.StaticMeshActor"}}

Spawn a point light:

{"object":"/Script/UnrealEd.Default__EditorActorSubsystem","function":"SpawnActorFromClass","params":{"ActorClass":"/Script/Engine.PointLight","Location":{"X":0,"Y":0,"Z":200}}}

Destroy an actor:

{"object":"/Script/UnrealEd.Default__EditorActorSubsystem","function":"DestroyActor","params":{"ActorToDestroy":"/Game/Maps/Main.Main:PersistentLevel.PointLight_0"}}

UGameplayStatics

CDO Path: /Script/Engine.Default__GameplayStatics

Useful for runtime/game queries:

Function Description
GetAllActorsOfClass(WorldContextObject, ActorClass) Find actors by class
GetAllActorsWithTag(WorldContextObject, Tag) Find actors by tag
GetAllActorsOfClassWithTag(WorldContextObject, ActorClass, Tag) Combined class + tag filter
GetAllActorsWithInterface(WorldContextObject, Interface) Find actors implementing an interface
GetActorOfClass(WorldContextObject, ActorClass) Get first actor of class
FindNearestActor(WorldContextObject, Origin, ActorClass) Find nearest actor of class to a location
GetActorArrayAverageLocation(Actors) Get average location of an array of actors
GetActorArrayBounds(Actors, bOnlyCollidingComponents) Get combined bounds of an array of actors
GetPlayerPawn(WorldContextObject, PlayerIndex) Get player pawn
GetPlayerController(WorldContextObject, PlayerIndex) Get player controller
GetPlayerCameraManager(WorldContextObject, PlayerIndex) Get camera manager

UEditorLevelLibrary

CDO Path: /Script/EditorScriptingUtilities.Default__EditorLevelLibrary

Unique level editing functions not covered by UEditorActorSubsystem:

Function Description
JoinStaticMeshActors(ActorsToJoin, JoinOptions) Merge static meshes into one
ReplaceSelectedActors(InAssetPath) Replace selected actors with given asset
GetPIEWorlds() Get worlds from Play-In-Editor sessions

Layer Management (ULayersSubsystem)

Get the instance via FindObjectInstances with ClassName set to /Script/UnrealEd.LayersSubsystem.

Function Description
CreateLayer(LayerName) Create a new layer
DeleteLayer(LayerToDelete) Delete a layer
RenameLayer(OriginalLayerName, NewLayerName) Rename a layer
AddActorToLayer(Actor, LayerName) Add a single actor to a layer
RemoveActorFromLayer(Actor, LayerName) Remove a single actor from a layer
AddActorsToLayer(Actors, LayerName) Add multiple actors to a layer
GetActorsFromLayer(LayerName) Get all actors in a layer
SetLayerVisibility(LayerName, bIsVisible) Show/hide a layer
SelectActorsInLayer(LayerName) Select all actors in a layer
AddAllLayerNamesTo(OutLayers) Get all layer names

Examples

Find the LayersSubsystem instance:

{"object":"/Script/UnrealClientProtocol.Default__ObjectOperationLibrary","function":"FindObjectInstances","params":{"ClassName":"/Script/UnrealEd.LayersSubsystem"}}

Create a layer (use the instance path returned above):

{"object":"<layers_subsystem_instance_path>","function":"CreateLayer","params":{"LayerName":"Lighting"}}

Add an actor to a layer:

{"object":"<layers_subsystem_instance_path>","function":"AddActorToLayer","params":{"Actor":"/Game/Maps/Main.Main:PersistentLevel.PointLight_0","LayerName":"Lighting"}}

Actor Grouping (UActorGroupingUtils)

Get the CDO at /Script/UnrealEd.Default__ActorGroupingUtils, then call Get() on it to obtain the singleton instance.

Function Description
GroupActors(Actors) Group specified actors
UngroupActors(Actors) Ungroup specified actors
GroupSelected() Group currently selected actors
UngroupSelected() Ungroup currently selected actors
LockSelectedGroups() Lock selected groups
UnlockSelectedGroups() Unlock selected groups
CanGroupActors() Check if current selection can be grouped

Examples

Get the grouping utils instance:

{"object":"/Script/UnrealEd.Default__ActorGroupingUtils","function":"Get"}

Group selected actors (use the instance returned by Get):

{"object":"<actor_grouping_utils_instance_path>","function":"GroupSelected"}

Actor Folders (on Actor instances)

Functions called directly on actor instance paths:

Function Description
GetFolderPath() Get the actor's folder path in the outliner
SetFolderPath(NewFolderPath) Set the actor's folder path in the outliner

Examples

Get an actor's folder:

{"object":"/Game/Maps/Main.Main:PersistentLevel.PointLight_0","function":"GetFolderPath"}

Move an actor into a folder:

{"object":"/Game/Maps/Main.Main:PersistentLevel.PointLight_0","function":"SetFolderPath","params":{"NewFolderPath":"Lighting/Dynamic"}}

Actor Attachment (on Actor instances)

Functions called directly on actor instance paths:

Function Description
K2_AttachToActor(ParentActor, SocketName, LocationRule, RotationRule, ScaleRule, bWeldSimulatedBodies) Attach this actor to a parent actor
K2_DetachFromActor(LocationRule, RotationRule, ScaleRule) Detach this actor from its parent

Rules are EAttachmentRule values: KeepRelative, KeepWorld, SnapToTarget.

Examples

Attach an actor to another:

{"object":"/Game/Maps/Main.Main:PersistentLevel.Cube_0","function":"K2_AttachToActor","params":{"ParentActor":"/Game/Maps/Main.Main:PersistentLevel.Sphere_0","SocketName":"None","LocationRule":"KeepWorld","RotationRule":"KeepWorld","ScaleRule":"KeepWorld","bWeldSimulatedBodies":false}}

Detach an actor:

{"object":"/Game/Maps/Main.Main:PersistentLevel.Cube_0","function":"K2_DetachFromActor","params":{"LocationRule":"KeepWorld","RotationRule":"KeepWorld","ScaleRule":"KeepWorld"}}

Level Management (ULevelEditorSubsystem + UEditorLevelUtils)

ULevelEditorSubsystem

Get the instance via FindObjectInstances with ClassName set to /Script/LevelEditor.LevelEditorSubsystem.

Function Description
NewLevel(AssetPath) Create a new level
NewLevelFromTemplate(AssetPath, TemplatePath) Create a new level from template
LoadLevel(AssetPath) Load a level
SaveCurrentLevel() Save the current level
SaveAllDirtyLevels() Save all modified levels
SetCurrentLevelByName(LevelName) Switch current level
GetCurrentLevel() Get the current level
PilotLevelActor(ActorToPilot) Pilot an actor in the viewport
EjectPilotLevelActor() Stop piloting an actor

Examples

Find the LevelEditorSubsystem instance:

{"object":"/Script/UnrealClientProtocol.Default__ObjectOperationLibrary","function":"FindObjectInstances","params":{"ClassName":"/Script/LevelEditor.LevelEditorSubsystem"}}

Save the current level:

{"object":"<level_editor_subsystem_instance_path>","function":"SaveCurrentLevel"}

UEditorLevelUtils

CDO Path: /Script/UnrealEd.Default__EditorLevelUtils

Function Description
CreateNewStreamingLevel(LevelStreamingClass, NewLevelPath, bMoveSelectedActors) Create a new streaming level
MoveActorsToLevel(ActorsToMove, DestLevel, bWarnAboutReferences, bWarnAboutRenaming) Move actors to another level
K2_AddLevelToWorld(World, LevelPath, LevelStreamingClass) Add a sub-level to the world
K2_RemoveLevelFromWorld(Level) Remove a sub-level from the world
SetLevelVisibility(Level, bShouldBeVisible, bForceLayersVisible) Show/hide a level
GetLevels(World) Get all levels in a world

Viewport & Camera (UUnrealEditorSubsystem)

Get the instance via FindObjectInstances with ClassName set to /Script/UnrealEd.UnrealEditorSubsystem.

Function Description
GetLevelViewportCameraInfo(OutCameraLocation, OutCameraRotation) Get the viewport camera position and rotation
SetLevelViewportCameraInfo(CameraLocation, CameraRotation) Set the viewport camera position and rotation
GetEditorWorld() Get the current editor world
ScreenToWorld(ScreenPosition) Convert screen coordinates to world coordinates
WorldToScreen(WorldPosition) Convert world coordinates to screen coordinates

Also available via UEditorUtilityLibrary:

CDO Path: /Script/Blutility.Default__EditorUtilityLibrary

Function Description
GetSelectionBounds(Origin, BoxExtent, SphereRadius) Get bounding info of the current selection

Examples

Find the UnrealEditorSubsystem instance:

{"object":"/Script/UnrealClientProtocol.Default__ObjectOperationLibrary","function":"FindObjectInstances","params":{"ClassName":"/Script/UnrealEd.UnrealEditorSubsystem"}}

Get viewport camera info:

{"object":"<unreal_editor_subsystem_instance_path>","function":"GetLevelViewportCameraInfo"}

Set viewport camera position:

{"object":"<unreal_editor_subsystem_instance_path>","function":"SetLevelViewportCameraInfo","params":{"CameraLocation":{"X":0,"Y":0,"Z":500},"CameraRotation":{"Pitch":-45,"Yaw":0,"Roll":0}}}

Get selection bounds:

{"object":"/Script/Blutility.Default__EditorUtilityLibrary","function":"GetSelectionBounds"}

Common Patterns

Discover and inspect actors

First get all actors, then inspect a specific actor (run as separate calls):

{"object":"/Script/UnrealEd.Default__EditorActorSubsystem","function":"GetAllLevelActors"}
{"object":"/Script/UnrealClientProtocol.Default__ObjectOperationLibrary","function":"GetObjectProperty","params":{"ObjectPath":"<actor_path>","PropertyName":"RelativeLocation"}}

Move an actor

Use the unreal-object-operation skill to set properties on the actor's root component:

{"object":"/Script/UnrealClientProtocol.Default__ObjectOperationLibrary","function":"SetObjectProperty","params":{"ObjectPath":"<actor_root_component_path>","PropertyName":"RelativeLocation","JsonValue":"{\"X\":100,\"Y\":200,\"Z\":0}"}}

Spawn, position, and select

Spawn an actor, then get selection (run as separate calls):

{"object":"/Script/UnrealEd.Default__EditorActorSubsystem","function":"SpawnActorFromClass","params":{"ActorClass":"/Script/Engine.PointLight","Location":{"X":0,"Y":0,"Z":300}}}
{"object":"/Script/UnrealEd.Default__EditorActorSubsystem","function":"GetSelectedLevelActors"}

Organize actors into folders

{"object":"/Script/UnrealEd.Default__EditorActorSubsystem","function":"GetAllLevelActorsOfClass","params":{"ActorClass":"/Script/Engine.PointLight"}}

Then set folder paths on each returned actor:

{"object":"/Game/Maps/Main.Main:PersistentLevel.PointLight_0","function":"SetFolderPath","params":{"NewFolderPath":"Lighting"}}

Attach actors together

{"object":"/Game/Maps/Main.Main:PersistentLevel.ChildActor_0","function":"K2_AttachToActor","params":{"ParentActor":"/Game/Maps/Main.Main:PersistentLevel.ParentActor_0","SocketName":"None","LocationRule":"KeepWorld","RotationRule":"KeepWorld","ScaleRule":"KeepWorld","bWeldSimulatedBodies":false}}

04 同仓库更多 Skills

welflau
welflau/ai-dev-system

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

测试与质量前端开发
★ 3
welflau
welflau/ai-dev-system

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

邮件与沟通
★ 3
welflau
welflau/ai-dev-system

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

前端开发
★ 3
welflau
welflau/ai-dev-system

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

设计师前端开发视觉设计
★ 3
welflau
welflau/ai-dev-system

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

视觉设计
★ 3
welflau
welflau/ai-dev-system

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

视觉设计
★ 3