0

I have a Unity native plugin with next structure:

  • Plugins/Android/Foo.jar // Native Android library
  • Plugins/Android/Foo.Android.dll // Managed Unity wrapper to let access native Android routine (Marked as for Android only)
  • Plugins/iOS/libFoo.a // Native iOS library
  • Plugins/iOS/Foo.iOS.dll // Managed Unity wrapper to let access native iOS routine (Marked as for iOS only)

When I select Android or iOS platform and open my Unity project in MonoDevelop it not add reference for Foo.Android.dll. The same situation for iOS. Also Unity Editor Console contains error about not referenced classes used in my Unity code outside Plugin.

Assets/MainScript.cs(3,11): error CS0234: The type or namespace nameBar' does not exist in the namespace Foo'. Are you missing an assembly reference?

When change Foo.iOS.dll/Foo.Android.dll platform setting to Any Platform before opening MonoDevelop under iOS/Android respectively it's works as expected.

When I build project it's built successfully both for iOS and Android.

Where I need place my managed libraries or which settings I should use to force Unity add appropriate libraries as reference in opening MonoDevelop project?

Unity Editor 5.2.0f3, OS X Yosemite 10.10.5 (14F27)

user3071284
  • 6,955
  • 6
  • 43
  • 57

1 Answers1

0

One of possible solution:

Unity Editor include only libraries marked as for Editor than problem solved adding new stub library in Plugins\X86\Foo.Editor.dll with only Editor target platform selected.

After this Unity add reference to stub Plugins\X86\Foo.Editor.dll in opening Mono Develop project but use actual platform-dependent libraries when built.