Skip to content

Editor setup

This page sets up Visual Studio Code for C# scripting. Other editors work too. The key is pointing IntelliSense at the engine assembly.

Kolpa scripts are C# classes that derive from Kolpa.Engine.MonoBehaviour. Your editor gets full autocomplete and type checking against the real engine API when it sees Kolpa.Engine.dll.

The API surface is the public code in bindings/Kolpa.Engine/. There are no generated stub files. The assembly is the truth.

  1. Install the C# Dev Kit extension (publisher Microsoft). It bundles the C# extension and OmniSharp/Roslyn.
  2. File -> Open Folder and choose the engine source root (the folder that contains bindings/). Scripts compile from the source tree today.
  3. Open any .cs file under bindings/Kolpa.Demo/. The C# extension reads the .csproj next to it and resolves Kolpa.Engine automatically.
  4. Type transform. or gameObject. and you should see members.

Confirm the C# extension loaded and that bindings/Kolpa.Demo/Kolpa.Demo.csproj builds. The build copies Kolpa.Engine.dll next to the demo assembly. If the reference is unresolved, build once so the DLL exists.

  • bindings/Kolpa.Engine/: the engine API. Read it, do not edit it unless you are changing the engine.
  • bindings/Kolpa.Demo/: your scripts. Add new .cs files here. The build compiles this folder into Kolpa.Demo.dll.

Start a new script from bindings/Kolpa.Demo/NewBehaviour.cs.template. Copy it, rename the class to match the file, then attach it through the Script component.

Previous: Scripting overview: lifecycle and attaching scripts.

Next: Gameplay scripts: logic attached to one GameObject.