Module |
|
Header |
/Engine/Plugins/Runtime/NetworkPrediction/Source/NetworkPrediction/Public/NetworkedSimulationModelTypes.h |
Include |
#include "NetworkedSimulationModelTypes.h" |
template<typename TState>
struct TNetSimStateAccessor
Accessors - helper structs that provide safe/cleaner access to the underlying NetSim states/events This is the equivlent of directly calling TNetworkedSimulationModel::GetPendingStateRead() / GetPendingStateWrite()
This is useful because it is not always practical to have a typed pointer to your TNetworkedSimulationModel instance. For example, the TNetworkedSimulationModel may be templated and conditionally instantiated (for example fix tick vs non fixed tick models, and eventually we may offer more memory allocation related templated parameters).
Essentially, this allows you to plop a TNetSimStateAccessor<MyStateType> on a class and have it bind to any TNetworkedSimulationModel instantiation that has uses that type.
See additional comments in TNetworkedSimulationModel::GetPendingStateRead() / GetPendingStateWrite()
Name | Description | ||
---|---|---|---|
|
Bind ( |
Bind to the NetsimModel that we are accessing. |
|
|
Clear() |
||
|
const TState... |
GetStateRead() |
Gets the current (PendingFrame) state for reading. |
|
TState * |
GetStateWrite ( |
Gets the current (PendingFrame) state for writing. |