- Install Unity3D. Version used to develop: 2017.4.1f1. (Version: 5.5.1 or higher are working as well but assets may have conflicts).
- Create a new 3D Project.
- In Unity3D Editor, use Assets -> Import Package -> Custom Package and load the package SofaUnityPlugin.unitypackage
- Know Bug: After importing the asset, you might have this error: DllNotFoundException: SofaAdvancePhysicsAPI SofaUnityAPI.SofaContextAPI..ctor () (at Assets/SofaUnity/Plugins/SofaUnityAPI/SofaContextAPI.cs:23)
- 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.
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.
- Requires Unity3D version: 2017.4.1f1 or 5.5.1 or higher.
- Provides, as Native plugin, SOFA version: 18.06
- Environment: Currently supported only on Windows (7, 8 & 10) 64bits.
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"