InfinyTech3D / SofaUnity

SOFA-Renderer asset for Unity
Other
23 stars 2 forks source link

Error about SofaUnity.SofaFEMForceField.Update_impl() with SofaUnity 23.06 #109

Open Yangon0620 opened 3 weeks ago

Yangon0620 commented 3 weeks ago

I download the SofaUnity 23.06 Sourcecode and the the prebuild Sofa 23.06 .zip Windows on github, and then followed the steps in "Tutorial 02: How to install from source code and use custom SOFA version" to copy the SofaUnity Sourcecode to new folder sofa_unity and copy the sofa .dll to plugin\native\x64(which missed the file sofa.ini). Then I open an demo Assets\sofa_unity\Scences\Demos\Interaction\ Demo_06_Liver Cut(Scene Asset) and run this demo. I noticed that the the Unity FPS is more than 300, while the Sofa FPS is 0. Many many errors occored and as follows:

NullReferenceException: Object reference not set to an instance of an object SofaUnity.SofaFEMForceField.Init_impl () (at Assets/sofa_unity/Scripts/Core/Components/SofaFEMForceField.cs:90) SofaUnity.SofaBase.Start () (at Assets/sofa_unity/Scripts/Core/Base/SofaBase.cs:115)

NullReferenceException: Object reference not set to an instance of an object SofaUnity.SofaFEMForceField.Update_impl () (at Assets/sofa_unity/Scripts/Core/Components/SofaFEMForceField.cs:107) SofaUnity.SofaBase.Update () (at Assets/sofa_unity/Scripts/Core/Base/SofaBase.cs:137)

DllNotFoundException: SAPAPI assembly: type: member:(null) SofaUnityAPI.SofaContextAPI..ctor (System.Boolean async) (at Assets/sofa_unity/Plugins/SofaUnityAPI/SofaContextAPI.cs:72) SofaUnity.SofaContext.Init () (at Assets/sofa_unity/Scripts/SofaContext.cs:349) SofaUnity.SofaContext.StartSofa () (at Assets/sofa_unity/Scripts/SofaContext.cs:312) SofaUnity.SofaContext.Awake () (at Assets/sofa_unity/Scripts/SofaContext.cs:258)

It seems like the sofa didn`t work , how to fix it? Thanks Snipaste_2024-08-20_16-50-24

epernod commented 3 weeks ago

Hi,

sorry the tutorial 2 is not anymore up to date. Could you follow those steps and tell if this new version is working? Prefer to use the version from github with already built in dll.

Best regards