Search Unity

Resolved Unable to load plugin `HavokNative` on Android platform

Discussion in 'Physics for ECS' started by Miu_na, Mar 5, 2023.

  1. Miu_na

    Miu_na

    Joined:
    Feb 26, 2023
    Posts:
    2
    The build version of the project can be able to load Havok Physics successfully on Windows standalone platform. Sadly, it can not be able to load 'HavokNative' plugin on Android platform.
    Then I have tried to build the physics samples project on Android platform, but it still reports the same error.

    [Unity Version]
    2022.2.7f1

    [Scripting Backend]
    Mono

    [Target Architectures]
    ARMv7

    [Package Version]
    "com.havok.physics": "1.0.0-pre.44"
    "com.unity.entities": "1.0.0-pre.44"
    "com.unity.physics": "1.0.0-pre.44"

    [Adb Log Information]
    Code (CSharp):
    1. 03-05 11:40:17.332 21114 21162 E Unity   : Unable to load plugin `HavokNative`
    2. 03-05 11:40:17.345 21114 21162 E Unity   : Unable to load plugin `HavokNative`
    3. 03-05 11:40:18.824 21114 21162 E Unity   : DllNotFoundException: HavokNative assembly:<unknown assembly> type:<unknown type> member:(null)
    4. 03-05 11:40:18.824 21114 21162 E Unity   :   at (wrapper managed-to-native) Havok.Physics.Plugin.HP_AllocateWorld(Havok.Physics.HavokConfiguration&,Havok.Physics.HavokSimulation/StepContext*)
    5. 03-05 11:40:18.824 21114 21162 E Unity   :   at Havok.Physics.SimulationContext..ctor (Havok.Physics.HavokConfiguration config) [0x0005e] in <119939828bba40c6a6498ce40ec06642>:0
    6. 03-05 11:40:18.824 21114 21162 E Unity   :   at Havok.Physics.HavokSimulation..ctor (Havok.Physics.HavokConfiguration config) [0x00014] in <119939828bba40c6a6498ce40ec06642>:0
    7. 03-05 11:40:18.985 21114 21162 E Unity   : DllNotFoundException: HavokNative assembly:<unknown assembly> type:<unknown type> member:(null)
    8. 03-05 11:40:18.985 21114 21162 E Unity   :   at (wrapper managed-to-native) Havok.Physics.Plugin.HP_AllocateWorld(Havok.Physics.HavokConfiguration&,Havok.Physics.HavokSimulation/StepContext*)
    9. 03-05 11:40:18.985 21114 21162 E Unity   :   at Havok.Physics.SimulationContext..ctor (Havok.Physics.HavokConfiguration config) [0x0005e] in <119939828bba40c6a6498ce40ec06642>:0
    10. 03-05 11:40:18.985 21114 21162 E Unity   :   at Havok.Physics.HavokSimulation..ctor (Havok.Physics.HavokConfiguration config) [0x00014] in <119939828bba40c6a6498ce40ec06642>:0
    11. 03-05 11:40:19.084 21114 21162 E Unity   : DllNotFoundException: HavokNative assembly:<unknown assembly> type:<unknown type> member:(null)
    12. 03-05 11:40:19.084 21114 21162 E Unity   :   at (wrapper managed-to-native) Havok.Physics.Plugin.HP_AllocateWorld(Havok.Physics.HavokConfiguration&,Havok.Physics.HavokSimulation/StepContext*)
    13. 03-05 11:40:19.084 21114 21162 E Unity   :   at Havok.Physics.SimulationContext..ctor (Havok.Physics.HavokConfiguration config) [0x0005e] in <119939828bba40c6a6498ce40ec06642>:0
    14. 03-05 11:40:19.084 21114 21162 E Unity   :   at Havok.Physics.HavokSimulation..ctor (Havok.Physics.HavokConfiguration config) [0x00014] in <119939828bba40c6a6498ce40ec06642>:0
     
  2. JMPM-UNITY

    JMPM-UNITY

    Unity Technologies

    Joined:
    Jun 16, 2021
    Posts:
    94
    Hey @Miu_na. I have logged this issue internally and will look at it asap. Thank you for reporting!
     
    daniel-holz likes this.
  3. Miu_na

    Miu_na

    Joined:
    Feb 26, 2023
    Posts:
    2
    Hi @JosepMariaPujol, fortunately I have figured out the reason why havok plugin cannot be loaded on android platform. The file name of the android native library is required to start with 'lib'. Therefore, just rename 'havoknative.so' to 'libhavoknative.so' and the problem will be solved. Hope that this bug will be fixed soon. :)
     
  4. JMPM-UNITY

    JMPM-UNITY

    Unity Technologies

    Joined:
    Jun 16, 2021
    Posts:
    94
    This issue has been internally fixed. The following package update will include the changes. Thank you!
     
    daniel-holz likes this.