Search Unity

Unity FBX Exporter v. 3.0.1 doesn't work in 2019.3.2f1 - UnityFbxSdkNative.dll not found

Discussion in 'Editor & General Support' started by Hanserw, Mar 2, 2020.

  1. Hanserw

    Hanserw

    Joined:
    Feb 3, 2014
    Posts:
    14
    It was working fine in 2019.2.6f1. It was so useful I used it all the time.

    Doesn't seem to work at all in 2019.3.2f1.
    Steps:
    1) Enable official FBX export package via package manager
    2) Select the thing(s) you want to export
    3) RMB > Export to FBX...
    4) Click on Export (with the default Assets folder set as the export path).
    5) Click Overwrite if prompted a file with the same name already exists.

    Result: Nothing happens.

    Extra Test 1:
    After doing steps 1 to 3, I tried changing the name of the export file and clicking export.
    Result: The export button blinks.

    Extra Test 2:
    Did steps 1 to 4 on a default Unity Cube.
    Result: Export button blinks; no Cube.fbx is exported.

    This issue happens with Export Format set to Binary or Ascii.

    We'll be stuck on this version of the engine for at least a few months.
    Therefore it would be ideal if I could get this to work by making some change locally.

    Edit: Same issue happens on both 3.0.1, and 3.0.0. Made sure there was no FbxExporter folder before installing - after each uninstall, I shutdown Unity, rebooted, and verified no FbxExporter existed.

    Edit2: Thankfully 2.0.3 still works, but it seems less robust compared to how stable it was on 2019.2.6f1.

    Thx
     
    Last edited: Mar 4, 2020
  2. Peron803

    Peron803

    Joined:
    Feb 28, 2020
    Posts:
    1
    Same issues as you stated, it does not seem to work at all on 2019.3.2f1.
     
  3. Hanserw

    Hanserw

    Joined:
    Feb 3, 2014
    Posts:
    14
    @Peron803
    2.0.3 works

    Seems like versions 3.0 and up use a different FBX sdk. Neither of them work for me.

    @Unity
    This is the error I get 100% of the time when trying to export using 3.0.0 or 3.0.1 on 2019.3.2f1:

    DllNotFoundException: Packages/com.autodesk.fbx/Windows/UnityFbxSdkNative.dll
    Autodesk.Fbx.NativeMethods+SWIGExceptionHelper..cctor () (at Library/PackageCache/com.autodesk.fbx@3.0.0-preview.1/Runtime/Scripts/NativeMethods.cs:119)

    Maybe Unity forgot to commit the UnityFbxSdkNative.dll?

    Another thing that is strange is this:
    According to the package manager, FBX Exporter preview 2 - 3.0.1 is installed.
    BUT, according to the console some of the errors are referencing preview 1 - 3.0.0 :
    Autodesk.Fbx.NativeMethods+SWIGExceptionHelper..cctor () (at Library/PackageCache/com.autodesk.fbx@3.0.0-preview.1/Runtime/Scripts/NativeMethods.cs:119)
    Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
    Autodesk.Fbx.NativeMethods..cctor () (at Library/PackageCache/com.autodesk.fbx@3.0.0-preview.1/Runtime/Scripts/NativeMethods.cs:139)
    Rethrow as TypeInitializationException: The type initializer for 'Autodesk.Fbx.NativeMethods' threw an exception.
    Autodesk.Fbx.Globals..cctor () (at Library/PackageCache/com.autodesk.fbx@3.0.0-preview.1/Runtime/Scripts/Globals.cs:813)
    Rethrow as TypeInitializationException: The type initializer for 'Autodesk.Fbx.Globals' threw an exception.
     
    Last edited: Mar 6, 2020
  4. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    245
    The constants referencing the dll path have incorrect values. If you open the file "Library\PackageCache\com.autodesk.fbx@3.0.0-preview.1\Runtime\Scripts\NativeMethods.cs", and change the constant
    DllImportName
    with the value
    Packages/com.autodesk.fbx/Runtime/Plugins/x86_64/UnityFbxSdkNative.dll
    (or the equivalent constants and values for MacOS and Linux), the plugin will work again.
     
  5. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    245
    Alas, looks like it resets every time the project is opened...
     
  6. NeZ

    NeZ

    Joined:
    Feb 26, 2013
    Posts:
    2
    It looks like your fix seems to stick if you make the change here:
    C:\Users\USER\AppData\Local\Unity\cache\packages\packages.unity.com\com.autodesk.fbx@3.0.0-preview.1\Runtime\Scripts\NativeMethods.cs
     
    Trisibo likes this.
  7. CSDSAdmin

    CSDSAdmin

    Joined:
    Apr 26, 2018
    Posts:
    9
    can you give more info to the Non Coder where do you change this in the file
    it has DllImportName list afew times within NativeMethods.cs
     
  8. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    245
    Go to the line 243 in the document, or search for "const string DllImportName". There are the values for each operating system (below the line "#elif UNITY_EDITOR_OSX" for Mac, "#elif UNITY_EDITOR_LINUX" for Linux, and "#elif UNITY_EDITOR_WIN" for Windows; it's the OS that you use the editor on, not the game target OS).

    If you are on the Windows Unity editor, you have to change the line below
    #elif UNITY_EDITOR_WIN
    to
    const string DllImportName = "Packages/com.autodesk.fbx/Runtime/Plugins/x86_64/UnityFbxSdkNative.dll"
    . I haven't tested the Mac and Linux fixes, but they should be
    const string DllImportName = "Packages/com.autodesk.fbx/Runtime/Plugins/x86_64/UnityFbxSdkNative.bundle/Contents/MacOS/UnityFbxSdkNative"
    and
    const string DllImportName = "Packages/com.autodesk.fbx/Runtime/Plugins/x86_64/UnityFbxSdkNative.so"
    respectively.
     
    MrDenn and Metron like this.
  9. Mickey666Maus

    Mickey666Maus

    Joined:
    Apr 7, 2018
    Posts:
    1
    Thanks, that worked for me too!! Super helpful!!
     
  10. gghitman69

    gghitman69

    Joined:
    Mar 4, 2016
    Posts:
    93
    2019.3.6 no textures in fbx
     
  11. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Still a problem in latest export fbx (3.1.0-preview.2), but the solution still works! *thumbs up*
     
  12. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    116
    Doesn't work at all in 2020.1.5f.

    No errors no nothing.

    I select an item right mouse click export FBX.

    Just sits there.

    As usual, can't get any work done because I fight the endless avalanche of errors and problems.
     
  13. davidwhiffen

    davidwhiffen

    Joined:
    Sep 26, 2019
    Posts:
    14
    Having same problem
     
  14. david_3atista

    david_3atista

    Joined:
    Jun 1, 2021
    Posts:
    1
    unity is so bad bro
     
    gghitman69 likes this.
  15. Silver_Snow

    Silver_Snow

    Joined:
    Sep 18, 2022
    Posts:
    1
    Unfortunately, it does not look like this patch works anymore; at least fully in 2019.4.31f.

    Changing the path will allow the Export to FBX option to appear but attempting to export it, the system reports that the .dll is not located at that path:
    DllNotFoundException: Packages/com.autodesk.fbx/Runtime/Plugins/x86_64/UnityFbxSdkNative.dll


    I tried following the path of the .dll you listed and it doesn't exist:
    at Packages/com.autodesk.fbx/Runtime/Plugins/x86_64/UnityFbxSdkNative.dll


    I am unsure if this path means that within the project's Packages folder, it should exist or within the AppData/Local folder of Unity.
     
  16. suppertbw

    suppertbw

    Joined:
    Mar 16, 2016
    Posts:
    34
    I'm using FBX Exporter 5.0.0 and still encounter this issue, the annoying point is that my computer has no problem while all my colleagues have this issue!
     
    Last edited: Jun 8, 2023
  17. suppertbw

    suppertbw

    Joined:
    Mar 16, 2016
    Posts:
    34
    I'm using Unity2020.3.12f1 and FBX Exporter 5.0.0, this can't work T - T