I have a
TSoftObjectPtr<UCustomizableObject>
. In my player character’s BeginPlay
I load it with FStreamableManager::RequestAsyncLoad
. Then, UCustomizableObject::PostLoad
is called and it loads all its subobjects in the main thread. This makes the editor freeze for a few seconds.
Why do I have to load this UCustomizableObject
?
My character changes appearance on runtime based on clothes and equipment. I can’t just set UCustomizableSkeletalComponent::CustomizableObjectInstance
in the editor. I need to create a new UCustomizableObjectInstance
on runtime, so I need a reference to the UCustomizableObject
to call UCustomizableObjectInstance::SetObject
with it.
I have discovered this freeze doesn’t happen if I convert the TSoftObjectPtr<UCustomizableObject>
to a TObjectPtr<UCustomizableObject>
. But that would make the editor take longer to load.
Is it normal that loading a UCUstomizableObject
causes a editor freeze like this? Is there something that could be wrongly set up?