UKismetSystemLibrary::LoadClassAsset_Blocking
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticBlueprintCallable
Description
Resolves a soft class reference immediately, loading the class synchronously if it isn't already loaded. Exposed to Blueprint as the "Load Class Asset (Blocking)" node.
Caveats & Gotchas
- • This stalls the calling thread until the load finishes and will cause a hitch — prefer Async Load Class Asset on any path that runs during gameplay.
- • Returns nullptr if the soft reference is unset or the class fails to load (e.g. the Blueprint was deleted or the path is invalid).
- • Calling this from a non-game thread is unsafe; the underlying asset loading pipeline is not designed for arbitrary worker-thread use.
Signature
static ENGINE_API UClass* LoadClassAsset_Blocking(TSoftClassPtr<UObject> AssetClass) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| AssetClass | TSoftClassPtr<UObject> | The soft class reference to resolve or load. | — |
Return Type
UClass* Example
Synchronously load a soft-referenced class C++
UClass* LoadedClass = UKismetSystemLibrary::LoadClassAsset_Blocking(MySoftClassRef);
if (LoadedClass)
{
UObject* Instance = NewObject<UObject>(GetTransientPackage(), LoadedClass);
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?