Search code examples
monodevelopunity-game-engine

Add UnityEngine.dll to Mono projects on a Mac


When building Mono DLLs for use in Unity we want to reference the UnityEngine.dll. Several tutorials talk through how to do this. For example here are the instructions from the Unity manual

Next, you should add references to the Unity DLLs. In MonoDevelop, you
should open the contextual menu For References in the Solution Browser and
choose Edit References. Then, choose the option .Net Assembly tab > File
System > select file. [...]

At this stage, you will have the option to select the required DLL file. >On Mac OSX, the file can be found at

Applications/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll

But the Mac finder will not step into Unity.app so I cannot navigate into that folder to choose UnityEngine.dll. I can navigate there in the terminal, but not in the 'select file' finder. How do I add UnityEngine.dll as a reference in a Mono project on a Mac?


Solution

  • Seems like MonoDevelop does not set the file browser to include .app and thus does not present Show Package Contents in the right-click context menu.

    Use CMD-Shift-G to popup the Go to the folder: entry, enter /Applications/Unity.app/Contents/Frameworks/Managed and select Go

    enter image description here