Navigation
API > API/Plugins > API/Plugins/PCG
This class is used to hold resources and their mechanism to delete them on demand. In order to allow for some reuse (e.g. components), the Release call supports a "soft" release by marking them unused in order to be potentially re-used down the line. At the end of the generate, a call to ReleaseIfUnused will serve to finally cleanup what is not needed anymore.
| Name | UPCGManagedResource |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/PCGManagedResource.h |
| Include Path | #include "PCGManagedResource.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType)
class UPCGManagedResource : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPCGManagedResource
Derived Classes
- UPCGInstancedActorsManagedResource
- UPCGManagedActors
- UPCGManagedComponentBase
- UPCGManagedDebugStringMessageKey
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanBeUsed() |
Returns whether a resource can be used - generally true except for resources marked as transient (from loading) | PCGManagedResource.h | |
virtual void ChangeTransientState
(
EPCGEditorDirtyMode NewEditingMode |
PCGManagedResource.h | ||
const FPCGCrc & GetCrc() |
PCGManagedResource.h | ||
virtual bool IsManaging
(
const UObject* InObject |
Returns true if this resource manages this object. | PCGManagedResource.h | |
bool IsMarkedTransientOnLoad() |
PCGManagedResource.h | ||
bool IsMarkedUnused() |
PCGManagedResource.h | ||
bool IsPreview() |
PCGManagedResource.h | ||
virtual void MarkAsReused() |
Marks the resource as being reused as-is during the generation | PCGManagedResource.h | |
virtual void MarkAsUsed() |
Marks the resources as being kept and changed through generation | PCGManagedResource.h | |
virtual void MarkTransientOnLoad() |
PCGManagedResource.h | ||
virtual bool MoveResourceToNewActor
(
AActor* NewActor |
Move the given resource to a new actor. Return true if it has succeeded | PCGManagedResource.h | |
virtual bool MoveResourceToNewActor
(
AActor* NewActor, |
PCGManagedResource.h | ||
virtual void PostApplyToComponent() |
Called when after a PCG component is applied to (such as after a RerunConstructionScript) | PCGManagedResource.h | |
virtual bool Release
(
bool bHardRelease, |
Releases/Mark Unused the resource depending on the bHardRelease flag. | PCGManagedResource.h | |
virtual bool ReleaseIfUnused
(
TSet< TSoftObjectPtr< AActor > >& OutActorsToDelete |
Releases resource if empty or unused. | PCGManagedResource.h | |
virtual bool ReleaseOnTeardown() |
Whether resource is transient and should be released on tear down. | PCGManagedResource.h | |
void SetCrc
(
const FPCGCrc& InCrc |
PCGManagedResource.h | ||
void SetIsPreview
(
bool bInIsPreview |
PCGManagedResource.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool DebugForcePurgeAllResourcesOnGenerate() |
PCGManagedResource.h |