How to simply spawn Actor variable?

As far as I know you can’t directly restore an object instance from SaveGame, but like Rev0verDrive says you’d have to spawn a new instance from class (blueprint node == purple, not blue), then write the data from the SaveGame back into the new instance. I’d write a method for that class to be initialized with save game data, instead of publicly exposing properties. That takes some time to do but then you can make sure instances are only initialized once and that those properties are not being modified later on when they shouldn’t be.

// Public method to initialize private properties once:

UMyActor::InitializeMyActor(const FS_MyActorSaveData& InData) {
  check(WasInitializeMyActorCalled == false);
  WasInitializeMyActorCalled = true;

  // Initialize instance from InData
}

I remember there’s also a way to mark a blueprint property as “exposed on spawn” or something, I can’t remember the last time I used that. It bugs entirely on widgets (props not set during… OnInitialized I think?), and I avoid blueprints when I can anyway.

2 Likes