How to install

To install the SOFA-Unity3D asset, follow these steps based on the version you downloaded. Depending, from where First you downloaded it, you might need to Unity3D package and follow those steps:
You can also refer to those video tutorials:

PACKAGE CONTENT

Once the SofaUnity asset is set up, the folder structure should resemble the following layout. Please note that some folders may only appear if you are using the main branch from the GitHub repository and might not be present in the official release versions. Additionally, the License and Modules folders are included only if you have requested specific assets beyond the core API of SofaUnity.

  • Core        → Main folder containing all files of this asset
    • Plugins
      • Native        → SOFA x64 .dll files folder.
      • SofaUnityAPI        → C# API scripts interfacing with Sofa library.
    • Prefabs        → Unity prefabs to use SOFA Unity GameObjects
    • Resources         Unity materials, textures and images.
    • Scripts
      • Core        List of classes to represent SOFA components hiearchy using Unity3D GameObject.
      • Editor        Classes to implement SOFA components Unity Editor inspectors.
      • Modules        → Specific classes inheriting from the Core classes
      • UI        → 3D UI scripts to control SOFA player or components in Game.
      • Utils        → List of scripts of useful components/algorithms to use SOFA simulation.
  • Doc        → Offline documentation (prefer online version which is more up-to-date).

  • License        → Folder to store the license. Only for specific assets (Modules).


  • Modules        → Folder containing the different advanced features as additional assets.

  • Scenes        → Folder containing the different advanced features as additional assets.
    • Benchmarks        → Some specific Unity scene to benchmark SOFA components or integration
    • Demos        → Advanced simulation scenes to demonstrate SOFA capabilities. Such as endoscopy, carving, cutting, python scripting and tearing simulation. 
    • Examples        → All basic examples to demonstrate SOFA integration in Unity.
    • SofaScenes        → All SOFA scene files in .scn or .py with their data.
    • Tutorials        → Work in progress tutorials, prefer using the examples.

  • Tests        → Folder containing non-regression scene test API.

CHECK INSTALLATION

After setting up the SofaUnity asset, the simplest way to verify a successful installation is by checking the Unity console for errors when you open one of the basic example scenes located in Scenes/Examples/, such as Example_01_SimpleLiver.unity or Example_02_Caduceus.unity. If no errors are present, proceed by playing the scene. You should observe the 3D model moving by default, and the movement should vary when you adjust the gravity value in the SofaContext UI inspector.