Search Unity

Unity 5 sqlite3 Dll not found

Discussion in 'Editor & General Support' started by CodingStudios, Mar 25, 2015.

  1. CodingStudios

    CodingStudios

    Joined:
    Apr 19, 2010
    Posts:
    12
    I have converted a project from 4.6.2f to 5. Everything is working except for sqlite3. No matter what platform I build for or when I run in the editor I get the error "DllNotFoundException: sqlite3.dll".

    64bit Editor Settings (64bit_sqlite.PNG)
    64bit_sqlite.PNG

    32bit Editor Settings (32bit_sqlite.PNG)
    32bit_sqlite.PNG

    Thanks
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    Maybe one of the sqlite3.dll dependencies are missing? Also could you copy-paste the full error message, it should say something about GetDllDirectory.
     
  3. CodingStudios

    CodingStudios

    Joined:
    Apr 19, 2010
    Posts:
    12
    The full error message is below. This same setup worked fine with 4.6.2 so the dependencies should all be there.

    DllNotFoundException: sqlite3.dll
    SqliteDatabase.Open (System.String path) (at Assets/Scripts/Database/SqliteDatabase.cs:79)
    DatabaseController.GetAllNamesPerGroup (System.String groupName) (at Assets/Scripts/Database/DatabaseController.cs:61)
    GameManager.PopulateBlameList () (at Assets/Scripts/GameManager.cs:300)
    GameManager.runTabClicked () (at Assets/Scripts/GameManager.cs:208)
    GameManager.LogoClicked () (at Assets/Scripts/GameManager.cs:88)
    UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:110)
    UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:574)
    UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:716)
    UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:53)
    UnityEngine.UI.Button.Press () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:35)
    UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:44)
    UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:52)
    UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:269)
    UnityEngine.EventSystems.EventSystem:Update()
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    I haven't heard about such problem before, could you create a bug with repro case attached and paste the case number (not the link) here.
     
  5. CodingStudios

    CodingStudios

    Joined:
    Apr 19, 2010
    Posts:
    12
    Case 684118

    Thanks for your help!
     
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    Not sure what's wrong, but it seems you need to change
    [DllImport("sqlite3.dll")] to [DllImport("sqlite3")]
     
  7. CodingStudios

    CodingStudios

    Joined:
    Apr 19, 2010
    Posts:
    12
    That fixed the issue. I was able to test the editor and android. Thank you very much for the help.
     
  8. CodingStudios

    CodingStudios

    Joined:
    Apr 19, 2010
    Posts:
    12
    Since upgrading to 5.0.1f1 I now have the DLL not found issue again.
     
  9. CodingStudios

    CodingStudios

    Joined:
    Apr 19, 2010
    Posts:
    12
    Patch 5.1.2P3 and on has resolved the issue