Hi! I’ve asked this question in the Answers section, but got no answer, so I thought I’d ask it here, too. Hope that’s okay.
If there is no way, that seems like it would mean that you can’t use Delays in GamePlay-code and have that work with your SaveGames without modifying the engine.
Here’s the question: The class I want to serialize is
class FDelayAction : public FPendingLatentAction
class ENGINE_API FPendingLatentAction
As you can see, FPendingLatentAction does not derive from UObject, meaning that I can’t use UE4’s Cast to check if it is an FDelayAction. But in order to serialize all the FDelayActions, i would need to iterate through FPendingLatentActions and cast them to FDelayAction. dynamic_cast also wont work, because UE4 is compiled without RTTI.
I thought about somehow accessing the Node from the blueprint that made the FPendingLatentAction and seeing if that’s a Delay, but that data only exists within the FDelayAction.
I also considered using the GetDescription()-method and seeing if the returned string starts with “Delay”, but GetDescription() only exists in the editor.
If I can’t make this work, that would mean there’s no way to make Delays work with a SaveGame-system. I could change the engine code or turn on RTTI, but I’d much rather avoid making such changes to the engine.
Anyone see a way?