Unravel Engine C# Reference
Loading...
Searching...
No Matches
NewComponentTemplate Class Reference
Inheritance diagram for NewComponentTemplate:
Unravel.Core.ScriptComponent Unravel.Core.Component Unravel.Core.NativeObject

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.
 
- Public Member Functions inherited from Unravel.Core.ScriptComponent
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.
 
- Public Member Functions inherited from Unravel.Core.Component
override bool IsValid ()
 Determines whether this component is valid.
 
- Public Member Functions inherited from Unravel.Core.NativeObject
bool IsValid ()
 
bool Equals (NativeObject other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Unravel.Core.NativeObject
static bool operator== (NativeObject left, NativeObject right)
 
static bool operator!= (NativeObject left, NativeObject right)
 
- Protected Member Functions inherited from Unravel.Core.ScriptComponent
 ScriptComponent ([CallerFilePath] string file="")
 
- Properties inherited from Unravel.Core.ScriptComponent
string SourceFilePath [get, set]
 
- Properties inherited from Unravel.Core.Component
Entity owner [get, set]
 Gets the entity that owns this component.
 
TransformComponent transform [get]
 Gets the TransformComponent associated with this component's owner.
 

Detailed Description

Definition at line 6 of file TemplateComponent.cs.

Member Function Documentation

◆ OnCreate()

override void NewComponentTemplate.OnCreate ( )
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.

◆ OnDisable()

override void NewComponentTemplate.OnDisable ( )
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.

◆ OnEnable()

override void NewComponentTemplate.OnEnable ( )
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.

◆ OnStart()

override void NewComponentTemplate.OnStart ( )
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.

◆ OnUpdate()

override void NewComponentTemplate.OnUpdate ( )
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.


The documentation for this class was generated from the following file: