create_game_mode_class_bp
Create an AGameModeBase-derived Blueprint asset at a chosen path, registered and dirty; re-runs return existing compatible asset or error. Save it with save_asset.
Instructions
Create an AGameModeBase-derivative Blueprint asset at package_path/asset_name, registered and marked dirty but not saved (persist it with save_asset). Idempotent on re-run: a Blueprint already at that path whose parent derives from parent_class is returned with already_exists=true; one with another parent is an error and is left untouched. parent_class and is_multiplayer are read off the Blueprint.
Returns: { asset_name: string, asset_path: string, package_path: string, package_class: string, parent_class: string, is_multiplayer: bool, already_exists: bool }
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. | |
| asset_name | Yes | Name for the new Blueprint asset | |
| package_path | No | Target content folder; defaults to /Game/MCP | |
| parent_class | Yes | Parent class name (must derive from AGameModeBase; AGameMode also accepted for multiplayer) |