A UObject that supports network replication and custom replication handling.
More...
#include <AdvancedReplicatedObject.h>
|
| UAdvancedReplicatedObject (const FObjectInitializer &ObjectInitializer) |
|
virtual void | GetLifetimeReplicatedProps (TArray< class FLifetimeProperty > &OutLifetimeProps) const override |
|
virtual bool | IsSupportedForNetworking () const override |
|
virtual void | PostInitProperties () override |
|
virtual void | BeginDestroy () override |
|
virtual bool | ReplicateSubobjects (UActorChannel *Channel, FOutBunch *Bunch, FReplicationFlags *RepFlags) |
|
virtual bool | CallRemoteFunction (UFunction *Function, void *Parms, struct FOutParmRec *OutParms, FFrame *Stack) override |
|
virtual int32 | GetFunctionCallspace (UFunction *Function, FFrame *Stack) override |
|
ENetRole | GetOwnerRole () const |
|
virtual AActor * | GetOwner () const |
|
virtual void | SetOwner (AActor *NewOwner) |
|
bool | HasAuthority () const |
|
virtual UWorld * | GetWorld () const override |
|
A UObject that supports network replication and custom replication handling.
UAdvancedReplicatedObject is a subclass of UObject designed to support network replication. This class allows for the replication of its properties across the network, providing functionalities to handle ownership and networking features. It includes overridden methods for managing replication and lifecycle events.
- Note
- UObject itself does not support replication natively, so this class provides mechanisms to replicate properties and manage network-related functionality.
◆ UAdvancedReplicatedObject()
UAdvancedReplicatedObject::UAdvancedReplicatedObject |
( |
const FObjectInitializer & | ObjectInitializer | ) |
|
Constructor for UAdvancedReplicatedObject. Initializes the object using the provided object initializer.
- Parameters
-
ObjectInitializer | The object initializer to use for setup. |
◆ BeginDestroy()
virtual void UAdvancedReplicatedObject::BeginDestroy |
( |
| ) |
|
|
overridevirtual |
Called when the object is about to be destroyed. Override this function to perform any necessary cleanup before destruction.
◆ GetLifetimeReplicatedProps()
virtual void UAdvancedReplicatedObject::GetLifetimeReplicatedProps |
( |
TArray< class FLifetimeProperty > & | OutLifetimeProps | ) |
const |
|
overridevirtual |
Defines which properties are replicated and how. Override this function to specify additional properties that need replication.
- Parameters
-
OutLifetimeProps | The array of properties to be replicated. |
◆ IsSupportedForNetworking()
virtual bool UAdvancedReplicatedObject::IsSupportedForNetworking |
( |
| ) |
const |
|
overridevirtual |
Determines whether this object supports networking. Override this function to indicate that the object supports networking.
- Returns
- true if the object supports networking; false otherwise.
◆ ObjectBeginPlay()
virtual void UAdvancedReplicatedObject::ObjectBeginPlay |
( |
| ) |
|
|
inlineprotectedvirtual |
Called when the object is initialized and ready to be used. Override this function to perform any necessary setup or initialization logic.
◆ ObjectEndPlay()
virtual void UAdvancedReplicatedObject::ObjectEndPlay |
( |
| ) |
|
|
inlineprotectedvirtual |
Called when the object is about to be destroyed. Override this function to handle cleanup or finalization before destruction.
◆ OnRep_Owner()
virtual void UAdvancedReplicatedObject::OnRep_Owner |
( |
| ) |
|
|
inlineprotectedvirtual |
Callback function called when the Owner property is updated on clients. Override this function to handle logic that should occur when the Owner property changes.
- Note
- This function is automatically called on clients when the Owner property is replicated.
◆ PostInitProperties()
virtual void UAdvancedReplicatedObject::PostInitProperties |
( |
| ) |
|
|
overridevirtual |
Called after properties have been initialized. Override this function to handle additional setup after properties have been initialized.
◆ ReplicateSubobjects()
virtual bool UAdvancedReplicatedObject::ReplicateSubobjects |
( |
UActorChannel * | Channel, |
|
|
FOutBunch * | Bunch, |
|
|
FReplicationFlags * | RepFlags ) |
|
virtual |
Handles the replication of subobjects for this object. Override this function to manage replication of subobjects.
- Parameters
-
Channel | The channel to use for replication. |
Bunch | The bunch of data to replicate. |
RepFlags | Flags for replication. |
- Returns
- true if the subobjects were successfully replicated; false otherwise.
The documentation for this class was generated from the following file: