Skip to content
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

Feature: Add support for UWP builds #16

Closed
BallistiX09 opened this issue May 24, 2024 · 9 comments
Closed

Feature: Add support for UWP builds #16

BallistiX09 opened this issue May 24, 2024 · 9 comments

Comments

@BallistiX09
Copy link
Contributor

BallistiX09 commented May 24, 2024

I'm trying to create a Universal Windows Platform build, but I'm running onto an error where Unity is unable to load the DLL (actually the same issue I reported on Android here: #2, except this happens on both development and release builds).

I'm not sure if that's the same bug which happened on Android, or if it's because UWP isn't currently supported, but it would be ideal if UWP builds (both ARM and x86 architectures) could be supported on this plugin though.

Thanks!

@gilzoide
Copy link
Owner

gilzoide commented Jun 2, 2024

Hi @BallistiX09, thanks for the report!

If a regular Windows DLL can be used by UWP builds, it's likely just a matter of selecting the DLL and toggling the UWP platform support. Could you be so kind as to test this for me: selecting the Windows DLLs, marking UWP as supported and test it out on a build? I don't have a Windows machine with Unity correctly setup at the moment.

There is no DLL for ARM right now, but we can surely build one!

@BallistiX09
Copy link
Contributor Author

Ahh sorry, you're right, turning on UWP support on the DLL (included under WSAPlayer in the DLL platform settings) solves the issue! When I checked the DLL platform settings, all the options were greyed out, which I thought was deliberately built into the plugin to stop users from messing with the settings.

Turns out it's because I had the plugin imported through Unity's package manager using the GitHub link, which I guess adds the plugin as read-only and wouldn't let me change settings. Figured I'd mention here in case anybody else has the same issue at some point!

ARM support on Windows would be a massive help though if that's doable!

@gilzoide
Copy link
Owner

gilzoide commented Jun 4, 2024

turning on UWP support on the DLL (included under WSAPlayer in the DLL platform settings) solves the issue!

Awesome! Could you please create a PR with this fix?

Turns out it's because I had the plugin imported through Unity's package manager using the GitHub link, which I guess adds the plugin as read-only and wouldn't let me change settings

Yeah, you have to import the package as an actual directory in your file system, or it's read-only 😅 Good thing is you can actually clone the Git repo directly inside the Packages folder and work on it, that's how I do (actually, I have the packages lying around in my "unity packages" path and create symbolic links in the several test Unity projects, but it's kind of the same thing).

ARM support on Windows would be a massive help though if that's doable!

Sure it's doable! Just have to discover how to build for Windows ARM, never done this before. I usually just cross-compile stuff using MinGW, and it seems LLVM-MinGW supports compiling to ARM, so shouldn't be too hard. We can always fallback to MSVC as well if necessary =P

@gilzoide
Copy link
Owner

gilzoide commented Jun 6, 2024

Hey @BallistiX09, I made a Windows arm64 build using llvm-mingw, it's in branch windows-arm64.
Unfortunately I don't have a Windows arm64 machine, do you? Could you please test it, if possible?

@BallistiX09
Copy link
Contributor Author

BallistiX09 commented Jun 10, 2024

Sorry about the wait, just catching up on this!

Awesome! Could you please create a PR with this fix?

No problem, I've opened a PR on the arm64 branch you made since that'll also need the same changes anyway, so it seemed better to just add it there from the start! I'm assuming it's just the meta files which needed tweaked since that's what controls the platform support, everything else can likely stay as-is.

Hey @BallistiX09, I made a Windows arm64 build using llvm-mingw, it's in branch windows-arm64. Unfortunately I don't have a Windows arm64 machine, do you? Could you please test it, if possible?

I don't actually have an arm64 machine for testing with just yet, sorry!

@gilzoide
Copy link
Owner

I've opened a PR on the arm64 branch you made since that'll also need the same changes anyway, so it seemed better to just add it there from the start!

Ok! I reviewed it there, thank you very much for the contribution!
I think it makes little difference if UWP is added to the arm64 branch or directly to main, so I think we can keep it there, no problem.

I'm assuming it's just the meta files which needed tweaked since that's what controls the platform support, everything else can likely stay as-is.

Yes, only meta files need to be changed for this.

I don't actually have an arm64 machine for testing with just yet, sorry!

Oh, ok, don't worry. You brought it up, so I guessed you'd have a machine to test it =P
Someone will test this eventually and we'll know if it worked or not 👀

@BallistiX09
Copy link
Contributor Author

Ok! I reviewed it there, thank you very much for the contribution! I think it makes little difference if UWP is added to the arm64 branch or directly to main, so I think we can keep it there, no problem.

No problem at all, I'll make the changes mentioned in the comments later tonight and get those pushed!

Oh, ok, don't worry. You brought it up, so I guessed you'd have a machine to test it =P Someone will test this eventually and we'll know if it worked or not 👀

Ahh not yet, I was just hoping to add (untested for now) Windows ARM support to my game because of the newly announced Windows ARM laptops releasing soon, but it'll be a little while until I can get one myself. Here's hoping somebody else picks it up though!

@gilzoide
Copy link
Owner

And it's merged into main! Version 1.0.0 is tagged, so it should be up in OpenUPM soon.
Thank you for again for adding support for UWP! =D

@BallistiX09
Copy link
Contributor Author

And it's merged into main! Version 1.0.0 is tagged, so it should be up in OpenUPM soon. Thank you for again for adding support for UWP! =D

Nice one, no problem at all, thanks for merging it in! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants