I’m currently in the saving part of the UE4 VR C++ course, and I’m having some trouble with serializing the stroke. I keep getting this error message when trying to load:
LogSpawn: Warning: SpawnActor failed because no class was specified
Serializing:
FStrokeState AStroke::SerializeToStruct() const
{
FStrokeState State;
State.Class = GetClass();
State.ControlPoints = ControlPoints;
return State;
}
De-serializing:
AStroke* AStroke::DeserializeAndSpawnFromStruct(UWorld* World, const FStrokeState& StrokeState)
{
AStroke* Stroke = World->SpawnActor<AStroke>(StrokeState.Class);
for (FVector ControlPoint : StrokeState.ControlPoints)
{
Stroke->Update(ControlPoint);
}
return Stroke;
}
Any help would be appreciated!