Components & CDO
Component and Class Default Object verbs: add-component, remove-component, set-component-property, set-cdo-property.
Part of the BlueprintAIAssistant AI Reference.
Verbs for managing Blueprint components (SimpleConstructionScript tree) and Class Default Object properties. Components are the scene hierarchy defined in the Blueprint editor's Components panel. CDO properties are the default values on the generated class, used heavily by data-driven assets like GameplayEffects and DataAssets.
read-components#
Read the component hierarchy tree (SimpleConstructionScript).
Category: Read (focused)
| Arg | Required | Description |
|---|---|---|
-asset= |
Yes | Blueprint asset path |
Examples:
-verb=read-components -asset=/Game/BP/BP_Player
Notes:
- Returns an empty tree for Blueprints with no components (no error).
- Shows component class, variable name, and parent-child relationships.
read-cdo#
Read Class Default Object properties that differ from the parent class defaults. Critical for data-driven Blueprints (GameplayEffects, DataAssets) where all configuration lives on the CDO rather than in graphs.
Category: Read (focused)
| Arg | Required | Description |
|---|---|---|
-asset= |
Yes | Blueprint or UObject asset path |
Examples:
-verb=read-cdo -asset=/Game/BP/GE_Damage
Output:
{
"success": true,
"classDefaults": {
"DurationPolicy": "Instant",
"Period": {"Value": 0.0}
}
}
add-component#
Add a new component to a Blueprint's SimpleConstructionScript tree.
Category: Write (components)
| Arg | Required | Description |
|---|---|---|
-asset= |
Yes | Blueprint asset path |
-name= |
Yes | Variable name for the new component |
-class= |
Yes | Component class (short name or full path, e.g., StaticMeshComponent, BoxCollisionComponent, PointLightComponent) |
-parent= |
No | Parent component name to attach under |
Examples:
-verb=add-component -asset=/Game/BP/BP_Pickup -name=Mesh -class=StaticMeshComponent -parent=DefaultSceneRoot
-verb=add-component -asset=/Game/BP/BP_Torch -name=Light -class=PointLightComponent -parent=Mesh
Notes:
- Idempotent: if a component with the same name already exists, returns success without duplicating.
- Use
set-component-propertyafterward to configure properties on the new component.
Example: adding a mesh component with a static mesh#
# Step 1: Add the component
-verb=add-component -asset=/Game/BP/BP_Pickup -name=ItemMesh -class=StaticMeshComponent -parent=DefaultSceneRoot
# Step 2: Assign a static mesh asset
-verb=set-component-property -asset=/Game/BP/BP_Pickup -component=ItemMesh -property=StaticMesh -value=/Game/Meshes/SM_HealthPotion -compile -save
Or as a batch:
{
"defaultAsset": "/Game/BP/BP_Pickup",
"operations": [
{
"verb": "add-component",
"args": { "name": "ItemMesh", "class": "StaticMeshComponent", "parent": "DefaultSceneRoot" }
},
{
"verb": "set-component-property",
"args": { "component": "ItemMesh", "property": "StaticMesh", "value": "/Game/Meshes/SM_HealthPotion" }
},
{
"verb": "set-component-property",
"args": { "component": "ItemMesh", "property": "RelativeLocation", "value": "(X=0,Y=0,Z=50)" },
"compile": true,
"save": true
}
]
}
set-component-property#
Set a property on a Blueprint component template via UE reflection.
Category: Write (components)
| Arg | Required | Description |
|---|---|---|
-asset= |
Yes | Blueprint asset path |
-component= |
Yes | Component variable name |
-property= |
Yes | Property name (supports dot-notation for nested structs) |
-value= |
Yes | Value as string (parsed via UE ImportText) |
Examples:
-verb=set-component-property -asset=/Game/BP/BP_Pickup -component=Mesh -property=RelativeLocation -value="(X=0,Y=0,Z=50)"
-verb=set-component-property -asset=/Game/BP/BP_Pickup -component=Mesh -property=RelativeLocation.Z -value=75.0
-verb=set-component-property -asset=/Game/BP/BP_Proj -component=Trail -property=Asset -value=/Game/FX/NS_Trail
-verb=set-component-property -asset=/Game/BP/BP_Light -component=PointLight -property=Intensity -value=5000.0 -compile -save
Notes:
- Resolves components across SCS nodes, CDO native components, and inherited parent Blueprints.
- Dot-notation allows setting nested struct fields (e.g.,
RelativeLocation.Z).
remove-component#
Remove a component from a Blueprint's SimpleConstructionScript tree.
Category: Write (components)
| Arg | Required | Description |
|---|---|---|
-asset= |
Yes | Blueprint asset path |
-name= |
Yes | Component variable name to remove |
Examples:
-verb=remove-component -asset=/Game/BP/BP_Pickup -name=OldMesh -compile -save
Notes:
- Idempotent: if the component does not exist, returns success.
- Child components attached to the removed component are also removed.
set-cdo-property#
Set a property value on the Blueprint's Class Default Object. Critical for data-driven Blueprints (GameplayEffects, DataAssets) where configuration is stored as CDO properties rather than graph logic.
Category: Write (CDO)
| Arg | Required | Description |
|---|---|---|
-asset= |
Yes | Blueprint or UObject asset path |
-property= |
Yes | Property name (supports dot-notation for nested structs) |
-value= |
Yes | String value compatible with FProperty::ImportText() |
-compile |
No | Flag: also compile after the write |
-save |
No | Flag: also save to disk after the write |
Works on any UObject asset's CDO, not just Blueprints.
Examples:
-verb=set-cdo-property -asset=/Game/BP/GE_Damage -property=DurationPolicy -value=Instant
-verb=set-cdo-property -asset=/Game/BP/GE_Damage -property=Period.Value -value=1.0
-verb=set-cdo-property -asset=/Game/BP/GE_Heal -property=DurationPolicy -value=HasDuration -compile -save
Example: configuring a GameplayEffect CDO#
# Set the effect to instant damage
-verb=set-cdo-property -asset=/Game/BP/GE_Damage -property=DurationPolicy -value=Instant
# Set period for a duration-based effect
-verb=set-cdo-property -asset=/Game/BP/GE_DamageOverTime -property=DurationPolicy -value=HasDuration
-verb=set-cdo-property -asset=/Game/BP/GE_DamageOverTime -property=Period.Value -value=1.0 -compile -save
On failure: error includes available properties at the failing level and format suggestions for the value.
Output:
{
"success": true,
"property": "DurationPolicy",
"value": "Instant"
}