TSoftClassPtr::Reset
#include "UObject/SoftObjectPtr.h"
Access: public
Specifiers: inline
Description
Clears the soft class pointer back to the null state, releasing both the cached weak pointer and the stored soft object path.
Caveats & Gotchas
- • Reset clears the path entirely — after calling it, IsPending() and IsNull() both reflect a fully empty pointer, not merely an unloaded one.
- • This does not unload the referenced class from memory; it only severs this pointer's reference to it.
Signature
UE_FORCEINLINE_HINT void Reset() Return Type
void Example
Nulling a soft class reference C++
UPROPERTY(EditAnywhere)
TSoftClassPtr<UMyAbility> AbilityClass;
void UMyComponent::ClearAbility()
{
AbilityClass.Reset();
check(AbilityClass.IsNull());
} Tags
Version History
Introduced in: 4.17
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?