SofaAPAPI-Unity3D Getting Started Features Available Examples Assets Available Release Notes License

Getting Started

How to install

Once you receive the SofaUnity package, unzip the Unity3D package and follow those steps :
  1. From Unity3D, open your project or create a new 3D project.
  2. In Unity3D Editor, use Assets -> Import Package -> Custom Package and load the .unitypackage.

  3. Once the package has been fully loaded, check the config file: {your Unity3D project}/Assets/SofaUnity/Plugins/Native/x64/sofa.ini
    It should contain 2 lines leading to your project path. It should looks like this:

  4.    SHARE_DIR=C:/projects/Unity/SofaUnity_default/Assets/SofaUnity/scenes/SofaScenes

  5. Change those paths if you want to use another directory where you store your SOFA scenes and meshes.

Package content

Once ready to be used the SofaUnity asset folder should look like this:

Native: Sofa x64 .dll files folder.
SofaUnityAPI: API scripts interfacing with Sofa library.
Resources: Unity materials, textures and images.
  • Demos: All the demo scenes described in the Examples section.
  • Events: Demo scene for specific events.
  • SofaScenes: Sofa .scn files with their data.
  • VR_ShowRoom: Demo scene of Sofa in VR, using VRTK.
Scripts: all asset classes in C#:
  • Core: Class to represent SOFA objects using Unity3D GameObject
  • Editor: Class to implement Objects Unity Editor inspectors
  • Modules: Specific classes inheriting from Core classes
  • UI: 3D UI controlling SOFA player in game.
  • Utils: Scripts of useful components/algorithms.