Nelaric Unreal Gameplay
Gameplay framework API
Toggle main menu visibility
Loading...
Searching...
No Matches
NelaricPlayerController.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Nelaric
2
6
7
#pragma once
8
9
#include "CoreTypes.h"
10
#include "Containers/UnrealString.h"
11
#include "Delegates/Delegate.h"
12
#include "GameFramework/PlayerController.h"
13
14
#include "NelaricPlayerController.generated.h"
15
17
DECLARE_MULTICAST_DELEGATE_ThreeParams
(FDepartureDecision, uint64,
const
FString&,
bool
);
18
26
UCLASS(MinimalAPI, Blueprintable)
27
class
ANelaricPlayerController
: public APlayerController
28
{
29
GENERATED_BODY()
30
31
public
:
43
GAMEPLAYRUNTIME_API
bool
RequestDepartureApproval
(uint64 RequestId,
const
FString& TargetAddress);
44
52
GAMEPLAYRUNTIME_API FDepartureDecision&
OnDepartureDecision
();
53
54
public
:
55
// Native subclasses in other modules need these virtual definitions.
56
GAMEPLAYRUNTIME_API
virtual
void
ServerRequestDepartureApproval_Implementation(uint64 RequestId,
57
const
FString& TargetAddress);
58
GAMEPLAYRUNTIME_API
virtual
void
59
ClientReceiveDepartureDecision_Implementation(uint64 RequestId,
const
FString& TargetAddress,
bool
bApproved);
60
61
private
:
62
UFUNCTION(Server, Reliable)
63
void
ServerRequestDepartureApproval(uint64 RequestId,
const
FString& TargetAddress);
64
65
UFUNCTION(Client, Reliable)
66
void
ClientReceiveDepartureDecision(uint64 RequestId,
const
FString& TargetAddress,
bool
bApproved);
67
68
FDepartureDecision DepartureDecision;
69
};
DECLARE_MULTICAST_DELEGATE_ThreeParams
DECLARE_MULTICAST_DELEGATE_ThreeParams(FDepartureDecision, uint64, const FString &, bool)
Reports the current server's departure decision on the game thread.
ANelaricPlayerController
Base player controller for NelaricGameplay worlds.
Definition
NelaricPlayerController.h:28
ANelaricPlayerController::OnDepartureDecision
GAMEPLAYRUNTIME_API FDepartureDecision & OnDepartureDecision()
Observes decisions returned by the current server.
ANelaricPlayerController::RequestDepartureApproval
GAMEPLAYRUNTIME_API bool RequestDepartureApproval(uint64 RequestId, const FString &TargetAddress)
Asks the current server to approve leaving its session.
NelaricGameplay
Plugins
NelaricGameplay
Source
GameplayRuntime
Public
Player
NelaricPlayerController.h
Generated by
1.18.0