Bleeding-edge C# bindings for raylib, a simple and easy-to-use library to learn videogames programming (www.raylib.com)
Raylib-cs.BleedingEdge targets .NET 8+ and binds raylib's master branch
there are WIP examples. you can reference raylib-cs or raylib for missing examples
$ dotnet add package Raylib-cs.BleedingEdge --prerelease
$ dotnet add package Raylib-cs.BleedingEdge.Runtimes --prerelease
-
... just runtimes: install
Raylib-cs.BleedingEdge.Runtimes
. -
... custom native build: uninstall
Raylib-cs.BleedingEdge.Runtimes
and add CompileNatives.props to your project and import it (add<Import Project="CompileNatives.props"/>
). You also need to clone raylib repo and specify path to it in theCustomNatives.props
(by default it's../raylib
) -
... to compile a static library: add
<CompileShared>false</CompileShared>
to your project'sPropertyGroup
. Note that you need custom native build setup for this (read above). -
... prebuilt static library: you can get it from GitHub Actions. You need GitHub account to do this.
using Raylib_cs.BleedingEdge;
using static Raylib_cs.BleedingEdge.Raylib;
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(Color.RayWhite);
DrawText("Congrats! You created your first window!", 190, 200, 20, Color.LightGray);
EndDrawing();
}
CloseWindow();