SofaUnity Description Installation Features Available Examples Assets Available Release Notes Download
     

Installation

  1. Install Unity3D. Version used to develop: 2017.4.1f1. (Version: 5.5.1 or higher are working as well but assets may have conflicts).
  2. Create a new 3D Project.
  3. In Unity3D Editor, use Assets -> Import Package -> Custom Package and load the package SofaUnityPlugin.unitypackage

  4. Know Bug: After importing the asset, you might have this error: DllNotFoundException: SofaAdvancePhysicsAPI SofaUnityAPI.SofaContextAPI..ctor () (at Assets/SofaUnity/Plugins/SofaUnityAPI/SofaContextAPI.cs:23)

  5. To resolve it, search for the file SofaAdvancePhysicsAPI.dll in the Unity project browser, then in its inspector click on reset. Finally, in the Unity browser select the SofaUnity folder and click ->Reimport.

  6. If you are using SOFA scenes from outise Unity. You need to set SOFA resource path. Edit the file: Assets/SofaUnity/Plugins/Native/x64/sofa.ini and set SHARE_DIR and EXAMPLES_DIR to the corresponding absolute paths.

Compatibility


VR asset

To use the scene that combine Sofa and Virtual Reality, several assets are needed:

Then, in the script SVRLaserRay.cs uncomment the line: "//#define USING_VRTK"