UKismetSystemLibrary::Conv_ObjectToSoftObjectReference
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Wraps a hard object reference in a soft object reference. Backs the automatic Blueprint cast from an object pin to a soft object reference pin.
Caveats & Gotchas
- • Does not add its own strong reference — the resulting soft reference only stays resolvable while something else keeps the object loaded (or it's a loaded asset).
- • Marked BlueprintInternalUseOnly; in Blueprint this conversion happens implicitly on pin connection.
Signature
static TSoftObjectPtr<UObject> Conv_ObjectToSoftObjectReference(UObject* Object) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Object | UObject* | Object to wrap as a soft object reference. | — |
Return Type
TSoftObjectPtr<UObject> Example
Wrap an object as a soft reference C++
UObject* MyObject = GetSomeLoadedAsset();
TSoftObjectPtr<UObject> SoftRef = UKismetSystemLibrary::Conv_ObjectToSoftObjectReference(MyObject); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?