Closed r-odriguez closed 6 months ago
After reading some old closed issues I found that by adding using Raylib_cs
on top of using static Raylib_cs.Raylib
fixed too.
@i3elj Yeah it needs using Raylib_cs
which the examples currently sets in Examples.csproj as a global using so each example doesn't need to specify it to have access to the namespace.
Issue description
After creating a blank project using
dotnet new console
and adding Raylib-cs withdotnet add package Raylib-cs
, the code sample provided here doesn't work out of the box which I imagine that it should (I could be wrong and please point out if I am. I'm new to C# and I don't really know how things work just yet)Environment and other useful information
Reproducing errors
copy code from
Examples/Core/Camera2dDemo.cs
into the generatedProgram.cs
. Run:Expected output
Actual output and errors
Temporary fix
I managed to make it work by changing
using static Raylib_cs.Raylib
tousing Raylib_cs
and addingRaylib.
at the beginning of some types. Not all of them needed tho,Rectangle
,Camera2D
andColor
are examples that only worked without the namespace.