Class Script
Base class for all scripts.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public abstract class Script : SceneObject, ISerializable
Constructors
Script()
Methods
OnAwake()
Called after the object is loaded.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnAwake()
OnDebugDraw()
Called during drawing debug shapes in editor. Use DebugDraw to draw debug shapes and other visualization.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnDebugDraw()
OnDebugDrawSelected()
Called during drawing debug shapes in editor when object is selected. Use DebugDraw to draw debug shapes and other visualization.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnDebugDrawSelected()
OnDestroy()
Called before the object will be destroyed.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnDestroy()
OnDisable()
Called when object becomes disabled and inactive.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnDisable()
OnEnable()
Called when object becomes enabled and active.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnEnable()
OnFixedUpdate()
Called every fixed framerate frame if object is enabled.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnFixedUpdate()
OnLateFixedUpdate()
Called every fixed framerate frame (after FixedUpdate) if object is enabled.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnLateFixedUpdate()
OnLateUpdate()
Called every frame (after gameplay Update) if object is enabled.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnLateUpdate()
OnStart()
Called when a script is enabled just before any of the Update methods is called for the first time.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnStart()
OnUpdate()
Called every frame if object is enabled.
Declaration
[NoAnimate]
[Unmanaged]
public virtual void OnUpdate()