OS X Plugin

Hello I’m trying to figure out how to write OS X plugins for unity.

  1. Where to get example OS X .bundle project + unity example projet?

  2. What functionality I can use in Bundles?

For example I want to change standart tool bar menu, with my own. Where to start?

Kind regards, Stanislav Osipov.

1 Answer

1

Hi Stanislav

I am also working on my first Plugin.
I am trying to access the OSX NSOpenPanel. I can compile the Plugin, but still have Problems to import it in Unity during runtime.

See the documentation under:
Unity Manual>Advanced>Plugins (Pro/Mobile-Only Feature)>Building Plugins for Desktop Platforms
=> At the bottom of the page you can find some very basic examples.

A more complex and well documented tutorial:
Trackpad Plugin example

While creating the XCode Project (In the window where you enter the name of your Project), be aware to change the Framework from “CoreFound…” to “Cocoa”.

To import the “libmono.0.dll” open Unity.app (“show content”) and search the .dll manually.
(/Applications/Unity/Unity.app/Contents/Frameworks/MonoEmbedRuntime/osx/libmono.dylib)

Drag the “libmono.0.dylib” into the Projectnavigator in Xcode.

Kind regards Marco

One more: [OSX menu bar][1] An other add on: There's a fault in the trackpad tutorial: The Plugins folder must be written in the plural: "Assets/Plugins" [1]: http://answers.unity3d.com/questions/7898/how-would-i-add-os-x-menu-bar-functions-to-a-unity.html

thx, this is very helpful information!