OSVR-Unity
OSVR-Unity copied to clipboard
Library collision in v1.7 plugin.
The default metatdata for shared libraries in the plugin folder causes a collision when building for Android. This is because the metadata for all shared libraries in the x86 and x86_64 directories are marked for use on all platforms. They should probably only use the Editor and Standalone options.
Repro steps:
- Start a clean project.
- Import v1.7 OSVR plugin from the Asset Store.
- Go to File -> Build Settings and swap target platform to Android.
- Select any scene to add to the build.
- Open player settings and change the Bundle ID of the application so that it will build.
- Build and see the following compiler error.
Plugins colliding with each other.
Apologies for the huge image.
Is this something that we'll have to ditch Unity 4 support (or even early 5.x) to fix?
(What was wrong with their tagged directories for the plugin platforms? Those worked perfectly fine... arg...)
This is an easy fix, just checking those boxes for Windows and Android libs. And yes, upgrading to Unity 5 was a prereq, plugins did not have those checkboxes in Unity 4. This replaced the directory structure method of determining the intended platform of plugins, although I think it still uses directory names when upgrading to make a best guess about the bitness.
Yeah library metadata is new. This shouldn't force a move away from 4, and can probably be addressed with an editor script that post processes package imports.
Don't know why they changed it, unless it's to improve scalability with new platforms.
We've already upgraded to 5, so I'll fix this today. edit: forgot that the plugins are imported from Managed-OSVR and Android SDK in CI, not in the repo, so this would require a script as @chass-cobb suggested.
Does this mean that Unity 4 is no longer supported? If so, the plugin description on the Asset store should also be changed (this may need a separate ticket).
Snippet from the plugin description:
OSVR Plugin for Unity is compatible with Unity 4 and 5 Free and Pro versions (image distortion is disabled in Unity 4 Free version).