Watch
2
0
Fork
You've already forked raylib-cs
0
C# bindings for raylib, a simple and easy-to-use library to learn videogames programming http://www.raylib.com/
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
ChrisDill f17aa05cef Minor update to experimental modules
- Fixed return type in Physac.cs
- Update Raygui.cs
2021-01-10 15:10:16 +00:00
.github/workflows Rename dotnetcore.yml to build.yml 2021-01-02 15:53:59 +00:00
Logo Added logos and updated readme 2018-09-13 12:00:51 +01:00
Physac-cs Minor update to experimental modules 2021-01-10 15:10:16 +00:00
Raygui-cs Minor update to experimental modules 2021-01-10 15:10:16 +00:00
Raylib-cs Remove Raylib-cs.targets 2021-01-06 10:47:25 +00:00
Raylib-cs.Tests Update Raylib-cs.Tests and added tests to github actions 2021-01-02 11:36:27 +00:00
.gitignore - Improvements for 2.5 release. Alot more work than I expected. 2019-04-22 07:40:01 +01:00
app.config Initial project update. 2020-04-01 14:35:26 +01:00
LICENSE Update LICENSE 2021-01-03 16:17:44 +00:00
netfx.props Initial project update. 2020-04-01 14:35:26 +01:00
Raylib-cs.sln Added Platform.cs - to copy (correct) native library at runtime (for netfx) 2020-05-08 02:20:20 +10:00
README.md Update README.md 2021-01-02 16:01:22 +00:00

Raylib-cs Logo

Raylib-cs

C# bindings for raylib 3.5.0, a simple and easy-to-use library to learn videogames programming (www.raylib.com)

GitHub contributors License

Chat on Discord GitHub stars

Build

Raylib-cs targets netstandard2.1 and supports netcoreapp3.0+ and net5.0.

Installation - NuGet

This is the prefered method to get started - The package is still new so please report any issues.

NOTE: The nuget package uses raylib 3.0. It will soon be updated to raylib 3.5.0.

dotnet add package Raylib-cs --version 3.1.5

NuGet

If you need to edit Raylib-cs source then you will need to add the bindings as a project (see below).

Installation - Manual

  1. Download/Clone this repo

  2. Add Raylib-cs/Raylib-cs.csproj to your project as an existing project.

  3. Download the native libraries for the platforms you want to build for using the official 3.5.0 release. NOTE: the MSVC version is required for Windows platforms

  4. (Recommended) Put the native library for each platform under Raylib-cs/runtimes/{platform}/native/ (Optional) If you want to handle the native libraries yourself, make sure they are either in the same directory as the executable and/or can be found in the search path. See https://www.mono-project.com/docs/advanced/pinvoke/ for details.

  5. Start coding!

using Raylib_cs;

namespace HelloWorld
{
    static class Program
    {
        public static void Main()
        {
            Raylib.InitWindow(800, 480, "Hello World");

            while (!Raylib.WindowShouldClose())
            {
                Raylib.BeginDrawing();
                Raylib.ClearBackground(Color.WHITE);

                Raylib.DrawText("Hello, world!", 12, 12, 20, Color.BLACK);

                Raylib.EndDrawing();
            }

            Raylib.CloseWindow();
        }
    }
}

Physac-cs and Raygui-cs

These are unfinished EXPERIMENTAL bindings to physac and raygui. Added as a test to Raylib-cs but caused confusion in project setup so they were moved into their own libraries.

Documentation

Examples for Raylib-cs can be found at Raylib-cs-Examples.

Details about Raylib-cs can be found on the Raylib-cs wiki.

Contributing

If you have any ideas, feel free to open an issue and tell me what you think. If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.

If you want to request features or report bugs related to the library (in contrast to this binding), please refer to the author's project repo.

License

See LICENSE for details.