set_game_mode_spectator_class
Set the SpectatorClass property on a GameMode's CDO to define which pawn spectators use. Persist Blueprint GameMode changes with save_asset.
Instructions
Set the AGameModeBase::SpectatorClass UPROPERTY on the GameMode's CDO. A Blueprint GameMode's package is marked dirty but not saved (persist it with save_asset); a native class's value lasts only until the editor closes (persistable false). spectator_class is read back from the CDO.
Returns: { game_mode_class: string, spectator_class: string, already_set: bool, persistable: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| game_mode_class | No | Optional AGameModeBase class name (short or /Script/ path) | |
| spectator_class | Yes | ASpectatorPawn-derivative class name (NoClear: empty/None rejected) | |
| game_mode_class_path | No | Optional long /Script/Engine.GameModeBase path (takes precedence) |