Navigation
API > API/Plugins > API/Plugins/NetworkPredictionExtras
ActorComponent for running a MockNetworkSimulation (implements Driver for the mock simulation)
| Name | UMockNetworkSimulationComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/NetworkPredictionExtras/Source/NetworkPredictionExtras/Public/MockNetworkSimulation.h |
| Include Path | #include "MockNetworkSimulation.h" |
Syntax
UCLASS (BlueprintType, Meta=(BlueprintSpawnableComponent))
class UMockNetworkSimulationComponent : public UNetworkPredictionComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UNetworkPredictionComponent → UMockNetworkSimulationComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMockNetworkSimulationComponent() |
MockNetworkSimulation.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MockNetworkSimulation | TUniquePtr< FMockNetworkSimulation > | Our own simulation object. This could just as easily be shared among all UMockNetworkSimulationComponent. | MockNetworkSimulation.h | |
| MockValue | float | Mock representation of "syncing' to the sync state in the network sim. | MockNetworkSimulation.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void FinalizeFrame
(
const FMockSyncState* Sync, |
Take output of Sim and push to component. | MockNetworkSimulation.h | |
void HandleCue
(
const FMockCue& MockCue, |
MockNetworkSimulation.h | ||
void InitializeSimulationState
(
FMockSyncState* Sync, |
Seed initial values based on component's state. | MockNetworkSimulation.h | |
void ProduceInput
(
const int32 DeltaTimeMS, |
Set latest input. | MockNetworkSimulation.h |
Overridden from UNetworkPredictionComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void InitializeNetworkPredictionProxy() |
MockNetworkSimulation.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void TickComponent
(
float DeltaTime, |
MockNetworkSimulation.h |