Inherits UGameInstanceSubsystem.
|
| virtual void | Initialize (FSubsystemCollectionBase &Collection) override |
| |
| virtual void | Deinitialize () override |
| |
| bool | CreateShard (const FDataShardKey &Key, const FProperty *InProperty, const void *InData=nullptr) |
| |
| bool | CreateShard (const FDataShardKey &Key, const UObject *Container, const FName &PropertyName) |
| |
| bool | GetShardData (const FDataShardKey &Key, const void *&OutData) const |
| |
| template<typename T> |
| const T * | GetShardData (const FDataShardKey &Key, const bool bCheck=false) const |
| |
| template<typename T> |
| const T * | GetShardData (const int32 &ID, const bool bCheck=false) const |
| |
| template<typename T> |
| TSharedPtr< const T > | GetShardDataCopy (const FDataShardKey &Key, const bool bCheck=false) const |
| |
| template<typename T> |
| TSharedPtr< const T > | GetShardDataCopy (const int32 &ID, const bool bCheck=false) const |
| |
| bool | SetShardData (const FDataShardKey &Key, const void *InData, const FProperty *InProperty) const |
| |
| bool | SetShardData (const FDataShardKey &Key, const UObject *Container, const FName &PropertyName) const |
| |
| bool | RemoveKey (const FDataShardKey &Key) |
| |
| bool | CreateBoundKey (const FDataShardKey &Parent, const FDataShardKey &KeyInfo, FDataShardKey &OutKey) |
| |
| FDataShardKey | CreateBoundKey (const FDataShardKey &Parent, const FDataShardKey &KeyInfo) |
| |
| bool | IsKeyValid (const FDataShardKey &Key) const |
| |
| void | BindEventOnKeyAdded (const FOnKeyChange &Delegate) |
| |
| void | UnbindEventOnKeyAdded (const FOnKeyChange &Delegate) |
| |
| void | UnbindAllEventsOnKeyAdded (const UObject *Object) |
| |
| void | BindEventOnKeyRemoved (const FOnKeyChange &Delegate) |
| |
| void | UnbindEventOnKeyRemoved (const FOnKeyChange &Delegate) |
| |
| void | UnbindAllEventsOnKeyRemoved (const UObject *Object) |
| |
| void | BindEventOnShardAdded (const FOnShardChange &Delegate) |
| |
| void | UnbindEventOnShardAdded (const FOnShardChange &Delegate) |
| |
| void | UnbindAllEventsOnShardAdded (const UObject *Object) |
| |
| void | BindEventOnShardRemoved (const FOnShardChange &Delegate) |
| |
| void | UnbindEventOnShardRemoved (const FOnShardChange &Delegate) |
| |
| void | UnbindAllEventsOnShardRemoved (const UObject *Object) |
| |
| void | BindEventOnDataChange (const FDataShardKey &Key, const FOnShardDataChange &Delegate) |
| |
| void | BindEventOnDataChange (const int32 &ID, const FOnShardDataChange_internal &Delegate) |
| |
| void | UnbindEventOnDataChange (const FDataShardKey &Key, const FOnShardDataChange &Delegate) |
| |
| void | UnbindEventOnDataChange (const int32 &ID, const FOnShardDataChange_internal &Delegate) |
| |
| void | UnbindAllEventsOnDataChange (const FDataShardKey &Key) |
| |
| void | UnbindAllEventsOnDataChange (const int32 &ID) |
| |
| void | UnbindAllEventsOnDataChange (const UObject *Object) |
| |
| const FFieldClass * | GetFieldClassFromShard (const FDataShardKey &Key) const |
| |
| FString | GetObjectPropertyClassNameFromShard (const FDataShardKey &Key) const |
| |
| bool | IsDataShardSameType (const FDataShardKey &Key, const FProperty *InProperty) const |
| |
| bool | IsShardTypeOf (const FDataShardKey &Key, const FFieldClass *InClass) const |
| |
| bool | IsShardTypeChildOf (const FDataShardKey &Key, const FFieldClass *InClass) const |
| |
| void | GetShardDump (FString &Out) const |
| |
| void | GetShardStringDump (FString &Out) const |
| |
| void | GetKeyDump (FString &Out) const |
| |
| void | GetRefDump (FString &Out) const |
| |
| void | GetShardIDsForObject (const UObject *InObject, TArray< int32 > &OutArray) const |
| |
| int32 | GetPoolSize () const |
| |
| int32 | GetActiveShardCount () const |
| |
| int32 | GetAvailableShardCount () const |
| |
| FString | GetDebugDataForShard (const int32 &InID) const |
| |
| FString | GetDebugDataForShard (const FDataShardKey &InKey) const |
| |
| FString | GetDebugDataForObject (const UObject *InObject) const |
| |
DataShardSubsystem manages the creation, access, and lifecycle of DataShards.
DataShards are a flexible data-sharing system that allows game objects to store and access type-safe data throughout the game.
The subsystem provides:
- Creation and management of typed data containers (DataShardObject)
- Key-based access to data with owner object association
- Reference counting for automatic cleanup
- Event notification when data changes
- Type safety and validation
This subsystem acts as the central manager for all DataShard operations and should be accessed through the DataShardUtils_BP utility functions in most cases, rather than directly.