Navigation
API > API/Plugins > API/Plugins/MeshPartitionEditor > API/Plugins/MeshPartitionEditor/UMeshProjectModifier
Description
Gather Dependencies for this modifier, including asset and class dependencies and other relevant data (for example local settings) that affect the modifier apply behavior.
The dependencies are used to detect changes to the modifier that would require rebuilding sections that use this modifier. Both incremental build of compiled sections, as well as the in-editor build of preview sections track the declared dependencies.
PackageHash incremental build is a method to detect changes by that does not require loading the Modifiers into memory, so is much faster than a ModifierHash check, and is usually the best method to use for incremental iterative local builds on large worlds.
PackageHash requires that all relevant assets and classes that affect the application of this modifier (in the current state) are declared in GatherDependencies(), so it can track whether the packages have changed on disk, or class implementations have changed.
You do not need to declare the modifier itself, it's parent actor, or the modifier's class as dependencies in GatherDependencies(). Those are automatically pulled in by the system. Any additional assets or classes used should be declared (especially assets stored in different packages).
Note that the class implementations are tracked by their MegaMeshClassVersion metadata, so any class that is modified in a way that affects modifier application behavior needs to change it's MegaMeshClassVersion metadata.
If a derived modifier class does NOT override this function, it should set its MegaMeshClassVersion to a non-positive number (N <= 0) to indicate that it wishes to use non-deterministic cache keys stateful cache keys that are simply randomized whenever the editor makes a change to the modifier.
When a derived modifier DOES override this function, it should set its MegaMeshClassVersion to a positive number (N > 0) to indicate that it is using a deterministic cache key, that can be recomputed at any time by calling this function.
Whenever a derived modifier changes the implementation of GatherDependencies(), OR changes the implementation of the Apply in a way that modifies its behavior, the MegaMeshClassVersion should also be changed.
Virtual Inheritance
- UModifierComponent::GatherDependencies → UMeshBasedModifierBase::GatherDependencies → UMeshProjectModifier::GatherDependencies
| Name | GatherDependencies |
| Type | function |
| Header File | /Engine/Plugins/Experimental/MeshPartition/Source/MeshPartitionEditor/Public/Modifiers/MeshPartitionMeshProjectModifier.h |
| Include Path | #include "Modifiers/MeshPartitionMeshProjectModifier.h" |
| Source | /Engine/Plugins/Experimental/MeshPartition/Source/MeshPartitionEditor/Private/Modifiers/MeshPartitionMeshProjectModifier.cpp |
virtual void GatherDependencies
(
MeshPartition::IDependencyInterface & Dependencies
) const
Parameters
| Name | Remarks |
|---|---|
| Dependencies | The dependency context used to report dependencies. |