UEditorStaticMeshLibrary::AddSimpleCollisionsWithNotification

Add simple collisions to a static mesh.

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 AddSimpleCollisionsWithNotification
(
    UStaticMesh * StaticMesh,
    const EScriptingCollisionShapeType ShapeType,
    bool bApplyChanges
)

Remarks

Add simple collisions to a static mesh. This method replicates what is done when invoking menu entries "Collision > Add [...] Simplified Collision" in the Mesh Editor.

Returns

An integer indicating the index of the collision newly created. A negative value indicates the addition failed.

Parameters

Parameter

Description

StaticMesh

Mesh to generate simple collision for.

ShapeType

Options on which simple collision to add to the mesh.

bApplyChanges

Indicates if changes must be apply or not.

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