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

The plugin can't be built for the Windows Universal target #34

Closed
demonixis opened this issue May 14, 2017 · 3 comments
Closed

The plugin can't be built for the Windows Universal target #34

demonixis opened this issue May 14, 2017 · 3 comments

Comments

@demonixis
Copy link

demonixis commented May 14, 2017

Hi,

The plugin can't be built for the Windows Universal target. I know that this plugin will not work on that target, but a game can be built for SteamVR on Linux, for Oculus home and for Windows Mixed Reality. The Windows Universal API doesn't support some methods. We can fix that by two methods

  • Using defines #if !UNITY_METRO to block the code that doesn't compile
  • Refactor the code to be compatible

If you want SteamVR on Windows Universal, it's a good idea to start a refactor, however the first point is better and faster if don't. I can submit a pull request with these changes. However there are some changes to do in Steamvr_api.cs and I don't have the hands on it.

This is all errors returned by Unity when trying to build for Windows Store

image

I fixed all of these with simple #if !UNITY_METRO

@aleiby
Copy link
Contributor

aleiby commented Jun 16, 2017

Can you provide more specifics for how to reproduce these errors? I installed the Windows Store target in Unity 2017.1.0b9, but it seems to compile and run fine in editor. The Build and Build & Run options are greyed out for me - maybe because I'm testing on Win7?

@demonixis
Copy link
Author

Hi,

You have to install Windows 8.1 or 10 to be able to deploy to Windows Store. The plugin is fine in the editor but fails to compile in builds.
Windows Stores apps uses the native .Net runtime, so some APIs are not present. By example, you can't use DLLImport, which is the main cause of error when compiling the OpenVR.
I can send you a patched version of the API, if you want to see what has changed.

@aleiby
Copy link
Contributor

aleiby commented Jun 28, 2017

I did a pass on this for the next release. The changes to openvr_api.cs likely won't make it into this version however.

@aleiby aleiby closed this as completed Jun 28, 2017
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