FObjectSaveData
Overview
FObjectSaveData is a struct designed to handle the serialization and deserialization of UObject instances. It uses the ILimenSaveObjectInterface interface to interact with objects that implement save functionality. The class stores serialized byte data, object class information, and a unique deterministic ID for each saved object.
Properties
Type | Name | Access | Description |
|---|---|---|---|
TArray | ByteData | SaveGame | Stores the serialized byte data of the UObject. |
FSoftClassPath | ObjectClass | SaveGame | The class path of the UObject being saved. |
FName | DeterministicId | SaveGame | A unique identifier for the UObject, ensuring consistency across saves. |
Functions
Return Type | Signature | Description |
|---|---|---|
void | SaveObjectData(UObject* InObject) | Saves the data from a given UObject to this instance. |
void | LoadData(UObject* OutObject) const | Loads the saved data into a given UObject. |
const FSoftClassPath& | GetObjectClass() const | Returns the class path of the saved object. |
FActorSaveData
Overview
FActorSaveData is a struct specifically designed to handle the serialization and deserialization of AActor instances. It inherits from FObjectSaveData and adds properties specific to actors, such as transform and name. The class uses the ILimenSaveObjectInterface interface to interact with actors that implement save functionality.
Properties
Type | Name | Access | Description |
|---|---|---|---|
TArray | ByteData | SaveGame | Stores the serialized byte data of the AActor. |
FTransform | ActorTransform | SaveGame | The transform of the saved actor. |
FName | ActorName | SaveGame | The name of the saved actor. |
TObjectPtr | ActorClass | SaveGame | The class pointer of the saved actor. |
FName | DeterministicId | SaveGame | A unique identifier for the actor, ensuring consistency across saves. |
Functions
Return Type | Signature | Description |
|---|---|---|
FActorSaveData | FActorSaveData(AActor* SaveActor) | Constructor that initializes the data from an AActor instance. |
const TArray & | GetByteData() const | Returns the byte data of the saved actor. |
void | SetByteData(const TArray & NewData) | Sets the byte data for the saved actor. |
FTransform | GetActorTransform() const | Returns the transform of the saved actor. |
void | SetActorTransform(const FTransform& InActorTransform) | Sets the transform for the saved actor. |
FName | GetActorName() const | Returns the name of the saved actor. |
UClass* | GetActorClass() const | Returns the class pointer of the saved actor. |
FName | GetDeterministicId() const | Returns the unique identifier of the saved actor. |
void | LoadData(AActor* Actor) const | Loads the saved data into a given AActor instance. |
bool | operator==(const FActorSaveData& Other) const | Compares two |
bool | operator==(AActor* Other) const | Checks if an actor is equal to this |
bool | IsValid() const | Checks if the saved actor data is valid. |
FActorSaveData::operator bool() const | Converts the instance to a boolean indicating validity. | |
bool | operator!() const | Negates the validity of the saved actor data. |
void | SetActorName(const FName& InActorName) | Sets the name for the saved actor. |
void | SaveActorData(AActor* InActor) | Saves the data from an AActor instance to this instance. |
void | LoadActorData(AActor* InActor) const | Loads the saved data into a given AActor instance. |
ULimenSaveData
Overview
ULimenSaveData is a class that extends USaveGame and manages lists of FActorSaveData and FObjectSaveData. It provides methods to add, retrieve, and count saved actor and object data. The class ensures that each saved object has a unique deterministic ID for consistency across saves.
Properties
Type | Name | Access | Description |
|---|---|---|---|
TArray | ActorSaveDataList | SaveGame | List of saved actor data. |
TArray | ObjectSaveDataList | SaveGame | List of saved UObject data. |
Functions
Return Type | Signature | Description |
|---|---|---|
bool | GetActorSaveData(const FName& ActorName, FActorSaveData& OutSaveData) const | Retrieves the saved data for an actor by name. |
bool | GetActorSaveData(const int Index, FActorSaveData& OutSaveData) const | Retrieves the saved data for an actor by index. |
uint32 | GetActorSaveDataCount() const | Returns the number of saved actors. |
bool | GetObjectSaveData(const int32 Index, FObjectSaveData& OutSaveData) const | Retrieves the saved data for a UObject by index. |
uint32 | GetObjectSaveDataCount() const | Returns the number of saved UObjects. |
int | AddActorSaveData(const FActorSaveData& ActorSaveData) | Adds or updates actor save data. |
int | AddActorSaveData(AActor* ActorSaveData) | Adds or updates actor save data from an AActor instance. |
int | AddObjectSaveData(const FObjectSaveData& ObjectSaveData) | Adds object save data. |
int | AddObjectSaveData(UObject* ObjectSaveData) | Adds object save data from a UObject instance. |