Open Unity, go to Asset Store. Search and install "Leap Motion Core Assets". When asked to update the APIs, click "I made a backup. Go ahead".
IMPORTANT: On step 5, make sure you clicked "I made a backup. Go ahead" or the code won't compile.
Now the installation of development environment is completed.
Side notes:
According to the Leap Motion site. One of the requirements for using the Core Assets on OSX is that the Integrated VR Support must be turned off. To turn off the integrated VR support:
Open Unity.
Go to Edit -> Project Settings -> Player.
Make sure the Virtual Reality supported checkbox is unchecked.
Now because of the integrated VR support must be turned off. It is not possible to build and preview the VR app inside Unity. Therefore, building a standalone executable is necessary every time we want to try out the app.
To build a standalone executable:
Open Unity, go to the project we are building.
Go to File -> Build Settings.
Add the scenes to be built. (Usually "Add current" would suffice"
Choose the "Target Platform" as "OSX". Choose the "Architecture" according to your computer's spec.
Click "Player settings" and make sure the "Virtual Reality supported" is Unchecked. Otherwise the app will appear to be a total blank.
Click "Build" and choose the path you want to place the executable.
Instructions on Setting Up Development Environment
Side notes:
To build a standalone executable: