UEditorStaticMeshLibrary::SetLodFromStaticMesh

Adds or create a LOD at DestinationLodIndex using the geometry from SourceStaticMesh SourceLodIndex

Windows
MacOS
Linux

References

Module

EditorScriptingUtilities

Header

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorStaticMeshLibrary.h

Include

#include "EditorStaticMeshLibrary.h"

Source

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Private/EditorStaticMeshLibrary.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="Editor Scripting | StaticMesh")
static int32 SetLodFromStaticMesh
(
    UStaticMesh * DestinationStaticMesh,
    int32 DestinationLodIndex,
    UStaticMesh * SourceStaticMesh,
    int32 SourceLodIndex,
    bool bReuseExistingMaterialSlots
)

Remarks

Adds or create a LOD at DestinationLodIndex using the geometry from SourceStaticMesh SourceLodIndex

Returns

The index of the LOD that was set. It can be different than DestinationLodIndex if it wasn't a valid index. A negative value indicates that the LOD was not set. See log for explanation.

Parameters

Parameter

Description

DestinationStaticMesh

The static mesh to set the LOD in.

DestinationLodIndex

The index of the LOD to set.

SourceStaticMesh

The static mesh to get the LOD from.

SourceLodIndex

The index of the LOD to get.

bReuseExistingMaterialSlots

If true, sections from SourceStaticMesh will be remapped to match the material slots of DestinationStaticMesh when they have the same material assigned. If false, all material slots of SourceStaticMesh will be appended in DestinationStaticMesh.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss