Functions for BP and C++
All functions can be found in the DataShardUtils_BP.
More...
|
static bool | DataShardUtils_BP::CreateShard (const UObject *WorldContextObject, const FDataShardKey &Key, const int32 &InitData) |
|
static bool | DataShardUtils_BP::SetOrCreateShard (const UObject *WorldContextObject, const FDataShardKey &Key, const int32 &InitData) |
|
static bool | DataShardUtils_BP::RemoveShard (const UObject *WorldContextObject, const FDataShardKey &Key) |
|
static void | DataShardUtils_BP::SetShardData (const UObject *WorldContextObject, const FDataShardKey &Key, const int32 &InData) |
|
static bool | DataShardUtils_BP::GetShardData (const UObject *WorldContextObject, const FDataShardKey &Key, int32 &OutData) |
|
static bool | DataShardUtils_BP::GetShardDataPure (const UObject *WorldContextObject, const FDataShardKey &Key, int32 &OutData) |
|
static bool | DataShardUtils_BP::CreateBoundKey (const UObject *WorldContextObject, const FDataShardKey &Parent, const FString &Name, AActor *Actor, FDataShardKey &OutKey) |
|
static bool | DataShardUtils_BP::IsKeyValid (const UObject *WorldContextObject, const FDataShardKey &Key) |
|
static FDataShardKey | DataShardUtils_BP::MakeShardKey (const FString &Name, UObject *Owner) |
|
static FDataShardKey | DataShardUtils_BP::MakeGlobalShardKey (const UObject *WorldContextObject, const FString &Name) |
|
static void | DataShardUtils_BP::BindEventOnShardDataChange (const UObject *WorldContextObject, const FDataShardKey &Key, const FOnShardDataChange &Event) |
|
static void | DataShardUtils_BP::UnbindEventOnShardDataChange (const UObject *WorldContextObject, const FDataShardKey &Key, const FOnShardDataChange &Event) |
|
static void | DataShardUtils_BP::UnbindAllEventsOnShardDataChange (const UObject *WorldContextObject, const FDataShardKey &Key) |
|
Functions for BP and C++
All functions can be found in the DataShardUtils_BP.
◆ BindEventOnShardDataChange()
static void DataShardUtils_BP::BindEventOnShardDataChange |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key, |
|
|
const FOnShardDataChange & | Event ) |
|
static |
Registers an event to be called when a DataShard's value changes
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | Key to the DataShard to monitor for changes |
Event | Event delegate that will be triggered when the DataShard value changes |
◆ CreateBoundKey()
static bool DataShardUtils_BP::CreateBoundKey |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Parent, |
|
|
const FString & | Name, |
|
|
AActor * | Actor, |
|
|
FDataShardKey & | OutKey ) |
|
static |
Creates a new key that references an existing DataShard Allows multiple keys to access the same DataShard data
- Parameters
-
WorldContextObject | Object that provides access to the world |
Parent | Existing key to a DataShard |
Name | Name for the new key |
Actor | Actor that will own the new key (can be null for global keys) |
OutKey | [out] Receives the newly created key |
- Returns
- True if the new key was successfully created, false if parent key was invalid
◆ CreateShard()
static bool DataShardUtils_BP::CreateShard |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key, |
|
|
const int32 & | InitData ) |
|
static |
Creates a new DataShard with the specified key and data
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | Key that will be used to access the DataShard |
InitData | The initial data to store in the DataShard (can be any data type) |
- Returns
- True if the DataShard was successfully created, false otherwise
◆ GetShardData()
static bool DataShardUtils_BP::GetShardData |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key, |
|
|
int32 & | OutData ) |
|
static |
Retrieves data from a DataShard
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | Key to the DataShard to retrieve data from |
OutData | [out] Variable that will receive the DataShard's data (must be the correct type) |
- Returns
- True if the DataShard was found and data retrieved successfully, false otherwise
◆ GetShardDataPure()
static bool DataShardUtils_BP::GetShardDataPure |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key, |
|
|
int32 & | OutData ) |
|
static |
Retrieves data from a DataShard
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | Key to the DataShard to retrieve data from |
OutData | [out] Variable that will receive the DataShard's data (must be the correct type) |
- Returns
- True if the DataShard was found and data retrieved successfully, false otherwise
◆ IsKeyValid()
static bool DataShardUtils_BP::IsKeyValid |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key ) |
|
static |
Checks if a key exists in the subsystem and points to a valid shard
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | The key to check |
- Returns
- true if the key exists and points to a valid shard, false otherwise
◆ MakeGlobalShardKey()
static FDataShardKey DataShardUtils_BP::MakeGlobalShardKey |
( |
const UObject * | WorldContextObject, |
|
|
const FString & | Name ) |
|
static |
Creates a global DataShard key not associated with any specific owner Global keys are accessible from anywhere
- Parameters
-
WorldContextObject | Object that provides access to the world |
Name | Name identifier for the key |
- Returns
- A new global DataShardKey structure
◆ MakeShardKey()
static FDataShardKey DataShardUtils_BP::MakeShardKey |
( |
const FString & | Name, |
|
|
UObject * | Owner ) |
|
static |
Creates a DataShard key structure associated with a specific owner
- Parameters
-
Name | Name identifier for the key |
Owner | Object that will own this key (typically an Actor) |
- Returns
- A new DataShardKey structure
◆ RemoveShard()
static bool DataShardUtils_BP::RemoveShard |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key ) |
|
static |
Removes a key to a DataShard, deleting the DataShard if no references remain
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | Key to the DataShard to remove |
- Returns
- True if the key was successfully removed, false if the key or DataShard was not found
◆ SetOrCreateShard()
static bool DataShardUtils_BP::SetOrCreateShard |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key, |
|
|
const int32 & | InitData ) |
|
static |
Creates a new DataShard with the specified key and data if no DataShard exist. If the Key points to a existing Shard the given data will be set
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | Key that will be used to access the DataShard |
InitData | The initial or new data to store in the DataShard (can be any data type) |
- Returns
- True if the DataShard was successfully created or exist, false otherwise
◆ SetShardData()
static void DataShardUtils_BP::SetShardData |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key, |
|
|
const int32 & | InData ) |
|
static |
Updates the data stored in an existing DataShard Can be used to change both the value and the data type of the stored data
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | Key to the DataShard to update |
InData | The new data to store in the DataShard (can be any type, even new types are allowed) |
◆ UnbindAllEventsOnShardDataChange()
static void DataShardUtils_BP::UnbindAllEventsOnShardDataChange |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key ) |
|
static |
Unregisters all events from being called when a DataShard's value changes
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | Key to the DataShard to stop monitoring for all events |
◆ UnbindEventOnShardDataChange()
static void DataShardUtils_BP::UnbindEventOnShardDataChange |
( |
const UObject * | WorldContextObject, |
|
|
const FDataShardKey & | Key, |
|
|
const FOnShardDataChange & | Event ) |
|
static |
Unregisters a specific event from being called when a DataShard's value changes
- Parameters
-
WorldContextObject | Object that provides access to the world |
Key | Key to the DataShard to stop monitoring |
Event | Specific event delegate to unregister |