FMassSmartObjectHandler

Mediator struct that encapsulates communication between SmartObjectSubsystem and Mass.

Choose your operating system:

Windows

macOS

Linux

References

Module

MassSmartObjects

Header

/Engine/Plugins/Runtime/MassGameplay/Source/MassSmartObjects/Public/MassSmartObjectHandler.h

Include

#include "MassSmartObjectHandler.h"

Syntax

struct FMassSmartObjectHandler

Remarks

Mediator struct that encapsulates communication between SmartObjectSubsystem and Mass. This object is meant to be created and used in method scope to guarantee subsystems validity.

Constructors

Name Description

Public function

FMassSmartObjectHandler

(
    UMassEntitySubsystem& InEntitySubs...,
    FMassExecutionContext& InExecution...,
    USmartObjectSubsystem& InSmartObje...
)

FMassSmartObjectHandler constructor

Functions

Name Description

Public function Const

EMassSmartOb...

 

ClaimCandidate

(
    const FMassEntityHandle Entity,
    FMassSmartObjectUserFragment& User,
    const FMassSmartObjectRequestID& R...
)

Claims the first available smart object from the results of the find request.

Public function Const

EMassSmartOb...

 

ClaimCandidate

(
    const FMassEntityHandle Entity,
    FMassSmartObjectUserFragment& User,
    const FMassSmartObjectRequestResult...
)

Claims the first available smart object from the provided results.

Public function Const

bool

 

ClaimSmartObject

(
    const FMassEntityHandle Entity,
    FMassSmartObjectUserFragment& User,
    const FSmartObjectID& ObjectID
)

Claims the first available slot holding any type of USmartObjectMassBehaviorDefinition in the smart object associated to the provided identifier.

Public function Const

FMassSmartOb...

 

FindCandidatesAsync

(
    const FMassEntityHandle RequestingE...,
    const FVector& Location
)

Creates an async request to build a list of compatible smart objects around the provided location.

Public function Const

FMassSmartOb...

 

FindCandidatesAsync

(
    const FMassEntityHandle RequestingE...,
    const FZoneGraphCompactLaneLocation...
)

Creates an async request to build a list of compatible smart objects around the provided lane location.

Public function Const

FMassSmartOb...

 

GetRequestResult

(
    const FMassSmartObjectRequestID& R...
)

Provides the result of a previously created request from FindCandidatesAsync to indicate if it has been processed and the results can be used by ClaimCandidate.

Public function Const

void

 

ReleaseSmartObject

(
    const FMassEntityHandle Entity,
    FMassSmartObjectUserFragment& User,
    const EMassSmartObjectInteractionSt...
)

Releases a claimed/in-use smart object and update user fragment.

Public function Const

void

 

RemoveRequest

(
    const FMassSmartObjectRequestID& R...
)

Deletes the request associated to the specified identifier

Public function Const

bool

 

UseSmartObject

(
    const FMassEntityHandle Entity,
    FMassSmartObjectUserFragment& User,
    const FDataFragment_Transform& Tra...
)

Activates the mass gameplay behavior associated to the previously claimed smart object.