Work in progress. These docs are new and are likely missing a lot of info. If you notice something wrong or missing, open an issue. PRs are welcome as well.

Scripting

Gameplay scripts can be written in Strata or C#

Hyperion supports scripting with C#. Scripts can be attached to individual objects to define behaviour.

Exposing C++ to scripts

Engine types show up in both languages through reflection. Add a class in C++ with reflection macros, and Hyperion's CodeGenTool generates binding code so you can use it in scripts.

HYP_CLASS()
class Camera : public Entity
{
    HYP_OBJECT_BODY(Camera);
public:
    HYP_METHOD(Property = "FOV")
    float GetFOV() const;

    HYP_METHOD(Property = "FOV")
    void SetFOV(float v);
};

In shipped games

When you package a game, C# scripts are compiled ahead of time with NativeAOT, so the game doesn't need .NET installed.

In this section

Improve this page on GitHub