ISMInstanceManager::ForEachSMInstanceInSelectionGroup

Enumerate every static mesh instance element within the selection group that the given static mesh instance belongs to (including the given static mesh instance).

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

ISMInstanceManager::ForEachSMInstanceInSelectionGroup()

AISMPartitionActor::ForEachSMInstanceInSelectionGroup()

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/Elements/SMInstance/SMInstanceManager.h

Include

#include "Elements/SMInstance/SMInstanceManager.h"

Syntax

virtual void ForEachSMInstanceInSelectionGroup
(
    const FSMInstanceId & InstanceId,
    TFunctionRef< bool)> Callback
)

Remarks

Enumerate every static mesh instance element within the selection group that the given static mesh instance belongs to (including the given static mesh instance). A selection group allows disparate static mesh instances to be considered as a single logical unit for selection, and is mostly used when a manager creates multiple static mesh instances for a single managed instance.

If any static mesh instance within the group is selected, then all static mesh instances within the group are considered selected. This means that:

  • Querying the selection state for any static mesh element within the group will be consistent, regardless of which static mesh instance is in the selection set.

  • Attempting to select a static mesh instance within the group, when another static mesh instance from the group is already selected, will be a no-op.

  • Attempting to deselect a static mesh instance within the group will deselect all static mesh instances within the group.

There is no guarantee of which static mesh instance within the group will actually end up in the selection set, nor which static mesh instance within the group NotifySMInstanceSelectionChanged will be called for. It is the responsibility of the manager to handle this correctly by treating any static mesh instance within a selection group as one logical unit for all the static mesh instances within the group.