Search Unity

Unity cancels references

Discussion in 'Scripting' started by namets, May 19, 2022.

  1. namets

    namets

    Joined:
    Apr 3, 2022
    Posts:
    2
    I have a Unity project and a Visual Studio project set to the same folder. I am trying to run a C# script that uses MongoDB drivers through Unity. For some reason, when I build the project in Visual Studio, the Unity project does not find the references to a Visual Studio driver:

    upload_2022-5-19_19-20-41.png

    I tried importing the .dll files straight to the Assets/Plugins, but that gave more import errors because the .dll files aren't made for Unity as far as I understand. Please help!
     
  2. namets

    namets

    Joined:
    Apr 3, 2022
    Posts:
    2
    The Visual Studio reference is fine.

    upload_2022-5-19_19-25-53.png
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    You're probably going to need to seek up a MongoDB implementation that is explicitly meant for Unity. Just because it's for C#, doesn't mean it will make Unity happy.

    If you're confident this package IS meant for use in Unity, go back to where you got it from and make sure you did all the things necessary to use it, correct versions, etc.