UKismetSystemLibrary::Conv_ClassToSoftClassReference
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Wraps a hard class reference in a soft class reference. Backs the automatic Blueprint cast from a class pin to a soft class reference pin.
Caveats & Gotchas
- • Does not add a strong reference to the class — if nothing else keeps it loaded, the resulting soft reference can become unresolved later.
- • Marked BlueprintInternalUseOnly; in Blueprint this happens implicitly via pin conversion, not through an explicit node.
Signature
static TSoftClassPtr<UObject> Conv_ClassToSoftClassReference(const TSubclassOf<UObject>& Class) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Class | const TSubclassOf<UObject>& | Class to wrap as a soft class reference. | — |
Return Type
TSoftClassPtr<UObject> Example
Wrap a class as a soft reference C++
TSubclassOf<AActor> ActorClass = AMyActor::StaticClass();
TSoftClassPtr<UObject> SoftClass = UKismetSystemLibrary::Conv_ClassToSoftClassReference(ActorClass); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?