Navigation
API > API/Runtime > API/Runtime/CoreUObject
Templated version of FScriptInterface, which provides accessors and operators for referencing the interface portion of an object implementing an interface. This type is only useful with native interfaces, UClass::ImplementsInterface should be used to check for blueprint interfaces.
| Name | TScriptInterface |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/ScriptInterface.h |
| Include Path | #include "UObject/ScriptInterface.h" |
Syntax
template<typename InInterfaceType>
class TScriptInterface : public FScriptInterface
Inheritance Hierarchy
- FScriptInterface → TScriptInterface
- TScriptInterface
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TScriptInterface
(
TObjectPtr< ObjectType > SourceObject |
Assignment from an object type that may natively implement InterfaceType | UObject/ScriptInterface.h | |
| Default constructor | UObject/ScriptInterface.h | ||
TScriptInterface
(
TYPE_OF_NULLPTR |
Construction from nullptr | UObject/ScriptInterface.h | |
TScriptInterface
(
U&& Source |
Construction from an object type that may natively implement InterfaceType | UObject/ScriptInterface.h | |
TScriptInterface
(
const TScriptInterface< OtherInterfaceType >& Other |
Construction from another script interface of a compatible interface type | UObject/ScriptInterface.h | |
TScriptInterface
(
const TScriptInterface& |
Copyable | UObject/ScriptInterface.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| InterfaceType | InInterfaceType | UObject/ScriptInterface.h | |
| UObjectType | TCopyQualifiersFromTo_T< InterfaceType, UObject > | UObject/ScriptInterface.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
InInterfaceType * GetInterface() |
Returns the pointer to the interface | UObject/ScriptInterface.h | |
UObjectType * GetObject() |
Returns the ObjectPointer contained by this TScriptInterface | UObject/ScriptInterface.h | |
TObjectPtr< UObjectType > & GetObjectRef() |
Returns the ObjectPointer contained by this TScriptInterface | UObject/ScriptInterface.h | |
void SetInterface
(
InInterfaceType* InInterfacePointer |
Sets the value of the InterfacePointer for this TScriptInterface | UObject/ScriptInterface.h | |
void SetObject
(
UObjectType* InObjectPointer |
Sets the value of the ObjectPointer for this TScriptInterface | UObject/ScriptInterface.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Boolean operator, returns true if this object natively implements InterfaceType. | UObject/ScriptInterface.h | |
bool operator!=
(
const OtherInterface* Other |
UObject/ScriptInterface.h | ||
bool operator!=
(
const TScriptInterface& Other |
UObject/ScriptInterface.h | ||
bool operator!=
(
TYPE_OF_NULLPTR |
UObject/ScriptInterface.h | ||
InInterfaceType & operator*() |
Dereference operator. | UObject/ScriptInterface.h | |
TScriptInterface & operator=
(
TObjectPtr< ObjectType > SourceObject |
Assignment from an object type that may natively implement InterfaceType | UObject/ScriptInterface.h | |
TScriptInterface & operator=
(
const TScriptInterface< OtherInterfaceType >& Other |
Assignment from another script interface of a compatible interface type | UObject/ScriptInterface.h | |
TScriptInterface & operator=
(
U&& Source |
Assignment from an object type that may natively implement InterfaceType | UObject/ScriptInterface.h | |
TScriptInterface & operator=
(
TYPE_OF_NULLPTR |
Assignment from nullptr | UObject/ScriptInterface.h | |
TScriptInterface & operator=
(
const TScriptInterface& |
UObject/ScriptInterface.h | ||
bool operator==
(
const OtherInterface* Other |
Comparison operator, taking a pointer to InterfaceType | UObject/ScriptInterface.h | |
bool operator==
(
const TScriptInterface& Other |
Comparison operator, taking a reference to another TScriptInterface | UObject/ScriptInterface.h | |
bool operator==
(
TYPE_OF_NULLPTR |
Comparison operator, taking a nullptr | UObject/ScriptInterface.h | |
InInterfaceType * operator->() |
Member access operator. | UObject/ScriptInterface.h |