UContextObjectStore

A context object store allows tools to get access to arbitrary objects which expose data or APIs to enable additional functionality.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UContextObjectStore

References

Module

InteractiveToolsFramework

Header

/Engine/Source/Runtime/InteractiveToolsFramework/Public/ContextObjectStore.h

Include

#include "ContextObjectStore.h"

Syntax

class UContextObjectStore : public UObject

Remarks

A context object store allows tools to get access to arbitrary objects which expose data or APIs to enable additional functionality. Some example use cases of context objects:

  • A tool builder may disallow a particular tool if a needed API object is not present in the context store.

  • A tool may allow extra actions if it has access to a particular API object in the context store.

  • A tool may choose to initialize itself differently based on the presence of a selection-holding data object in the context store.

Variables

Name Description

Protected variable

TArray< TObject...

 

ContextObjects

Functions

Name Description

Public function

bool

 

AddContextObject

(
    UObject* InContextObject
)

Adds a data object to the tool manager's set of shared data objects.

Public function Const

TObjectType ...

 

FindContext()

Finds the first the context object of the given type. Can return a subclass of the given type.

Public function Const

UObject *...

 

FindContextByClass

(
    UClass* InClass
)

Finds the first context object that derives from the given class.

Public function

bool

 

RemoveContextObject

(
    UObject* InContextObject
)

Removes a data object from the tool manager's set of shared data objects.

Public function

bool

 

RemoveContextObjectsOfType()

Public function

bool

 

RemoveContextObjectsOfType

(
    const UClass* InClass
)

Removes any data objects from the tool manager's set of shared data objects that are of type

Public function

void

 

Shutdown()

Shuts down the context object store, releasing hold on any stored content objects.