|
Unravel Engine C# Reference
|
Public Member Functions | |
| override void | OnCreate () |
| Called when the script is created. Override this method to initialize resources or data. 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 () |
| Called when the script starts execution. Override this method to set up logic at the start. 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 | OnDestroy () |
| Called when the script is destroyed. 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 | OnEnable () |
| Called when the script or entity is enabled. Override this method to initialize resources or data. | |
| virtual void | OnDisable () |
| Called when the script or entity is disabled. 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 () |
Public Attributes | |
| float | minimumDistance = 5f |
| float | orbitSpeed = 30f |
| float | axisChangeSpeed = 0.5f |
| float | changeInterval = 2f |
| float | positionSmoothTime = 0.5f |
| Entity | targetEntity |
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) |
| static implicit | operator bool (NativeObject obj) |
| Implicit conversion to bool for null checking. Returns true if the object is valid. | |
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. | |
Definition at line 4 of file SampleOrbitComponent.cs.
|
virtual |
Called when the script is created. Override this method to initialize resources or data. 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 20 of file SampleOrbitComponent.cs.
|
virtual |
Called when the script is destroyed. Override this method to clean up resources or data.
Reimplemented from Unravel.Core.ScriptComponent.
Definition at line 35 of file SampleOrbitComponent.cs.
|
virtual |
Called when the script starts execution. Override this method to set up logic at the start. 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 25 of file SampleOrbitComponent.cs.
|
virtual |
Called on every frame update. Override this method to implement frame-based logic.
Reimplemented from Unravel.Core.ScriptComponent.
Definition at line 39 of file SampleOrbitComponent.cs.
| float SampleOrbitComponent.axisChangeSpeed = 0.5f |
Definition at line 8 of file SampleOrbitComponent.cs.
| float SampleOrbitComponent.changeInterval = 2f |
Definition at line 9 of file SampleOrbitComponent.cs.
| float SampleOrbitComponent.minimumDistance = 5f |
Definition at line 6 of file SampleOrbitComponent.cs.
| float SampleOrbitComponent.orbitSpeed = 30f |
Definition at line 7 of file SampleOrbitComponent.cs.
| float SampleOrbitComponent.positionSmoothTime = 0.5f |
Definition at line 10 of file SampleOrbitComponent.cs.
| Entity SampleOrbitComponent.targetEntity |
Definition at line 12 of file SampleOrbitComponent.cs.