Good evening. I’ve been working on the physics tutorials, and there’s a problem. In MyGameApp.cs “Game is a namespace but is used like a type.” What does this mean? I haven’t altered this script at all.
This happens when you have something in scope that has a namespace that contains “Game”. So check your usings namespace definitions.
The default project template has this issue.
You can work around it by changing new Game() to new Xenko.Engine.Game()
That fixes it- thanks!
Is there already an issue to fix this?
When I create a new script the namespace appends
.Game and the compiling will fail.
made an issue for this:
Added a comment on https://github.com/xenko3d/xenko/issues/163 (we should fix the underlying issue, not prefix wrong namespace)
Some people might still want to have a custom namespace. Maybe the editor prompt (when creating scripts) should check the current value that is set in the .csproj. And append the current folder path (if it’s not already the case).
edit: looking at the commit. That’s exactly what you did.