Created
December 8, 2019 20:22
-
-
Save unitycoder/dfd1c355ef6800604eecd99c5ebee434 to your computer and use it in GitHub Desktop.
Using raylib.dll in Unity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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