Skip to content

Scripting API Reference

The Helios scripting system is built on .NET CoreCLR, providing a high-performance C# scripting environment with a C++ hosting layer.

Architecture Overview

The scripting system is divided into two main parts:

  1. C++ Hosting Layer (helios-script): Responsible for booting the .NET runtime, loading assemblies, and bridging engine events (Update, Physics, Input) to managed code.
  2. C# ScriptCore (ScriptCore): A managed library that provides the base classes and API for user scripts, including entity/component access, physics, and scene management.

API Navigation

C++ API (Hosting & ECS)

  • ScriptingPlugin: The entry point for integrating scripting into an App.
  • ScriptRuntime: The low-level interface for assembly and instance management.
  • Components: ECS components used to attach scripts to entities.

C# API (User Scripts)

  • ScriptBehaviour: The base class for all user scripts.
  • Entity: The primary wrapper for interacting with world objects.
  • TransformComponent: API for position, rotation, and scale.
  • Input: Static helper for keyboard and mouse state.
  • Audio: Static helper for playing sounds.
  • Scene: Static helper for runtime scene management.