refactor: Remove unused player controller and state class declarations in GM_CoreGameMode
docs: Update C++ Integration Guide for Blueprint child setup instructions
This commit is contained in:
@@ -14,8 +14,6 @@
|
|||||||
// Forward declarations
|
// Forward declarations
|
||||||
class UGI_GameFramework;
|
class UGI_GameFramework;
|
||||||
class AGS_CoreGameState;
|
class AGS_CoreGameState;
|
||||||
class APC_CoreController;
|
|
||||||
class APS_CorePlayerState;
|
|
||||||
|
|
||||||
// Delegates
|
// Delegates
|
||||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnChapterTransition, FGameplayTag, NewChapter);
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnChapterTransition, FGameplayTag, NewChapter);
|
||||||
@@ -29,6 +27,10 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnGameOverTriggered, FGameplayTag,
|
|||||||
* death routing, and coordinates with the narrative system for story progression.
|
* death routing, and coordinates with the narrative system for story progression.
|
||||||
*
|
*
|
||||||
* Server-authoritative. Extends AGameModeBase for replication support.
|
* Server-authoritative. Extends AGameModeBase for replication support.
|
||||||
|
*
|
||||||
|
* Note: PlayerControllerClass, PlayerStateClass, and GameStateClass are
|
||||||
|
* inherited from AGameModeBase — do not redeclare (UHT forbids shadowing).
|
||||||
|
* Set them in your BP child's Class Defaults.
|
||||||
*/
|
*/
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class FRAMEWORK_API AGM_CoreGameMode : public AGameModeBase
|
class FRAMEWORK_API AGM_CoreGameMode : public AGameModeBase
|
||||||
@@ -38,19 +40,6 @@ class FRAMEWORK_API AGM_CoreGameMode : public AGameModeBase
|
|||||||
public:
|
public:
|
||||||
AGM_CoreGameMode();
|
AGM_CoreGameMode();
|
||||||
|
|
||||||
// ========================================================================
|
|
||||||
// Default Classes (Set in Blueprint or Config)
|
|
||||||
// ========================================================================
|
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Framework|Classes")
|
|
||||||
TSubclassOf<APC_CoreController> PlayerControllerClass;
|
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Framework|Classes")
|
|
||||||
TSubclassOf<APS_CorePlayerState> PlayerStateClass;
|
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Framework|Classes")
|
|
||||||
TSubclassOf<AGS_CoreGameState> GameStateClass;
|
|
||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
// Chapter Management
|
// Chapter Management
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class UDA_InteractionData;
|
|||||||
// I_Interactable — World objects the player can interact with
|
// I_Interactable — World objects the player can interact with
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
UINTERFACE(MinimalAPI, BlueprintType, meta = (CannotImplementInterfaceInBlueprint))
|
UINTERFACE(MinimalAPI, BlueprintType)
|
||||||
class UInteractable : public UInterface
|
class UInteractable : public UInterface
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|||||||
@@ -176,9 +176,10 @@ When ready for the full GameInstance:
|
|||||||
### Blueprint Child Setup
|
### Blueprint Child Setup
|
||||||
1. Create Blueprint Class → Parent: `GM_CoreGameMode`
|
1. Create Blueprint Class → Parent: `GM_CoreGameMode`
|
||||||
2. Name: `BP_CoreGameMode`
|
2. Name: `BP_CoreGameMode`
|
||||||
3. In Class Defaults:
|
3. In Class Defaults (Class Defaults → Classes section, inherited from `AGameModeBase`):
|
||||||
- `GameState Class` → your `BP_CoreGameState`
|
- `Player Controller Class` → your `PC_CoreController` BP child
|
||||||
- `PlayerController Class` → your `BP_CorePlayerController`
|
- `Player State Class` → your `PS_CorePlayerState` BP child
|
||||||
|
- `Game State Class` → your `BP_CoreGameState`
|
||||||
- `Default Pawn Class` → your player pawn
|
- `Default Pawn Class` → your player pawn
|
||||||
- `HUD Class` → your `WBP_HUDController`
|
- `HUD Class` → your `WBP_HUDController`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user