UKismetSystemLibrary::IsObjectCooked
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if the object's outermost package has been cooked.
Caveats & Gotchas
- • Only compiled with WITH_EDITOR — this function does not exist in packaged (non-editor) builds, so don't call it from runtime-only code paths.
- • Checks the cooked flag on the object's package, not on the object instance itself.
- • Mainly useful for editor tooling/validation scripts that need to branch on cooked vs. uncooked asset state.
Signature
static bool IsObjectCooked(const UObject* Object) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Object | const UObject* | The object to check. | — |
Return Type
bool Example
Guard an editor-only validation step C++
#if WITH_EDITOR
if (UKismetSystemLibrary::IsObjectCooked(MyAsset))
{
UE_LOG(LogTemp, Warning, TEXT("Asset is already cooked, skipping re-import."));
}
#endif Tags
Version History
Introduced in: 4.24
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?