While updating a project to 5.6 (across multiple versions), we encountered a pretty hard-to-debug problem with LevelSequenceActors to do with data migration from before 5.3 (I believe). Essentially, the migration that occurs in PostLoad can trigger an async load which, it seems, can run longer than expected and result in no data set in a migrated asset following a cook.
I was able to mitigate this with the following data validator. It doesn’t actually fix the problem, but emits a warning. In our case, waiting a while before resaving the umaps with the actors eventually let the loads finish and pass the validation without warnings.
#if WITH_EDITOR
EDataValidationResult ALevelSequenceActor::IsDataValid(class FDataValidationContext& Context) const
{
// Validate that PostLoad has successfully migrated from legacy data
// If this fails, it likely means that the async load in PostLoad is still pending. Saving again might fix it.
if (LevelSequence_DEPRECATED.IsValid())
{
const FText WarningMessage = FText::Format(NSLOCTEXT("LevelSequenceActor", "IsDataValid_Failed_LevelSequenceActor_Migration", "{0} data migration has not completed."), FText::FromString(GetFullName()));
Context.AddWarning(WarningMessage);
}
if (LevelSequenceAsset == nullptr)
{
const FText WarningMessage = FText::Format(NSLOCTEXT("LevelSequenceActor", "IsDataValid_Failed_LevelSequenceActor_NotConfigured", "{0} has no Level Sequence Asset defined."), FText::FromString(GetFullName()));
Context.AddWarning(WarningMessage);
}
return Super::IsDataValid(Context);
}
#endif