12#include "PawnInitStateComponent.generated.h"
21UCLASS(Abstract, MinimalAPI)
42 GAMEPLAYRUNTIME_API virtual
void NotifyReadyCommitted(const Nelaric::FInitStateSnapshot& Previous) override;
51 GAMEPLAYRUNTIME_API virtual Nelaric::EInitState
GetInitState() const override;
68 Nelaric::FInitGeneration ExpectedGeneration) const;
76 GAMEPLAYRUNTIME_API static UPawnInitStateComponent*
77 ResolveInitResult(const TWeakObjectPtr<UPawnInitStateComponent>& WeakComponent, const UWorld* ExpectedWorld,
78 Nelaric::FInitGeneration ExpectedGeneration);
87 GAMEPLAYRUNTIME_API UPawnInitStateComponent(const FObjectInitializer& ObjectInitializer);
88 GAMEPLAYRUNTIME_API virtual
void OnRegister() override;
89 GAMEPLAYRUNTIME_API virtual
void OnUnregister() override;
136 bool CommitInitState(Nelaric::EInitState NextState);
137 Nelaric::EInitState InitState = Nelaric::EInitState::Registered;
138 Nelaric::FInitGeneration InitGeneration{1};
139 bool bTerminalInitFailure =
false;
140 bool bCommittingInitState =
false;
141 bool bReadyNotificationPending =
false;
142 bool bLocalReadyPrepared =
false;
143 bool bLeavingWorld =
false;
144 bool bRefreshRequestedDuringTransition =
false;
146 void FlushDeferredInitRefresh();
Contract implemented by an actor component in world initialization.
Definition InitStateParticipantInterface.h:28
static GAMEPLAYRUNTIME_API UPawnInitStateComponent * ResolveInitResult(const TWeakObjectPtr< UPawnInitStateComponent > &WeakComponent, const UWorld *ExpectedWorld, Nelaric::FInitGeneration ExpectedGeneration)
Resolves a game-thread asynchronous completion for a live attempt.
GAMEPLAYRUNTIME_API bool CanApplyInitResult(const UWorld *ExpectedWorld, Nelaric::FInitGeneration ExpectedGeneration) const
Checks whether an asynchronous result may update this attempt.
virtual GAMEPLAYRUNTIME_API Nelaric::EInitState GetInitState() const override
Returns the state owned by this component.
virtual GAMEPLAYRUNTIME_API bool HasTerminalInitFailure() const override
Returns whether this attempt has failed permanently.
virtual GAMEPLAYRUNTIME_API bool IsInitApplicable() const override
Participates by default; override for conditional applicability.
virtual GAMEPLAYRUNTIME_API bool CanEntryDataInitialized()
Initializes this component's available data.
virtual GAMEPLAYRUNTIME_API bool CommitReadyWithoutNotification() override
Writes Ready without callbacks after the coordinator checks the group.
virtual GAMEPLAYRUNTIME_API void OnInitReady()
Starts gameplay after the entire readiness group entered Ready.
GAMEPLAYRUNTIME_API void RequestInitRefresh()
Requests another local coordinator pass after context changes.
virtual GAMEPLAYRUNTIME_API void CancelInitGenerationWork()
Cancels work and removes listeners for an invalidated attempt.
virtual GAMEPLAYRUNTIME_API void OnInitGenerationInvalidated(const Nelaric::FInitStateSnapshot &Previous)
Stops work and gameplay belonging to an invalidated attempt.
virtual GAMEPLAYRUNTIME_API bool TryChangeInitState() final override
Commits at most one adjacent preparation step when the derived gate passes.
virtual GAMEPLAYRUNTIME_API void InvalidateInitGeneration() override
Invalidates old work, resets state, and announces the new attempt.
virtual GAMEPLAYRUNTIME_API bool CanEnterReady() final override
Runs DataInitialized preparation until it succeeds in this generation.
virtual GAMEPLAYRUNTIME_API void NotifyReadyCommitted(const Nelaric::FInitStateSnapshot &Previous) override
Announces a committed Ready transition after the group commits.
virtual GAMEPLAYRUNTIME_API Nelaric::FInitGeneration GetInitGeneration() const override
Returns the current attempt identity owned by this component.
virtual GAMEPLAYRUNTIME_API void MarkTerminalInitFailure() override
Records terminal failure and announces it to the world.
virtual GAMEPLAYRUNTIME_API bool CanEntryReady()
Performs final local preparation before the Ready check.
virtual GAMEPLAYRUNTIME_API bool CanEntryDataAvailable()
Acquires this component's data while Registered.
Captures the stage and terminal failure of one initialization attempt.
Definition InitStateTypes.h:41