set_blueprint_component_collision
Sets collision on a Blueprint component template by applying profile, collision_enabled, then per-channel responses in order. Use for collision edits, not generic property changes.
Instructions
Set collision on a Blueprint component TEMPLATE (own SCS or inherited via ICH), not on a spawned actor, applying in this order: profile through SetCollisionProfileName (which expands the profile into the FBodyInstance response array -- a raw reflection write would set the string and leave BodyInstance inconsistent, and that is the whole reason this is a separate tool), then collision_enabled, then per-channel responses. Use it instead of set_blueprint_component_property for anything collision-shaped. Unknown channel, response or collision_enabled names are hard errors, never a silent default. Note the ORDER: a later profile would reset the per-channel responses, so responses always win here.
Returns: { success, data: { blueprint_name, component_name, source ("scs" | "inherited-ich" | "inherited-native": which template was written), profile?, collision_enabled?, responses_applied: [{channel, response}], compiled } } -- responses_applied lists ONLY the per-channel writes; profile and collision_enabled appear as their own fields only when they were given. Nothing is re-read: verify with get_blueprint_component_property or get_collision_info.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Optional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk. | |
| compile | No | Optional bool (default FALSE): compile the Blueprint afterwards so the FBodyInstance change reinstances on the next spawn/PIE. Without it the edit stays in the uncompiled template. | |
| profile | No | Collision profile name, e.g. "BlockAll" (optional). Applied FIRST, so it does not undo the per-channel responses below. | |
| responses | No | Object mapping channel -> response, e.g. {"Visibility":"Ignore","ECC_Pawn":"Overlap"} (optional). Channels accept the friendly display name or an ECC_* token (custom project channels included); responses are Ignore, Overlap or Block. An unknown channel is refused rather than defaulting to WorldStatic. | |
| blueprint_name | No | Blueprint asset path or name (required) | |
| blueprint_path | No | Alias of `blueprint_name` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `blueprint_name`. | |
| component_name | Yes | Component to modify (required); must resolve to a UPrimitiveComponent or the call errors with "no collision to set" | |
| return_messages | No | No effect here: it is only read by the compile this tool may run internally, whose message log is discarded. Call compile_blueprint directly if you want the messages. | |
| collision_enabled | No | ECollisionEnabled value name: NoCollision, QueryOnly, PhysicsOnly or QueryAndPhysics (optional). Any other string is an error. |