Class Component
- Namespace
- BasilEngine.Components
- Assembly
- BasilEngine.dll
[NativeHeader("Bindings/ManagedComponents.hpp")]
public class Component : NativeObject
- Inheritance
-
Component
- Derived
- Inherited Members
Constructors
Component()
Creates a component wrapper and registers the component type with the native engine.
protected Component()
Component(ulong)
Creates a component wrapper bound to an existing native object.
protected Component(ulong handle)
Parameters
handleulongNative object handle.
Fields
typeID
Identifies a component type in the native engine.
protected uint typeID
Field Value
Properties
Enabled
Indicates if the component is enabled and should execute in the engine.
public bool Enabled { get; set; }
Property Value
gameObject
The GameObject this component is attached to.
public GameObject gameObject { get; }
Property Value
tag
User-defined tag string.
public string tag { get; set; }
Property Value
transform
Cached transform for the owning game object.
public Transform transform { get; }
Property Value
Methods
DeleteComponent<T>()
public void DeleteComponent<T>() where T : Component, new()
Type Parameters
T
GetComponent<T>()
Retrieves a component of the specified type from the same game object.
public T GetComponent<T>() where T : Component, new()
Returns
- T
An instance of
Tif found; otherwise null.
Type Parameters
TComponent type to query.
Internal_DeleteComponent(ulong, uint)
[NativeMethod("DeleteComponent")]
[StaticAccessor("ManagedComponents", StaticAccessorType.DoubleColon)]
public static extern void Internal_DeleteComponent(ulong handle, uint typeHandle)
Parameters
Internal_GetScriptableComponent(ulong, string)
[NativeMethod("GetManagedComponent")]
[StaticAccessor("ManagedComponents", StaticAccessorType.DoubleColon)]
public static extern object Internal_GetScriptableComponent(ulong handle, string fullName)
Parameters
Returns
Internal_HasComponent(ulong, uint)
[NativeMethod("HasComponent")]
[StaticAccessor("ManagedComponents", StaticAccessorType.DoubleColon)]
public static extern bool Internal_HasComponent(ulong handle, uint typeHandle)
Parameters
Returns
Internal_RegisterComponent(string)
[NativeMethod("ManagedRegisterComponent")]
[StaticAccessor("ManagedComponents", StaticAccessorType.DoubleColon)]
public static extern uint Internal_RegisterComponent(string name)
Parameters
namestring