Unravel Engine C# Reference
|
Public Member Functions | |
override void | OnCreate () |
OnCreate is called when the script is first loaded, or when an object it is attached to is instantiated It only gets called once on each script, and only after other objects are initialised. This means that it is safe to create references to other game objects and components in OnCreate. | |
override void | OnStart () |
Start is called once, before any Update methods and after OnCreate. It works in much the same way as OnCreate, with a few key differences. Unlike OnCreate, Start will not be called if the script is disabled. | |
override void | OnEnable () |
Called when the script or entity is enabled. Override this method to initialize resources or data. | |
override void | OnDisable () |
Called when the script or entity is disabled. Override this method to clean up resources or data. | |
override void | OnUpdate () |
Called on every frame update. Override this method to implement frame-based logic. | |
![]() | |
virtual void | OnDestroy () |
Called when the script is destroyed. Override this method to clean up resources or data. | |
virtual void | OnSensorEnter (Entity e) |
Called when another entity enters a sensor attached to this entity. | |
virtual void | OnSensorExit (Entity e) |
Called when another entity exits a sensor attached to this entity. | |
virtual void | OnCollisionEnter (Collision collision) |
Called when this entity begins a collision with another entity. | |
virtual void | OnCollisionExit (Collision collision) |
Called when this entity ends a collision with another entity. | |
virtual void | OnFixedUpdate () |
A framerate-idependent interval update when physics calculations are performed. Override this method to implement frame-based logic. | |
virtual void | OnLateUpdate () |
Called on every frame update after other updates are finished. Override this method to implement frame-based logic. | |
![]() | |
override bool | IsValid () |
Determines whether this component is valid. | |
![]() | |
bool | IsValid () |
bool | Equals (NativeObject other) |
override bool | Equals (object obj) |
override int | GetHashCode () |
Additional Inherited Members | |
![]() | |
static bool | operator== (NativeObject left, NativeObject right) |
static bool | operator!= (NativeObject left, NativeObject right) |
![]() | |
ScriptComponent ([CallerFilePath] string file="") | |
![]() | |
string | SourceFilePath [get, set] |
![]() | |
Entity | owner [get, set] |
Gets the entity that owns this component. | |
TransformComponent | transform [get] |
Gets the TransformComponent associated with this component's owner. | |
Definition at line 6 of file TemplateComponent.cs.
|
virtual |
OnCreate is called when the script is first loaded, or when an object it is attached to is instantiated It only gets called once on each script, and only after other objects are initialised. This means that it is safe to create references to other game objects and components in OnCreate.
Reimplemented from Unravel.Core.ScriptComponent.
Definition at line 13 of file TemplateComponent.cs.
|
virtual |
Called when the script or entity is disabled. Override this method to clean up resources or data.
Reimplemented from Unravel.Core.ScriptComponent.
Definition at line 30 of file TemplateComponent.cs.
|
virtual |
Called when the script or entity is enabled. Override this method to initialize resources or data.
Reimplemented from Unravel.Core.ScriptComponent.
Definition at line 26 of file TemplateComponent.cs.
|
virtual |
Start is called once, before any Update methods and after OnCreate. It works in much the same way as OnCreate, with a few key differences. Unlike OnCreate, Start will not be called if the script is disabled.
Reimplemented from Unravel.Core.ScriptComponent.
Definition at line 22 of file TemplateComponent.cs.
|
virtual |
Called on every frame update. Override this method to implement frame-based logic.
Reimplemented from Unravel.Core.ScriptComponent.
Definition at line 34 of file TemplateComponent.cs.