Table of Contents

Class ScriptComponent

Namespace
Stride.Engine
Assembly
Stride.Engine.dll

Script component.

[DataContract("ScriptComponent", Inherited = true)]
[DefaultEntityComponentProcessor(typeof(ScriptProcessor), ExecutionMode = ExecutionMode.Runtime)]
[Display(null, null, Expand = ExpandRule.Once)]
[ComponentOrder(1000)]
[ComponentCategory("Scripts")]
public abstract class ScriptComponent : EntityComponent, IIdentifiable, ICollectorHolder
Inheritance
ScriptComponent
Implements
Derived
Inherited Members
Extension Methods

Constructors

ScriptComponent()

protected ScriptComponent()

Fields

LiveScriptingMask

public const uint LiveScriptingMask = 128

Field Value

uint

ScriptGlobalProfilingKey

The global profiling key for scripts. Activate/deactivate this key to activate/deactivate profiling for all your scripts.

public static readonly ProfilingKey ScriptGlobalProfilingKey

Field Value

ProfilingKey

Properties

Audio

public AudioSystem Audio { get; }

Property Value

AudioSystem

Collector

The object collector associated with this script.

public ObjectCollector Collector { get; }

Property Value

ObjectCollector

Content

public ContentManager Content { get; }

Property Value

ContentManager

DebugText

public DebugTextSystem DebugText { get; }

Property Value

DebugTextSystem

EffectSystem

public EffectSystem EffectSystem { get; }

Property Value

EffectSystem

Game

public IGame Game { get; }

Property Value

IGame

GameProfiler

public GameProfilingSystem GameProfiler { get; }

Property Value

GameProfilingSystem

GraphicsDevice

public GraphicsDevice GraphicsDevice { get; }

Property Value

GraphicsDevice

Input

public InputManager Input { get; }

Property Value

InputManager

IsLiveReloading

Determines whether the script is currently undergoing live reloading.

public bool IsLiveReloading { get; }

Property Value

bool

Log

protected Logger Log { get; }

Property Value

Logger

Priority

The priority this script will be scheduled with (compared to other scripts).

[DataMember(10000)]
public int Priority { get; set; }

Property Value

int

ProfilingKey

Gets the profiling key to activate/deactivate profiling for the current script class.

public ProfilingKey ProfilingKey { get; }

Property Value

ProfilingKey

SceneSystem

public SceneSystem SceneSystem { get; }

Property Value

SceneSystem

Script

public ScriptSystem Script { get; }

Property Value

ScriptSystem

Services

public IServiceRegistry Services { get; }

Property Value

IServiceRegistry

SpriteAnimation

public SpriteAnimationSystem SpriteAnimation { get; }

Property Value

SpriteAnimationSystem

Streaming

Gets the streaming system.

public StreamingManager Streaming { get; }

Property Value

StreamingManager

The streaming system.

Methods

Cancel()

Called when the script's update loop is canceled.

public virtual void Cancel()

PriorityUpdated()

Internal helper function called when Priority is changed.

protected virtual void PriorityUpdated()