Blueprint¶
Wraps a UBlueprint asset for creating and managing Blueprints.
Import¶
Creating a Blueprint¶
Parameters:
package_path(str) -- Content Browser folderasset_name(str) -- Name for the new Blueprintparent(str) -- Parent class name (default'Actor')
Loading an Existing Blueprint¶
Finding Blueprints¶
paths = Blueprint.find('/Game/Blueprints', class_filter='Actor', name_filter='Pickup')
for path in paths:
bp = Blueprint.load(path)
Properties¶
| Property | Type | Description |
|---|---|---|
name |
str | Asset name |
path |
str | Full Content Browser path |
parent_class |
str | Parent class name |
components |
list[Component] | Component hierarchy |
variables |
list[Variable] | User-defined variables |
functions |
list[str] | Function graph names |
events |
list[str] | Event names |
Methods¶
add_component(component_class, name=None, parent=None)¶
Add a component to the Blueprint.
mesh = bp.add_component('StaticMeshComponent', name='PickupMesh')
trigger = bp.add_component('SphereComponent', name='Trigger', parent='PickupMesh')
add_variable(name, var_type, default=None, category='')¶
Add a variable. Type can be friendly ('int', 'bool', 'float', 'str')
or UE property type ('IntProperty', etc.).
bp.add_variable('PointValue', 'int', default=10, category='Gameplay')
bp.add_variable('IsActive', 'bool', default=True)
set_default(property_name, value) / get_default(property_name)¶
Access Class Default Object properties.
compile()¶
Compile the Blueprint. Call after all modifications.