Navigation
API > API/Plugins > API/Plugins/PCG
Inheritance Hierarchy
- UObject
- UPCGManagedResource
- UPCGManagedActors
- UPCGManagedComponent
- UPCGManagedDebugDrawComponent
- UPCGManagedISMComponent
- UPCGManagedDebugStringMessageKey
References
| Module | PCG |
| Header | /Engine/Plugins/PCG/Source/PCG/Public/PCGManagedResource.h |
| Include | #include "PCGManagedResource.h" |
Syntax
UCLASS (BlueprintType)
class UPCGManagedResource : public UObject
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bIsMarkedUnused | ||
| bool | bMarkedTransientOnLoad | Resources on a Load-as-preview component are marked as 'transient on load'; these resources must not be affected in any permanent way in order to make sure they are not serialized in a different state if their outer is saved. | |
| FPCGCrc | Crc |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | CanBeUsed () |
Returns whether a resource can be used - generally true except for resources marked as transient (from loading) | |
| void | ChangeTransientState
(
EPCGEditorDirtyMode NewEditingMode |
||
| bool | |||
| const FPCGCrc & | GetCrc () |
||
| bool | |||
| bool | |||
| void | MarkAsReused () |
Marks the resource as being reused as-is during the generation | |
| void | MarkAsUsed () |
Marks the resources as being kept and changed through generation | |
| void | |||
| bool | MoveResourceToNewActor
(
AActor* NewActor |
Move the given resource to a new actor. Return true if it has succeeded | |
| bool | MoveResourceToNewActor
(
AActor* NewActor, |
||
| void | Called when after a PCG component is applied to (such as after a RerunConstructionScript) | ||
| bool | Release
(
bool bHardRelease, |
Releases/Mark Unused the resource depending on the bHardRelease flag. | |
| bool | ReleaseIfUnused
(
TSet< TSoftObjectPtr< AActor > >& OutActorsToDelete |
Releases resource if empty or unused. | |
| void |