RealDocs

AActor::GetHLODRelevantComponents

function Engine Since 4.14
#include "GameFramework/Actor.h"
Access: public Specifiers: virtual

Description

Returns the list of components from this actor that should contribute geometry to the actor's Hierarchical LOD proxy mesh during a HLOD build.

Caveats & Gotchas

  • Called only at HLOD build time (editor/commandlet), not at runtime. Returning components here does not affect any runtime behaviour — it only controls what the HLOD builder merges into the proxy asset.
  • The default implementation returns all visible static mesh and instanced static mesh components. If your actor holds custom renderable components, override this to include them; otherwise they will be silently excluded from the proxy.

Signature

ENGINE_API virtual TArray<UActorComponent*> GetHLODRelevantComponents() const;

Return Type

TArray<UActorComponent*>

Example

Include only the main body mesh in HLOD C++
TArray<UActorComponent*> AMyActor::GetHLODRelevantComponents() const
{
    TArray<UActorComponent*> Result;
    if (BodyMesh)
    {
        Result.Add(BodyMesh);
    }
    return Result;
}

Version History

Introduced in: 4.14

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.