Navigation
API > API/Plugins > API/Plugins/GeometryScriptingEditor
AGeneratedDynamicMeshActor is an Editor-only subclass of ADynamicMeshActor that provides special support for dynamic procedural generation of meshes in the Editor, eg via Blueprints. Expensive procedural generation implemented via BP can potentially cause major problems in the Editor, in particular with interactive performance. AGeneratedDynamicMeshActor provides special infrastructure for this use case. Essentially, instead of doing procedural generation in the Construction Script, a BP-implementable event OnRebuildGeneratedMesh is available, and doing the procedural mesh regeneration when that function fires will generally provide better in-Editor interactive performance.
| Name | AGeneratedDynamicMeshActor |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingEditor/Public/GeometryActors/GeneratedDynamicMeshActor.h |
| Include Path | #include "GeometryActors/GeneratedDynamicMeshActor.h" |
Syntax
UCLASS ()
class AGeneratedDynamicMeshActor : public ADynamicMeshActor
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → ADynamicMeshActor → AGeneratedDynamicMeshActor
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
AGeneratedDynamicMeshActor
(
const FObjectInitializer& ObjectInitializer |
GeometryActors/GeneratedDynamicMeshActor.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~AGeneratedDynamicMeshActor() |
GeometryActors/GeneratedDynamicMeshActor.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bEnableRebuildProgress | bool | Support for progress dialog display during OnRebuildGeneratedMesh. | GeometryActors/GeneratedDynamicMeshActor.h |
|
| bFrozen | bool | If true, the DynamicMeshComponent will be "Frozen" in its current state, and automatic rebuilding will be disabled. | GeometryActors/GeneratedDynamicMeshActor.h |
|
| bResetOnRebuild | bool | If true, the DynamicMeshComponent will be cleared before the RebuildGeneratedMesh event is executed. | GeometryActors/GeneratedDynamicMeshActor.h |
|
| DialogDelay | float | Delay in seconds before the progress dialog is shown, if enabled | GeometryActors/GeneratedDynamicMeshActor.h |
|
| NumProgressSteps | int | Number of progress steps/ticks that the progress bar will be subdivided into | GeometryActors/GeneratedDynamicMeshActor.h |
|
| ProgressMessage | FString | The default progress message | GeometryActors/GeneratedDynamicMeshActor.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsCurrentlyRebuilding | bool | Flag set during a rebuild used to help detect/avoid recursive rebuilds | GeometryActors/GeneratedDynamicMeshActor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CopyPropertiesFromStaticMesh
(
AStaticMeshActor* StaticMeshActor, |
Attempt to copy Actor Properties from a StaticMeshActor. | GeometryActors/GeneratedDynamicMeshActor.h |
|
void CopyPropertiesToStaticMesh
(
AStaticMeshActor* StaticMeshActor, |
Attempt to copy Actor Properties to a StaticMeshActor. | GeometryActors/GeneratedDynamicMeshActor.h |
|
virtual void ExecuteRebuildGeneratedMeshIfPending() |
This function will fire the RebuildGeneratedMesh function if the actor has been marked for a pending rebuild (eg via OnConstruction) | GeometryActors/GeneratedDynamicMeshActor.h | |
void IncrementProgress
(
int NumSteps, |
Call this function from within OnRebuildGeneratedMesh to update progress tracking. | GeometryActors/GeneratedDynamicMeshActor.h |
|
void MarkForMeshRebuild
(
bool bImmediate, |
Mark this Actor as modified so that OnRebuildGeneratedMesh runs | GeometryActors/GeneratedDynamicMeshActor.h |
|
void OnRebuildGeneratedMesh
(
UDynamicMesh* TargetMesh |
This event will be fired to notify the BP that the generated Mesh should be rebuilt. | GeometryActors/GeneratedDynamicMeshActor.h |
|
virtual bool WantsRebuild() |
GeometryActors/GeneratedDynamicMeshActor.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Destroyed() |
GeometryActors/GeneratedDynamicMeshActor.h | ||
virtual void OnConstruction
(
const FTransform& Transform |
GeometryActors/GeneratedDynamicMeshActor.h | ||
virtual void PostActorCreated() |
GeometryActors/GeneratedDynamicMeshActor.h | ||
virtual void PostUnregisterAllComponents() |
GeometryActors/GeneratedDynamicMeshActor.h | ||
virtual void PreRegisterAllComponents() |
These are called when Actor exists in a sublevel that is hidden/shown | GeometryActors/GeneratedDynamicMeshActor.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditUndo () |
GeometryActors/GeneratedDynamicMeshActor.h | ||
virtual void PostEditUndo
(
TSharedPtr< ITransactionObjectAnnotation > TransactionAnnotation |
GeometryActors/GeneratedDynamicMeshActor.h | ||
virtual void PostLoad() |
GeometryActors/GeneratedDynamicMeshActor.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void RebuildGeneratedMesh
(
UDynamicMesh* TargetMesh |
Overridable native event for when the generated Mesh should be rebuilt. | GeometryActors/GeneratedDynamicMeshActor.h | |
virtual void RegisterWithGenerationManager() |
GeometryActors/GeneratedDynamicMeshActor.h | ||
virtual void UnregisterWithGenerationManager() |
GeometryActors/GeneratedDynamicMeshActor.h |