Search Unity

Havok not working for Android x64

Discussion in 'Physics for ECS' started by fjruiz, Feb 3, 2020.

  1. fjruiz

    fjruiz

    Joined:
    Feb 21, 2013
    Posts:
    3
    Hello people.

    I have been trying to build a physics based game using DOTS and the brand new Havok physics in the 2019.3.0f6 editor version. I can play with it in the editor, even export to windows, but my goal is to publish it in mobile (but it does not work on Android).

    I've replicated the error with freshly created projects, it keeps throwing the error: "Unable to load plugin HavokNative"

    I found this post (https://forum.unity.com/threads/havok-physics-for-android.777944/) where the PO fixed the issue by copying the assets folder to other project (it didn't work for me, even creating a new project and just using havok physics on a sphere fails).

    Then I found this post with an error closer to mine (https://forum.unity.com/threads/una...ive-set-up-havoc-project-from-scratch.774326/) But unfortunately it did not help me as well.

    After trying it with the unity physics(worked), the classical way of physics(worked) and Havok(did not work), I realised that either I am doing something wrong or there is something wrong (or both).

    So here I come asking for your help and knowledge. I have atached a couple of screenshots and the latest project I used to reproduce it. Just download the project, build for android(I am testing on an Android x64) and see the error.

    Thank you for your time and for your help.


    WhatsApp Image 2020-02-03 at 18.37.57.jpeg WhatsApp Image 2020-02-03 at 16.14.55.jpeg
     

    Attached Files:

    Last edited: Feb 9, 2020
    NotaNaN likes this.
  2. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    We're taking a look at this to try and repro.
    In the meantime if you have any other information you think would help let us know.
     
  3. fjruiz

    fjruiz

    Joined:
    Feb 21, 2013
    Posts:
    3
    It worked for me in windows and macos, but for androidx64(the device specs are in the second screenshot) it fails when trying to get a havok dll
     
  4. NotaNaN

    NotaNaN

    Joined:
    Dec 14, 2018
    Posts:
    325
    Oddly enough, I'm having an issue with Havok Physics for my own builds, too. When doing a PC, Mac & Linux Standalone Development Build (or normal build for that matter), the in-build debug console throws the error "dll Not Found Exception: HavokNative." The text is red -- which is a bad sign. Also, nothing is able to move. (Which makes sense).

    I can confirm that the build files contain a dll for Havok.Physics in addition to Havok.Physics.Hybrid (in the "Managed" folder). So... I'm really confused why the error is being thrown. Everything works dandy in the editor. :c

    I'm on Unity version 2019.3.0f6 if that means anything.
     
    Last edited: Feb 8, 2020
    fjruiz likes this.
  5. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    Are you able to test the project on a different machine? Alternatively, is there a way you could get me your project to test locally?
     
    NotaNaN likes this.
  6. NotaNaN

    NotaNaN

    Joined:
    Dec 14, 2018
    Posts:
    325
    I just tested the project on another machine (like you suggested) and I got the same results. Used the same build (PC, Mac & Linux Standalone) and the same Unity version (2019.3.0f6). Not sure if the project running successfully would be better than if it failed in the same way like it did. On the bright side it seems this means there is something either wrong with my project (maybe it got corrupt?) or something isn't being added to the build files on build. I have provided the project files to you through PM if you're interested. Thanks for the help! :D
     
    fjruiz likes this.
  7. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    Many thanks for the project. Love the characters & animations!
    This was a D'oh moment for me and obvious in hindsight. The Havok Physics dll is currently only 64 bit. We are looking at supplying a 32 bit version as well but in the meantime change the Architecture Platform build setting to x86_64 and the application should run fine and load the DLL.
    upload_2020-2-11_10-20-12.png

    We are still looking into the problems with Android 64 though.
     
    Markus4Unity, NotaNaN and fjruiz like this.
  8. fjruiz

    fjruiz

    Joined:
    Feb 21, 2013
    Posts:
    3
    Could you reproduce it with the provided project? The project I submitted was created in windows with Android as target, I downloaded the project in a mac machine, built it for android and got the same result, it's missing the dll.
     
  9. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    We can indeed reproduce the problem with the DLL not loading on Android.
    The problem is not as trivial as the problem with the desktop issue though.
    We are working on the Android issue and hopefully get back to you soon with a fix.
     
    NotaNaN and fjruiz like this.