Supposed I have following code:
USTRUCT()
struct FActorRecord
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
UClass* ActorClass;
UPROPERTY()
FTransform ActorTransform;
FActorRecord()
{
ActorClass = NULL;
ActorTransform = FTransform();
}
};
FORCEINLINE FArchive &operator <<(FArchive &Ar, FActorRecord& ActorStruct )
{
Ar << ActorStruct.ActorTransform;
Ar << ActorStruct.ActorClass;
return Ar;
}
How would I reference the pointer: ActorClass in ActorStruct? Should I use ActorStruct->ActorClass ? Or ActorStruct.ActorClass? Code Sense tells me both are wrong.
This is how I call it :
FActorRecord newRecord;
newRecord.ActorTransform = MyCharacter->GetTransform();
newRecord.ActorClass = MyCharacter->GetClass();