Scripts

    You use scripts by adding them to entities in the scene as components. Xenko loads a script when the entity it is added to is loaded in the scene.

    Note

    Scripts have access to the main modules of the Xenko engine:

    • Audio: the audio system
    • : loads and saves content from assets
    • DebugText: prints debug text
    • : loads and compiles effects and shaders
    • Game: accesses all information related to your game
    • : keyboard, mouse and gamepad states and events
    • Log: logs messages and errors from scripts
    • : the currently displayed scene
    • Script: accesses the script manager to schedule or wait for the termination of scripts
    • : a registry of services you can use to register your own services
    • SpriteAnimation: animates sprites
    • : streams contentYou can still use standard C# classes in Xenko, but these aren't called scripts and you can't attach them to entities in Game Studio.