FSoftObjectPath::Reset
#include "UObject/SoftObjectPath.h"
Access: public
Specifiers: inline
Description
Clears both the asset path and the sub-path string, returning the soft object path to an empty (null) state.
Caveats & Gotchas
- • After calling Reset(), IsNull() returns true and any attempt to resolve the path via ResolveObject() or TryLoad() will return nullptr — no crash, but silent no-op resolution.
- • Reset() does not unload the referenced asset if it is already in memory; it only clears the path token. Use explicit asset unloading APIs if you need to free the object.
Signature
void Reset() Return Type
void Example
Clear a path before reuse C++
FSoftObjectPath MyPath(TEXT("/Game/Assets/MyTexture.MyTexture"));
// ... use path ...
MyPath.Reset(); // now IsNull() == true
check(MyPath.IsNull()); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?