Data Shard Plugin
Loading...
Searching...
No Matches
Delegates

With these functions, you can add and remove delegates to different events in the manager.
Some of these functions are exposed to Blueprint (see DataShardUtils_BP) More...

Functions

void DataShardSubsystem::BindEventOnKeyAdded (const FOnKeyChange &Delegate)
 
void DataShardSubsystem::UnbindEventOnKeyAdded (const FOnKeyChange &Delegate)
 
void DataShardSubsystem::UnbindAllEventsOnKeyAdded (const UObject *Object)
 
void DataShardSubsystem::BindEventOnKeyRemoved (const FOnKeyChange &Delegate)
 
void DataShardSubsystem::UnbindEventOnKeyRemoved (const FOnKeyChange &Delegate)
 
void DataShardSubsystem::UnbindAllEventsOnKeyRemoved (const UObject *Object)
 
void DataShardSubsystem::BindEventOnShardAdded (const FOnShardChange &Delegate)
 
void DataShardSubsystem::UnbindEventOnShardAdded (const FOnShardChange &Delegate)
 
void DataShardSubsystem::UnbindAllEventsOnShardAdded (const UObject *Object)
 
void DataShardSubsystem::BindEventOnShardRemoved (const FOnShardChange &Delegate)
 
void DataShardSubsystem::UnbindEventOnShardRemoved (const FOnShardChange &Delegate)
 
void DataShardSubsystem::UnbindAllEventsOnShardRemoved (const UObject *Object)
 
void DataShardSubsystem::BindEventOnDataChange (const FDataShardKey &Key, const FOnShardDataChange &Delegate)
 
void DataShardSubsystem::BindEventOnDataChange (const int32 &ID, const FOnShardDataChange_internal &Delegate)
 
void DataShardSubsystem::UnbindEventOnDataChange (const FDataShardKey &Key, const FOnShardDataChange &Delegate)
 
void DataShardSubsystem::UnbindEventOnDataChange (const int32 &ID, const FOnShardDataChange_internal &Delegate)
 
void DataShardSubsystem::UnbindAllEventsOnDataChange (const FDataShardKey &Key)
 
void DataShardSubsystem::UnbindAllEventsOnDataChange (const int32 &ID)
 
void DataShardSubsystem::UnbindAllEventsOnDataChange (const UObject *Object)
 

Detailed Description

With these functions, you can add and remove delegates to different events in the manager.
Some of these functions are exposed to Blueprint (see DataShardUtils_BP)

You have the following events to bind:

Function Documentation

◆ BindEventOnDataChange() [1/2]

void DataShardSubsystem::BindEventOnDataChange ( const FDataShardKey & Key,
const FOnShardDataChange & Delegate )

Registers a Blueprint delegate to be called when a shard's data changes

Parameters
Key- The key of the shard to monitor for changes
Delegate- The delegate function to call when the shard data changes
Note
The delegate will receive the key of the changed shard as a parameter

◆ BindEventOnDataChange() [2/2]

void DataShardSubsystem::BindEventOnDataChange ( const int32 & ID,
const FOnShardDataChange_internal & Delegate )

Registers a C++ delegate to be called when a shard's data changes Used primarily for internal systems and C++ code

Parameters
ID- The ID of the shard to monitor for changes
Delegate- The delegate function to call when the shard data changes
Note
The delegate will receive the ID of the changed shard as a parameter

◆ BindEventOnKeyAdded()

void DataShardSubsystem::BindEventOnKeyAdded ( const FOnKeyChange & Delegate)

Register a delegate to be called when a new key was added

Parameters
DelegateThe delegate function to call when a new key was added
Note
The delegate will receive the ID and the key of the changed key as a parameter
Exposing this to Blueprint breaks encapsulation, allowing any object to access all keys and shards. Currently used internally but could support advanced game systems.

◆ BindEventOnKeyRemoved()

void DataShardSubsystem::BindEventOnKeyRemoved ( const FOnKeyChange & Delegate)

Register a delegate to be called when a new key was removed

Parameters
DelegateThe delegate function to call when a new key was removed
Note
The delegate will receive the ID and the key of the changed key as a parameter
Exposing this to Blueprint breaks encapsulation, allowing any object to access all keys and shards. Currently used internally but could support advanced game systems.

◆ BindEventOnShardAdded()

void DataShardSubsystem::BindEventOnShardAdded ( const FOnShardChange & Delegate)

Register a delegate to be called when a new shard is added

Parameters
DelegateThe delegate function to call when a new shard is added
Note
The delegate will receive the ID of the changed shard as a parameter
Exposing this to Blueprint isn't useful since Blueprint code has no way to get the keys needed to access shards. Currently used internally but could support advanced game systems.

◆ BindEventOnShardRemoved()

void DataShardSubsystem::BindEventOnShardRemoved ( const FOnShardChange & Delegate)

Register a delegate to be called when a new shard is removed

Parameters
DelegateThe delegate function to call when a new shard is removed
Note
The delegate will receive the ID of the changed shard as a parameter
Exposing this to Blueprint isn't useful since Blueprint code has no way to get the keys needed to access shards. Currently used internally but could support advanced game systems.

◆ UnbindAllEventsOnDataChange() [1/3]

void DataShardSubsystem::UnbindAllEventsOnDataChange ( const FDataShardKey & Key)

Removes all Blueprint delegates registered for a specific shard

Parameters
Key- The key of the shard to remove all delegates from

◆ UnbindAllEventsOnDataChange() [2/3]

void DataShardSubsystem::UnbindAllEventsOnDataChange ( const int32 & ID)

Removes all C++ delegates registered for a specific shard

Parameters
ID- The ID of the shard to remove all delegates from

◆ UnbindAllEventsOnDataChange() [3/3]

void DataShardSubsystem::UnbindAllEventsOnDataChange ( const UObject * Object)

Removes all C++ and Blueprint delegates registered for a specific shard

Parameters
Object- The object for which all bound delegates will be removed

◆ UnbindAllEventsOnKeyAdded()

void DataShardSubsystem::UnbindAllEventsOnKeyAdded ( const UObject * Object)

Removes all delegates bound for an object when a new key is added

Parameters
ObjectThe object for which all bound delegates will be removed

◆ UnbindAllEventsOnKeyRemoved()

void DataShardSubsystem::UnbindAllEventsOnKeyRemoved ( const UObject * Object)

Removes all delegates bound for an object when a key is removed

Parameters
ObjectThe object for which all bound delegates will be removed

◆ UnbindAllEventsOnShardAdded()

void DataShardSubsystem::UnbindAllEventsOnShardAdded ( const UObject * Object)

Removes all delegates bound for an object when a shard is added

Parameters
ObjectThe object for which all bound delegates will be removed

◆ UnbindAllEventsOnShardRemoved()

void DataShardSubsystem::UnbindAllEventsOnShardRemoved ( const UObject * Object)

Removes all delegates bound for an object when a shard is removed

Parameters
ObjectThe object for which all bound delegates will be removed

◆ UnbindEventOnDataChange() [1/2]

void DataShardSubsystem::UnbindEventOnDataChange ( const FDataShardKey & Key,
const FOnShardDataChange & Delegate )

Removes a Blueprint delegate previously registered for shard data changes

Parameters
Key- The key of the shard the delegate was registered for
Delegate- The delegate to remove

◆ UnbindEventOnDataChange() [2/2]

void DataShardSubsystem::UnbindEventOnDataChange ( const int32 & ID,
const FOnShardDataChange_internal & Delegate )

Removes a C++ delegate previously registered for shard data changes

Parameters
ID- The ID of the shard the delegate was registered for
Delegate- The delegate to remove

◆ UnbindEventOnKeyAdded()

void DataShardSubsystem::UnbindEventOnKeyAdded ( const FOnKeyChange & Delegate)

Removes a delegate previously registered for a new key added

Parameters
DelegateThe delegate to remove

◆ UnbindEventOnKeyRemoved()

void DataShardSubsystem::UnbindEventOnKeyRemoved ( const FOnKeyChange & Delegate)

Removes a delegate previously registered for a new key removed

Parameters
DelegateThe delegate to remove

◆ UnbindEventOnShardAdded()

void DataShardSubsystem::UnbindEventOnShardAdded ( const FOnShardChange & Delegate)

Removes a delegate previously registered for a new shard added

Parameters
DelegateThe delegate to remove

◆ UnbindEventOnShardRemoved()

void DataShardSubsystem::UnbindEventOnShardRemoved ( const FOnShardChange & Delegate)

Removes a delegate previously registered for a new shard removed

Parameters
DelegateThe delegate to remove