Skip to content

Instantly share code, notes, and snippets.

@unitycoder
Created December 8, 2019 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unitycoder/dfd1c355ef6800604eecd99c5ebee434 to your computer and use it in GitHub Desktop.
Save unitycoder/dfd1c355ef6800604eecd99c5ebee434 to your computer and use it in GitHub Desktop.
Using raylib.dll in Unity
// https://unitycoder.com/blog/2019/12/09/using-raylib-dll-in-unity
using UnityEngine;
using Raylib;
using rl = Raylib.Raylib;
using Color = Raylib.Color;
public class RaylibTest : MonoBehaviour
{
void Start()
{
rl.InitWindow(640, 480, "Hello World");
while (!rl.WindowShouldClose())
{
rl.BeginDrawing();
rl.ClearBackground(Color.WHITE);
rl.DrawText("Hello, world!", 12, 12, 20, Color.BLACK);
rl.EndDrawing();
}
rl.CloseWindow();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment