class
ManagedComponent
Public
Methods
~ManagedComponent
GetManagedInstance
Returns managed component object instance.
GetRuntimeType
Returns managed type of the component.
GetManagedNamespace
Returns namespace of the managed component.
GetManagedTypeName
Returns type name of the managed component.
GetManagedFullTypeName
Returns namespace and type name of the component in format "namespace.typename".
Backup
Serializes the internal managed component.
- clearExisting
- Should the managed component handle be released. (Will trigger a finalizer if this is the last reference to it)
Returns: An object containing the serialized component. You can provide this to restore() method to re-create the original component.
Restore
Restores a component from previously serialized data.
- data
- Serialized managed component data that will be used for initializing the new managed instance.
TriggerOnReset
Triggers the managed OnReset callback.
Update
Called once per frame.
Only called if the component is in Running state.
TypeEquals
Checks if this and the provided component represent the same type.
CalculateBounds
Calculates bounds of the visible contents represented by this component (for example a mesh for Renderable).
- bounds
- Bounds of the contents in world space coordinates.
Returns: True if the component has bounds with non-zero volume, otherwise false.
staticGetRttiStatic
Protected
Constructors
ManagedComponent
ManagedComponent
Methods
Initialize
Construct any resources the component needs before use.
Called when the parent scene object is initialized. A non-initialized component shouldn't be used in a live scene (i.e. it should not receive any of the component logic updates or events).
OnCreated
Called once when the component has been created.
Called regardless of the state the component is in.
OnBeginPlay
Called once when the component first leaves the Stopped state.
This includes component creation if requirements for leaving Stopped state are met, in which case it is called after OnCreated. Note this is called even if the component is in disabled state.
OnDestroyed
Called once just before the component is destroyed.
Called regardless of the state the component is in.
OnEnabled
Called every time a component leaves the Stopped state, if the component is enabled.
This includes component creation if requirements for leaving the Stopped state are met. When called during creation it is called after OnBeginPlay.
OnDisabled
Called every time a component is placed into the Stopped state.
This includes component destruction if component wasn't already in Stopped state during destruction. When called during destruction it is called before OnDestroyed.
OnTransformChanged
Called when the component's parent scene object has changed.
Not called if the component is in Stopped state. Also only called if necessary notify flags are set via SetNotifyFlagsInternal().
Private
Methods
SetupScriptBindings
Sets up script bindings between native and managed class.
Must be called after creating the script object wrapper, or after assembly is reloaded.
CreateScriptObject
Creates the script object of the correct type.
- outObjectInformation
- Information about the component type. Can be null in case the type does no longer exist.
Returns: Creates script object of the correct component type, or if type cannot be found, script object of missing type.