Search Unity

Add reference to UnityEngine.CoreModule

Discussion in 'Scripting' started by Govedo_xaos, Feb 20, 2018.

  1. Govedo_xaos

    Govedo_xaos

    Joined:
    Apr 6, 2014
    Posts:
    2
    Hello everyone,

    Hope I'm posting in the right section for this type of question, if not I apologize, and feel free to move the thread.

    Unity version: Unity 2017.3.1f1 (64-bit)
    Code is from unity 2d kit, the script in question was not modified
    Here is an image with the error message: https://imgur.com/a/iq7VF

    The .dll really isn't present so I've tried downloading it and adding it manually to the project.
    That led to messages about monodevelop being declared both in UnityEngine.dll and the UnityEngine.CoreModule.dll . So I tracked down the "alternate" UnityEngine.dll module as well but then I got a missing UnityEngine.AnimationModule.dll . And theat led to a whole lot of other dll's gettin downloaded and every time getting either a duplicate declaration or a missing declaration with various combinations of dll's included.

    So what would be the proper way to fix this?
     
    GeorgeAdamon likes this.
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    Is this only in MonoDevelop, or are you getting the error in the in-editor console?
     
  4. Govedo_xaos

    Govedo_xaos

    Joined:
    Apr 6, 2014
    Posts:
    2
    @Joe-Censored yeah It looks related

    @Baste Only in MonoDevelop, if I comment out the method it compiles fine
     
  5. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    I'd recommend dropping MonoDevelop, then. If this is compiling in Unity, it's MonoDevelop that's dropping the ball, and I promise you it won't be the last time. It's never really worked. Unity's also stopping their support of it.

    As a last resort, you could delete all of your .sln and .csproj files from the project directory. Those are regenerated by Unity, so they're safe to delete, but sometimes they end up in a state that messes with IDEs.


    Both Visual Studio and Visual Studio Code are popular products, and both are free. Rider's great, but not free.Any of those will probably serve you a lot better than MonoDevelop.
     
  6. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    I'm getting the same issue while trying to build a DLL in Visual Studio Community 2017.

    I have UnityEngine.DLL referenced, but it wants "UnityEngine.CoreModule".
     
  7. nyashafrank145

    nyashafrank145

    Joined:
    Sep 29, 2019
    Posts:
    4
    Were you able to resolve this?
     
  8. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    Nope. Gave up.
     
  9. Krantzzen

    Krantzzen

    Joined:
    Feb 13, 2022
    Posts:
    1
    If it's any consolation I have the same problem (3 years after this last post)... I have a type that, according to the UNITY API (and everyone else), should exist within UnityEngine.CoreModule and therefore EXIST in UnityEngine. but it doesn't work:( feels sadge.
     
    MagiJedi likes this.
  10. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    And that's a necro. Could've just created your own thread as your issue with it is different than OP's.

    The UnityEngine.CoreModule.dll contains the
    Vector2Int
    , so I don't know what you're on about. Are you referencing the right dll?
    Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
     
    kharyfiler likes this.
  11. AbdullaMousawi

    AbdullaMousawi

    Joined:
    Nov 12, 2020
    Posts:
    2
    I had the same problem and I fixed it by referencing all the DLL files from
    C:\Program Files\Unity\Hub\Editor\2021.3.16f1\Editor\Data\Managed\UnityEngine
    (Your path on your computer may look different)

    Note: I am making a custom library to use with Unity. I faced this problem in my custom library project (not in a Unity project).

    upload_2022-12-20_21-45-14.png
     
    TonCoder likes this.