-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mono/C# support for UWP #20271
Comments
This may already be working. Has anyone tried it? |
I can try testing on Windows. Ideally this should be tested on an ARM device and on Xbox One too, but I don't have any of these devices. |
Eh, I can't even build with the Mono module enabled... |
Need to change this to include UWP: Line 85 in b2d7641
|
Those I can't get around:
It's not possible to access the registry on UWP. |
Is it possible to use the .NET framework instead of Mono? |
@vnen That's how Unity does it, they use .Net (Core? I believe) for UWP, and then typically use Mono for everything else. |
@NathanWarden I mean if Godot can already do it, if there's some build flag to enable it. |
@vnen That makes sense. I'm very sure you're on the right track, but I don't think that has been added. I haven't seen it yet at least. I can't imagine it would be too difficult though. Were you thinking the build flag should just include .Net Core as an additional target (for use only with UWP), or to replace Mono entirely when built with that flag? |
It should replace Mono. I don't see a reason to add Mono stuff to the binary and not use it. |
That makes a lot of sense, unless UWP builds are going to be available in Godot proper at some point. .Net Core is a very stripped down version of .Net and is incompatible with both Mono and .Net proper in a lot of places. So, I suppose the idea is this would be a version that people just have to compile from source for now. How Unity supports both is that they spit out the compile errors to the console for the incompatibilities at build time with .Net Core since their UWP template obviously uses it. It's a little bit annoying, but much better than limiting the API across the board. I think they build the .Net Core assembly against msbuild at export time. Thus, you can still just have one version of the editor, but the UWP build template is .Net Core only. So, essentially, Unity builds the UWP template against .Net Core, but builds the editor against whichever .Net version they're using. Actually, they have multiple right now that you can select from. Sorry if I've just made a rabbit trail out of this. I suppose all you're trying to do is just simply seeing if a Godot build can compile against UWP :) |
Well, I'm the maintainer of the Godot UWP port (or at least I try to), but I'm not really willing to put much effort into the C# support. So if @neikeq can make it work with .NET I can help with the UWP part. With UWP we can add the dependencies in the manifest which are installed automatically, so it probably doesn't need any additional library. |
I hear you, it would be quite a bit of effort. Plus, it doesn't have to all be perfect on the first pass either. Thanks for all of your hard work :) |
Moving to 3.2 milestone, for 3.1 the focus is on getting the desktop platforms in good shape, plus maybe Android support if we can figure out the buildsystem. |
@vnen I am excited that there is interest on Godot for UWP. I believe Hololens OS is a variant of the Windows 10 on ARM I am interested to know if there is a community interest to |
This won't happen until at least June as it's not part of my current roadmap. It should not require much work to get this done as I suppose it will share most of the code from Windows, but I have zero experience with UWP. |
@GeorgeS2019 If anything, UWP seems to be getting less and less popular among Microsoft product users. Also, SDK project support is planned for Godot 4.0. |
Well then please don't cross-reference unrelated issues, this issue here is about C# support on UWP. |
Microsoft's official plan is to deprecate .NET Framework and release ".NET 5" by the end of the year (planned for November), which is the next version of ".NET Core" and is supposed to be the only thing .NET going forward. In theory it's supposed to kinda replace mono too. It includes support for UWP of course, but it's also what Microsoft is pushing as the multiplatform .NET thing to use. No idea of it's going to be any good, but it's definitely something to keep in mind if we're going to put a lot of effort to make C# work with UWP. |
@aurodev WinUI is also changing. WinUI 3 is going to be independent of UWP and is supposed to support everything even Win32 directly. |
Exactly @FeatherAntennae this is why I proposed WinUI as one of Godot Export, an extension from UWP export I have looked into how Godot is exporting UWP as UWP console. I believe it should not be too complicated to export as a UWP control too ( or WinUI ). With that Godot is relevant to WinForm, WPF - the bulk of business in-house apps seeking for help how to modernize :-) |
However, the bigger next step for c# support in Godot 4.0 is (beyond UWP export but) to plan a path to leverage the opportunities presented by Microsoft .NET going towards .NET5. We need to discuss the various opportunities. Some of the issues to address the godot 4.0 path towards .NET5 (Nov2020)
|
Hopefully, the benefits of the UWP .Net Native compiler will not get lost in the mix. Some projects require perf and a much harder path to disassembly. The UWP .Net Native compiler is quite mature at this point. Its compiled code is not a open book. JIT only makes sense if you don't care about folks peering into your work since you are effectively releasing the source for modules that need to be jitted. Byte code obfuscation is both a drag on perf and stability. |
Is there any news in the meantime? If I understood the hints in other Godot issues correctly (e.g. godotengine/godot-proposals#339 (comment)), Godot 4 will properly use .NET 5? This step would be very welcome. .NET 5 is very fast. |
@SommerEngineering The plan is to keep using Mono for the foreseeable future (including for Godot 4.0), as .NET 5 doesn't really have good mobile support yet. Hopefully, .NET 6 should have better mobile support. Also, UWP requires many fixes to be in a functional state for Godot 3.2 before we can consider adding C# support. Edit (July 2022): .NET 6 has officially dropped UWP support, so it won't be possible to support C# with UWP in Godot releases that use .NET 6. |
It looks like .NET 6 is tentatively planned to be final by November 2021. Though understandably that date may be subject to change, I have no insight into the process. But I did see they have just released preview 4, so hopefully it's stabilizing. Also not sure about if it has better mobile support yet.
@Calinou Just curious, would you say this is still the case? Are there still a lot of unresolved issues with UWP exports? |
This issue is only relevant for the 3.x branch as there is no UWP support in 4.x. After all this time has passed, I think I can confirm that there are no official plans to implement Mono support for UWP in 3.x. The focus of the .NET contributors is on reaching platform support parity for .NET 7/8 in Godot 4.x (Android was just added, iOS and Web are still missing). |
After Android (#20267), iOS (#20268) and HTML5 (#20270), we'll likely want to bring Mono/C# export support for UWP. This issue is to discuss what needs to be done and the progress.
CC @neikeq
The text was updated successfully, but these errors were encountered: