set_player_controller_class
Set a GameMode's PlayerController class on its live instance or Blueprint defaults, then compile and save the GameMode to prevent PIE spawning the old class.
Instructions
Point the world's GameMode at a PlayerController class, writing the live GameMode instance if one exists and otherwise the defaults of the world's Blueprint GameMode (refused when the GameMode is a native class, or when the world has none: those defaults are process-wide and never saved). success is read back from the slot written. WARNING: It does NOT compile or save the GameMode Blueprint, so a later PIE can still instantiate the OLD class from the already-compiled BlueprintGeneratedClass (three reads can agree on the new class while PIE spawns the engine default). Always follow with compile_blueprint on the GameMode and then save_asset, and verify in PIE by the SPAWNED controller's full class path -- never by re-reading this slot.
Returns: { player_controller_class: string, game_mode_class: string, written_to: string ('live_game_mode' | 'game_mode_defaults'), success: bool (the written slot reads back the class; still not a PIE oracle) }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| player_controller_class | Yes | Class name or full path (e.g. '/Game/MyGame/Core/BP_MyPlayerController.BP_MyPlayerController_C'); rejected if it is not a child of APlayerController. |