UKismetSystemLibrary::Conv_ComponentReferenceToSoftComponentReference
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Converts a hard FComponentReference into an FSoftComponentReference, for storage or serialization contexts that prefer a soft reference to the owning actor.
Caveats & Gotchas
- • Marked BlueprintAutocast, so Blueprint performs this conversion implicitly on pin connection rather than through an explicit node.
- • FSoftComponentReference stores the owning actor as a soft object path, so resolving it later still requires that actor to be loaded.
Signature
static FSoftComponentReference Conv_ComponentReferenceToSoftComponentReference(const FComponentReference& ComponentReference) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| ComponentReference | const FComponentReference& | Hard component reference to convert. | — |
Return Type
FSoftComponentReference Example
Convert to a soft component reference C++
FComponentReference HardRef;
HardRef.ComponentProperty = FName("StaticMeshComponent0");
FSoftComponentReference SoftRef = UKismetSystemLibrary::Conv_ComponentReferenceToSoftComponentReference(HardRef); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?