Navigation
API > API/Plugins > API/Plugins/MeshPartitionEditor
| Name | UMeshPartitionEditorComponent |
| Type | class |
| Header File | /Engine/Plugins/Experimental/MeshPartition/Source/MeshPartitionEditor/Public/MeshPartitionEditorComponent.h |
| Include Path | #include "MeshPartitionEditorComponent.h" |
Syntax
UCLASS (MinimalAPI, ClassGroup=(MeshPartition))
class UMeshPartitionEditorComponent : public UE::MeshPartition::UMeshPartitionComponent
Inheritance Hierarchy
- FRenderAssetOwnerStreamingState → UPrimitiveComponent → UMeshPartitionComponent → UMeshPartitionEditorComponent
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UMeshPartitionComponent → UMeshPartitionEditorComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsBodyInstanceOwner
- IPhysicsBodyInstanceOwnerResolver
- IPhysicsComponent
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMeshPartitionEditorComponent() |
MeshPartitionEditorComponent.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~UMeshPartitionEditorComponent() |
MeshPartitionEditorComponent.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bArePreviewSectionsVisible | bool | MeshPartitionEditorComponent.h |
|
|
| bBuildPreviewSection | bool | MeshPartitionEditorComponent.h |
|
|
| bForceSynchronousPreviewSectionBuild | bool | MeshPartitionEditorComponent.h |
|
|
| bHideBaseModifiers | bool | MeshPartitionEditorComponent.h |
|
|
| bIsTransformerPipelinePaused | bool | MeshPartitionEditorComponent.h |
|
|
| bModifierListChanged | bool | Set by OnLevelActorDeleted so we know that changes were made in the next UpdateModifierList. | MeshPartitionEditorComponent.h | |
| bPendingModifierListChange | bool | True when UpdateFromActorListChange needs to be called. | MeshPartitionEditorComponent.h | |
| BuildModifierFilterFunc | FModifierFilterFunc | MeshPartitionEditorComponent.h | ||
| CurrentModifiers | TArray< TObjectPtr< MeshPartition::UModifierComponent > > | MeshPartitionEditorComponent.h |
|
|
| EditorMaterialOverride | TObjectPtr< UMaterialInterface > | Optional material override to use in the editor when displaying the tool previews or pre-transformed preview meshes. | MeshPartitionEditorComponent.h |
|
| GroupRegistry | MeshPartition::FModifierGroupRegistry | MeshPartitionEditorComponent.h | ||
| InteractivePreviewSections | TArray< TObjectPtr< MeshPartition::APreviewSection > > | MeshPartitionEditorComponent.h |
|
|
| InteractiveSection | TObjectPtr< MeshPartition::AInteractiveSection > | MeshPartitionEditorComponent.h |
|
|
| LastActorSelected | TWeakObjectPtr< AActor > | MeshPartitionEditorComponent.h |
|
|
| PendingChangedBounds | TMap< EChangeType, TSet< FBox > > | Queued bounds updates to process on the next update. | MeshPartitionEditorComponent.h | |
| PendingChangedModifiers | TMap< FSoftObjectPath, TArray< MeshPartition::FModifierChangeInfo > > | Queued bounds updates to process on the next update. | MeshPartitionEditorComponent.h | |
| PreviewSectionBuildContexts | TArray< MeshPartition::FPreviewSectionBuildContext > | MeshPartitionEditorComponent.h |
|
|
| PreviewSections | TArray< TObjectPtr< MeshPartition::APreviewSection > > | MeshPartitionEditorComponent.h |
|
|
| PreviewSectionsToDestroy | TSet< TObjectKey< MeshPartition::APreviewSection > > | MeshPartitionEditorComponent.h | ||
| PreviewSectionTransformerContexts | TArray< TUniquePtr< MeshPartition::FTransformerContext > > | As FTransformerContext can be passed to async thread and the array entry can be relocated, better allocate it. | MeshPartitionEditorComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyBuiltMeshToSection
(
MeshPartition::ACompiledSection* InSection, |
Runs the full synchronous post-build pipeline on a compiled section: PrepareCompiledSections → ApplyChannels → PostBuildSectionMesh → Transformers (wait) → PostProcessSection. | MeshPartitionEditorComponent.h | |
bool ArePreviewSectionsVisible() |
Returns true if preview sections are currently visible. | MeshPartitionEditorComponent.h | |
void BuildMegaMeshCompiledSectionTextures
(
MeshPartition::ACompiledSection* InCompiledSection, |
Builds the collection of textures containing the channel map information and binds it to the compiled section's material. | MeshPartitionEditorComponent.h | |
void BuildMegaMeshPreviewSections
(
TConstArrayView< const FBox > InBounds |
Builds one or multiple APreviewSections encompassing the provided bounds. | MeshPartitionEditorComponent.h | |
void ClearBuildModifierFilterFunction() |
Clears any assigned filter function to control which modifiers are included in the build process | MeshPartitionEditorComponent.h | |
void ExecuteTransformers
(
MeshPartition::UPreviewMeshComponent* InPreviewMeshComponent, |
Only used when building a preview section. | MeshPartitionEditorComponent.h | |
const MeshPartition::FModifierGroup * FindGroupInRegistry
(
const FGuid& InGroupKey |
MeshPartitionEditorComponent.h | ||
void ForAllCurrentModifiers
(
TFunctionRef< bool(MeshPartition::UModifierComponent*)> InFunc |
Calls the provided function on all currently loaded MeshPartition::UModifierComponent belonging to the owner MegaMesh. | MeshPartitionEditorComponent.h | |
void ForAllPreviewSections
(
TFunctionRef< bool(MeshPartition::APreviewSection*)> InFunc |
Calls the provided function on all APreviewSections belonging to the owner MegaMesh. | MeshPartitionEditorComponent.h | |
void ForceRebuildAllSections
(
const EChangeType InChangeType |
Force rebuild the entire megamesh | MeshPartitionEditorComponent.h | |
UMaterialInterface * GetDefinitionMaterial() |
MeshPartitionEditorComponent.h | ||
UMaterialInterface * GetEditorOverrideMaterial() |
MeshPartitionEditorComponent.h | ||
UMeshPartitionDefinition * GetMegaMeshDefinition() |
MeshPartitionEditorComponent.h | ||
uint32 GetModifierLayerIndex
(
const FName& InModifierLayer |
Returns the effective layer stack ordering index for a modifier's layer name, depending on if a definition is available or not. | MeshPartitionEditorComponent.h | |
void GetModifiersAffectingBounds
(
TArray< MeshPartition::UModifierComponent* >& OutModifiers, |
Retrieves all currently loaded modifiers which affect the passed bounding boxes, taking into account chained modifications. | MeshPartitionEditorComponent.h | |
void GetModifiersAffectingModifiers
(
TArray< MeshPartition::UModifierComponent* >& OutModifiers, |
Retrieves all currently loaded modifiers which affect the passed modifiers, taking into account chained modifications. | MeshPartitionEditorComponent.h | |
TArray< MeshPartition::UModifierComponent * > GetModifiersFiltered
(
TFunctionRef< bool(const MeshPartition::UModifierComponent*)> InFilter |
Returns a list of all MegaMeshModifiers that affect this MegaMesh and all match the passed filter. | MeshPartitionEditorComponent.h | |
void GetModifiersToProcessForPreviews
(
TSet< MeshPartition::UModifierComponent* >& OutModifiers, |
Retrieves all currently loaded modifiers to process, intersecting the provided bounds or belonging to the provided preview sections. | MeshPartitionEditorComponent.h | |
void GetModifiersWithinBounds
(
TArray< MeshPartition::UModifierComponent* >& OutModifiers, |
Retrieves all currently loaded modifiers which intersect with the passed bounding boxes. | MeshPartitionEditorComponent.h | |
const MeshPartition::FCommonBuildVariant & GetPreviewBuildVariant() |
MeshPartitionEditorComponent.h | ||
void InvalidateConflictingPreviewSectionBuildContexts
(
TSet< MeshPartition::UModifierComponent* >& InOutModifiers, |
Iterates through current preview section async builds. | MeshPartitionEditorComponent.h | |
bool IsAnyPreviewSectionBuildActive() |
Check if any of the preview section builds are running. | MeshPartitionEditorComponent.h | |
bool IsModifierParticipatingInActivePreviewSectionBuild
(
const MeshPartition::UModifierComponent* InModifier |
Search all active preview section builds and check if a given modifier is participating in one or more builds. | MeshPartitionEditorComponent.h | |
bool IsPreviewSectionBuildEnabled() |
MeshPartitionEditorComponent.h | ||
bool IsSynchronousPreviewSectionBuildForced() |
MeshPartitionEditorComponent.h | ||
TUniquePtr< MeshPartition::FTransformerContext > LaunchTransformers
(
TArray< MeshPartition::FTransformerUnit >&& InTransformerUnits, |
Launches transformers associated with this build variant, seeding the pipeline with the provided initial units. | MeshPartitionEditorComponent.h | |
void OnBoundsChanged
(
TConstArrayView< FBox > InBounds, |
MeshPartitionEditorComponent.h | ||
void OnModifierAssigned() |
Called when a MeshPartition::UModifierComponent is assigned or unassigned to this MegaMesh. | MeshPartitionEditorComponent.h | |
void OnModifierChanged
(
MeshPartition::UModifierComponent* InChangedModifier, |
Called when a modifier contributing to the MegaMesh changed. | MeshPartitionEditorComponent.h | |
void OnModifierLoaded
(
MeshPartition::UModifierComponent* InModifier |
Called when a MeshPartition::UModifierComponent has been loaded via WorldPartition. | MeshPartitionEditorComponent.h | |
void OnModifierUnloaded
(
MeshPartition::UModifierComponent* InModifier |
Called when a MeshPartition::UModifierComponent has been unloaded via WorldPartition. | MeshPartitionEditorComponent.h | |
void PostBuildSectionMesh
(
AActor* InSection, |
Called after a MeshPartition::APreviewSection or MeshPartition::ACompiledSectionFMeshData has been built. | MeshPartitionEditorComponent.h | |
void PostProcessSection
(
AActor* InSection, |
Called after a MeshPartition::APreviewSection or MeshPartition::ACompiledSection has been built and their associate mesh finalized. | MeshPartitionEditorComponent.h | |
TArray< MeshPartition::ACompiledSection * > PrepareCompiledSections
(
const MeshPartition::FCompiledSectionBuildInfo& InBuildInfo, |
Spawns one or more ACompiledSection actors for a modifier group. | MeshPartitionEditorComponent.h | |
void ResetGroupRegistry
(
TConstArrayView< const MeshPartition::FModifierGroup > InModifierGroups |
Re-initializes the group registry with the provided modifier groups. | MeshPartitionEditorComponent.h | |
void ResetGroupRegistry () |
MeshPartitionEditorComponent.h | ||
void SetBaseModifiersHidden
(
bool bInHideBaseModifiers |
MeshPartitionEditorComponent.h | ||
void SetBuildModifierFilterFunction
(
FModifierFilterFunc InFunc |
Assigns a filter function to control which modifiers are included in the build process | MeshPartitionEditorComponent.h | |
void SetForceSynchronousPreviewSectionBuild
(
const bool bInForced |
MeshPartitionEditorComponent.h | ||
void SetPauseTransformerPipeline
(
const bool bInShouldPauseTransformerPipeline |
Pauses/Unpauses PreviewSections' transformers execution depending on the provided argument. | MeshPartitionEditorComponent.h | |
void SetPreviewSectionBuildEnabled
(
const bool bInEnabled |
Enables/Disables preview section building. | MeshPartitionEditorComponent.h | |
void SetPreviewSectionsVisibility
(
const bool bInArePreviewSectionsVisible |
MeshPartitionEditorComponent.h | ||
void SetToolTargetVisibility
(
const TArray< MeshPartition::APreviewSection* > InPreviewSections, |
Called when preview sections are targeted by tools. | MeshPartitionEditorComponent.h | |
bool ShouldHideBaseModifiers() |
MeshPartitionEditorComponent.h | ||
bool ShouldRecomputeTangents() |
Will return true if preview section transformer pipeline is paused and the recompute tangents feature is enabled. | MeshPartitionEditorComponent.h | |
AActor * SpawnBaseModifier
(
FDynamicMesh3&& InMesh, |
Spawns a Base Modifier using the provided mesh and transform. | MeshPartitionEditorComponent.h | |
ActorType * SpawnTransientActor
(
const FTransform& InActorTransform |
Spawns a transient preview actor of the specified type into the persistent level of this component's world. | MeshPartitionEditorComponent.h | |
AActor * SpawnTransientActor
(
TSubclassOf< AActor > InClass, |
Spawns a transient preview actor of the specified type into the persistent level of this component's world. | MeshPartitionEditorComponent.h | |
void Update() |
Updates the UMeshPartitionEditorComponent flushing pending async tasks and rebuilding pending modifications if needed. | MeshPartitionEditorComponent.h | |
void UpdateMaterial() |
Updates the currently used material resources (section material instance and channel textures). | MeshPartitionEditorComponent.h | |
void UpdateModifierList() |
Recreates list of relevant modifiers by looking through all the loaded modifiers. | MeshPartitionEditorComponent.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CheckForErrors() |
MeshPartitionEditorComponent.h | ||
virtual void OnUnregister() |
Begin ActorComponent Implementation. | MeshPartitionEditorComponent.h |
Overridden from UMeshPartitionComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnDefinitionChanged
(
UMeshPartitionDefinition* InNewDefinition |
Callback called when the owner's currently used UMeshPartitionDefinition changed. | MeshPartitionEditorComponent.h | |
virtual void PostRegisterMegaMeshComponents() |
Begin UMeshPartitionComponent Implementation. | MeshPartitionEditorComponent.h | |
virtual void PostUnregisterMegaMeshComponents() |
MeshPartitionEditorComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DestroyPreviewSections
(
TArray< TObjectPtr< MeshPartition::APreviewSection > >& InSectionsToDestroy |
Destroys the provided preview sections. Nullifying any links. | MeshPartitionEditorComponent.h | |
TArray< FBox > GetIntersectingPreviewSections
(
TConstArrayView< FBox > InBounds, |
Gets the PreviewSection intersecting the provided bounds in the provided array. | MeshPartitionEditorComponent.h | |
bool IsInteractiveModeEnabled() |
MeshPartitionEditorComponent.h | ||
bool IsInteractiveModeReady() |
MeshPartitionEditorComponent.h | ||
| Callback called when properties are modified in the owner's currently used UMeshPartitionDefinition. | MeshPartitionEditorComponent.h | ||
void OnLevelActorDeleted
(
AActor* Actor |
Called during actor deletion, giving us a chance to uninitialize modifiers | MeshPartitionEditorComponent.h | |
| Called after loading or unloading actors in the current level. | MeshPartitionEditorComponent.h | ||
void OnLoadedActorRemovedFromLevel
(
AActor& |
MeshPartitionEditorComponent.h | ||
void OnPreviewSectionSimplificationEnabledChanged
(
IConsoleVariable* InConsoleVariable |
Will invalidate any simplified preview section if the simplification is disabled. | MeshPartitionEditorComponent.h | |
void OnSelectionChanged
(
UObject* InObject |
Called when selection changed in the editor. | MeshPartitionEditorComponent.h | |
void QueuePendingModifierChange
(
MeshPartition::UModifierComponent* InChangedModifier, |
Adds the modifier change information to a pending queue of modifier changes to be bulk processed together usually on the next tick. | MeshPartitionEditorComponent.h | |
void ResetInteractiveSection() |
Resets the state of the interactive preview section and all preview sections intersecting it. | MeshPartitionEditorComponent.h | |
void SetInteractiveModifiers
(
const TArray< MeshPartition::UModifierComponent* >& InModifiers |
Setup interactive section, preview sections and the provided modifiers to be able to enter interactive mode. | MeshPartitionEditorComponent.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void UpdateLinks
(
const MeshPartition::FModifierGroup& InModifierGroup, |
Updates the relationship links between bases and preview sections. | MeshPartitionEditorComponent.h |