Get RAPTOR

RAPTOR API

The C# API for connecting RAPTOR to your game and tools.

You can build, light and play a level without code, as described in the Docs. Use the API to connect RAPTOR to your own systems, such as a player character, multiplayer host, toolbar tool or model storage.

What you can do with it

You want toStart with
Let Logic move, teleport and freeze your characterYour own character
Replace the use key with your own input, or let your weapons damage logic objectsYour own character
Run Logic on your own host, such as a networked gameYour own character
Add a tool to the toolbar, rows to the Inspector or a page to Project SettingsWriting a module
Change how a Block is built, such as adding bevelsBlock extension points
Add a new kind of object to the 3D view and HierarchyTool extension points
Save and load models through another storage systemModel storage
Read RAPTOR's baked light volume in a custom shaderShader API

All other entry points are listed in Extension points.

How the API is organised

The Reference menu has one fold-out per area and one page per type.

AreaWhat it covers
Play and LogicPlayer character, Play button and Logic host.
Modules and projectModule rows, data folders, preferences, project settings and credits.
Window and panelsRAPTOR's window, panels, slots and dialogs.
Tools and menusToolbar tools, Inspector rows, menu rows and shortcut rows.
3D viewDrawing in the 3D view, picking and custom scene objects.
BlocksHow a Block builds and the data a module stores on it.
ModelsBuilding, saving, naming and moving parts.
Materials and hotspotsPacks, the Materials drawer, hotspot sheets and shaders.
Lighting and renderingLight backends, bake backends and the Ray-traced preview.
Props and entitiesThe prop list, placement modes and entity bodies.
UI kitRAPTOR's controls, theme and icons.

Reading a type page

Each type page has these parts, in order:

  1. Header table. Namespace, assembly, kind (class, interface, struct or enum) and stability.
  2. Declaration. The C# line that declares the type.
  3. Members. Grouped as Constructors, Values, Fields, Properties, Methods and Events. Each has its signature, a description and a parameter table.
  4. Related types. Types the page mentions.

Supported and unsupported

Only the types and members in this reference are supported. Other public code in RAPTOR can change in any update. To request something that is not listed, ask on Discord.

StabilityWhat it means
previewCan change in a minor version, such as 1.1. Changes are listed in the changelog.
experimentalCan change in any release. Pages for these types start with a warning.

Assemblies

Reference RAPTOR's assemblies by GUID from your assembly definition (.asmdef). A GUID reference keeps working if an assembly is renamed.

AssemblyReference it whenRuns in
Raptor.EditorAlways, for editor code.Editor
Raptor.ComponentsYou use Blocks, per-Block data or the local player.Editor and game
Raptor.MeshCoreYou write a Block modifier.Editor
Raptor.Logic.RuntimeYou claim Logic or call the local host.Editor and game
RaptorLogic.CoreYou read LogicModules.Editor and game
RaptorRender.EditorYou add a light to the Ray-traced preview.Editor

Copy the reference into the references list of your .asmdef, and the namespace into your using directive:

AssemblyReferenceNamespace
Raptor.EditorGUID:be077b987e64af8408d00913e39c042cRaptor.EditorTools
Raptor.ComponentsGUID:38389940f44407c4c9afe23c03d52cefRaptor.Components
Raptor.MeshCoreGUID:397ea669cfa6fc641bea09678decab17
Raptor.Logic.RuntimeGUID:545294e6f7ec493f99097086d14ee328Raptor.Logic
RaptorLogic.CoreGUID:e25f1191e2a449849b11b698eac02212RaptorLogic
RaptorRender.EditorGUID:15d69a4210e29ac42aa76d8df4a37885Raptor.Render.EditorTools

Included samples

Assets/RAPTOR/Samples/ModuleTemplate is a minimal working module. Assets/RAPTOR/Samples/LogicStarter is a level that runs Logic without code.