Struct ScriptingType
The scripting type metadata for the native scripting. Used to cache the script class information and instantiate a object of its type.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Scripting/ScriptingType.h
Syntax
public struct ScriptingType
Constructors
~ScriptingType()
Declaration
public ~ScriptingType()
ScriptingType()
Declaration
public ScriptingType()
ScriptingType(const ScriptingType& other)
ScriptingType(const StringAnsiView& fullname, BinaryModule* module, InitRuntimeHandler initRuntime, SetupScriptVTableHandler setupScriptVTable, SetupScriptObjectVTableHandler setupScriptObjectVTable, GetInterfaceWrapper getInterfaceWrapper)
Declaration
public ScriptingType(const StringAnsiView& fullname, BinaryModule* module, InitRuntimeHandler initRuntime, SetupScriptVTableHandler setupScriptVTable, SetupScriptObjectVTableHandler setupScriptObjectVTable, GetInterfaceWrapper getInterfaceWrapper)
Parameters
|
StringAnsiView
fullname
|
|
BinaryModule
module
|
|
InitRuntimeHandler
initRuntime
|
|
SetupScriptVTableHandler
setupScriptVTable
|
|
SetupScriptObjectVTableHandler
setupScriptObjectVTable
|
|
GetInterfaceWrapper
getInterfaceWrapper
|
ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, EnumItem* items)
Declaration
public ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, EnumItem* items)
Parameters
|
StringAnsiView
fullname
|
|
BinaryModule
module
|
|
int32
size
|
|
EnumItem
items
|
ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, InitRuntimeHandler initRuntime, Ctor ctor, Dtor dtor, Copy copy, Box box, Unbox unbox, GetField getField, SetField setField, ScriptingTypeInitializer* baseType, const InterfaceImplementation* interfaces=nullptr)
Declaration
public ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, InitRuntimeHandler initRuntime, Ctor ctor, Dtor dtor, Copy copy, Box box, Unbox unbox, GetField getField, SetField setField, ScriptingTypeInitializer* baseType, const InterfaceImplementation* interfaces=nullptr)
Parameters
|
StringAnsiView
fullname
|
|
BinaryModule
module
|
|
int32
size
|
|
InitRuntimeHandler
initRuntime
|
|
Ctor
ctor
|
|
Dtor
dtor
|
|
Copy
copy
|
|
Box
box
|
|
Unbox
unbox
|
|
GetField
getField
|
|
SetField
setField
|
|
ScriptingTypeInitializer
baseType
|
|
InterfaceImplementation
interfaces
|
ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, InitRuntimeHandler initRuntime, Ctor ctor, Dtor dtor, ScriptingTypeInitializer* baseType, const InterfaceImplementation* interfaces=nullptr)
Declaration
public ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, InitRuntimeHandler initRuntime, Ctor ctor, Dtor dtor, ScriptingTypeInitializer* baseType, const InterfaceImplementation* interfaces=nullptr)
Parameters
|
StringAnsiView
fullname
|
|
BinaryModule
module
|
|
int32
size
|
|
InitRuntimeHandler
initRuntime
|
|
Ctor
ctor
|
|
Dtor
dtor
|
|
ScriptingTypeInitializer
baseType
|
|
InterfaceImplementation
interfaces
|
ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, InitRuntimeHandler initRuntime, SpawnHandler spawn, const ScriptingTypeHandle& baseType, SetupScriptVTableHandler setupScriptVTable=nullptr, SetupScriptObjectVTableHandler setupScriptObjectVTable=nullptr, const InterfaceImplementation* interfaces=nullptr)
Declaration
public ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, InitRuntimeHandler initRuntime, SpawnHandler spawn, const ScriptingTypeHandle& baseType, SetupScriptVTableHandler setupScriptVTable=nullptr, SetupScriptObjectVTableHandler setupScriptObjectVTable=nullptr, const InterfaceImplementation* interfaces=nullptr)
Parameters
|
StringAnsiView
fullname
|
|
BinaryModule
module
|
|
int32
size
|
|
InitRuntimeHandler
initRuntime
|
|
SpawnHandler
spawn
|
|
ScriptingTypeHandle
baseType
|
|
SetupScriptVTableHandler
setupScriptVTable
|
|
SetupScriptObjectVTableHandler
setupScriptObjectVTable
|
|
InterfaceImplementation
interfaces
|
ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, InitRuntimeHandler initRuntime=DefaultInitRuntime, SpawnHandler spawn=DefaultSpawn, ScriptingTypeInitializer* baseType=nullptr, SetupScriptVTableHandler setupScriptVTable=nullptr, SetupScriptObjectVTableHandler setupScriptObjectVTable=nullptr, const InterfaceImplementation* interfaces=nullptr)
Declaration
public ScriptingType(const StringAnsiView& fullname, BinaryModule* module, int32 size, InitRuntimeHandler initRuntime=DefaultInitRuntime, SpawnHandler spawn=DefaultSpawn, ScriptingTypeInitializer* baseType=nullptr, SetupScriptVTableHandler setupScriptVTable=nullptr, SetupScriptObjectVTableHandler setupScriptObjectVTable=nullptr, const InterfaceImplementation* interfaces=nullptr)
Parameters
|
StringAnsiView
fullname
|
|
BinaryModule
module
|
|
int32
size
|
|
InitRuntimeHandler
initRuntime
|
|
SpawnHandler
spawn
|
|
ScriptingTypeInitializer
baseType
|
|
SetupScriptVTableHandler
setupScriptVTable
|
|
SetupScriptObjectVTableHandler
setupScriptObjectVTable
|
|
InterfaceImplementation
interfaces
|
ScriptingType(ScriptingType&& other)
Fields
BaseTypeHandle
The type base class (can be invalid).
Declaration
public ScriptingTypeHandle BaseTypeHandle
Field Value
|
ScriptingTypeHandle
|
BaseTypePtr
The type base class (pointer to initializer).
Declaration
public ScriptingTypeInitializer* BaseTypePtr
Field Value
|
ScriptingTypeInitializer
|
Box
Declaration
public Box Box
Field Value
|
Box
|
Class
Declaration
public struct ScriptingType::@227::@232 Class
Field Value
|
struct ScriptingType::@227::@232
|
Copy
Declaration
public Copy Copy
Field Value
|
Copy
|
Ctor
Declaration
public Ctor Ctor
Field Value
|
Ctor
|
DefaultInstance
The default instance of the scripting type. Used by serialization system for comparison to save only modified properties of the object.
Declaration
public ScriptingObject* DefaultInstance
Field Value
|
ScriptingObject
|
Dtor
Declaration
public Dtor Dtor
Field Value
|
Dtor
|
Enum
Declaration
public struct ScriptingType::@227::@231 Enum
Field Value
|
struct ScriptingType::@227::@231
|
Fullname
The full typename of this class (namespace and class name itself including nested classes prefix).
Declaration
public StringAnsiView Fullname
Field Value
|
StringAnsiView
|
GetField
Declaration
public GetField GetField
Field Value
|
GetField
|
GetInterfaceWrapper
Declaration
public GetInterfaceWrapper GetInterfaceWrapper
Field Value
|
GetInterfaceWrapper
|
InitRuntime
The runtime data initialization handler (cannot be null).
Declaration
public InitRuntimeHandler InitRuntime
Field Value
|
InitRuntimeHandler
|
Interface
Declaration
public struct ScriptingType::@227::@233 Interface
Field Value
|
struct ScriptingType::@227::@233
|
Interfaces
The list of interfaces implemented by this type (null if unused, list ends with null entry).
Declaration
public InterfaceImplementation* Interfaces
Field Value
|
InterfaceImplementation
|
InterfacesOffsets
List of offsets from native methods VTable for each interface (with virtual methods). Null if not using interfaces with method overrides.
Declaration
public uint16* InterfacesOffsets
Field Value
|
uint16
|
Items
Declaration
public EnumItem* Items
Field Value
|
EnumItem
|
ManagedClass
The managed class (cached, can be null if missing).
Declaration
public MClass* ManagedClass
Field Value
|
MClass
|
Module
The binary module that contains this type (cannot be null).
Declaration
public BinaryModule* Module
Field Value
|
BinaryModule
|
Script
Declaration
public struct ScriptingType::@227::@229 Script
Field Value
|
struct ScriptingType::@227::@229
|
ScriptVTable
The script methods VTable used by the wrapper functions attached to native object vtable. Cached to improve C#/VisualScript invocation performance.
Declaration
public void** ScriptVTable
Field Value
|
void
|
ScriptVTableBase
The native methods VTable that matches ScriptVTable but contains pointers to the base class methods C++ instead (native methods or wrappers). Has the same size as ScriptVTable.
Declaration
public void** ScriptVTableBase
Field Value
|
void
|
SetField
Declaration
public SetField SetField
Field Value
|
SetField
|
SetupScriptObjectVTable
The native vtable initialization handler (can be null).
Declaration
public SetupScriptObjectVTableHandler SetupScriptObjectVTable
Field Value
|
SetupScriptObjectVTableHandler
|
SetupScriptVTable
The script vtable initialization handler (can be null).
Declaration
public SetupScriptVTableHandler SetupScriptVTable
Field Value
|
SetupScriptVTableHandler
|
Size
The native size of the type value (in bytes).
Declaration
public int32 Size
Field Value
|
int32
|
Spawn
The object instance spawning handler (cannot be null).
Declaration
public SpawnHandler Spawn
Field Value
|
SpawnHandler
|
Struct
Declaration
public struct ScriptingType::@227::@230 Struct
Field Value
|
struct ScriptingType::@227::@230
|
Type
Unbox
Declaration
public Unbox Unbox
Field Value
|
Unbox
|
VTable
The native methods VTable. Used only by types that override the default vtable (eg. C# scripts).
Declaration
public void** VTable
Field Value
|
void
|
Methods
DefaultInitRuntime()
Declaration
public static void DefaultInitRuntime()
DefaultSpawn(const ScriptingObjectSpawnParams& params)
Declaration
public static ScriptingObject* DefaultSpawn(const ScriptingObjectSpawnParams& params)
Parameters
|
ScriptingObjectSpawnParams
params
|
Returns
|
ScriptingObject
|
GetBaseType()
Gets the handle to the base type of this type.
Declaration
public ScriptingTypeHandle GetBaseType() const
Returns
|
ScriptingTypeHandle
|
GetDefaultInstance()
Gets the default instance of the scripting type. Used by serialization system for comparison to save only modified properties of the object.
Declaration
public ScriptingObject* GetDefaultInstance() const
Returns
|
ScriptingObject
|
GetHandle()
Gets the handle to this type.
Declaration
public ScriptingTypeHandle GetHandle() const
Returns
|
ScriptingTypeHandle
|
GetInterface(const ScriptingTypeHandle& interfaceType)
Gets the pointer to the implementation of the given interface type for this scripting type (including base types). Returns null if given interface is not implemented.
Declaration
public InterfaceImplementation* GetInterface(const ScriptingTypeHandle& interfaceType) const
Parameters
|
ScriptingTypeHandle
interfaceType
|
Returns
|
InterfaceImplementation
|
GetName()
HackObjectVTable(void* object, ScriptingTypeHandle baseTypeHandle, int32 wrapperIndex)
Declaration
public void HackObjectVTable(void* object, ScriptingTypeHandle baseTypeHandle, int32 wrapperIndex)
Parameters
|
void
object
|
|
ScriptingTypeHandle
baseTypeHandle
|
|
int32
wrapperIndex
|
operator=(const ScriptingType& other)
Declaration
public ScriptingType operator=(const ScriptingType& other)=delete
Parameters
|
ScriptingType
other
|
Returns
|
ScriptingType
|
operator=(ScriptingType&& other)
Declaration
public ScriptingType operator=(ScriptingType&& other)=delete
Parameters
|
ScriptingType
other
|
Returns
|
ScriptingType
|
SetupScriptObjectVTable(void* object, ScriptingTypeHandle baseTypeHandle, int32 wrapperIndex)
Declaration
public void SetupScriptObjectVTable(void* object, ScriptingTypeHandle baseTypeHandle, int32 wrapperIndex)
Parameters
|
void
object
|
|
ScriptingTypeHandle
baseTypeHandle
|
|
int32
wrapperIndex
|
SetupScriptVTable(ScriptingTypeHandle baseTypeHandle)
Declaration
public void SetupScriptVTable(ScriptingTypeHandle baseTypeHandle)
Parameters
|
ScriptingTypeHandle
baseTypeHandle
|