Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feedback Visual Studio 2019 insistent on removing Unity methods such as Start, LateUpdate

Discussion in 'Code Editors & IDEs' started by andrewhoke, May 29, 2019.

  1. andrewhoke

    andrewhoke

    Joined:
    Aug 29, 2018
    Posts:
    22
    Yet another issue with transitioning to 2019. :rolleyes: I've searched all over the internet and the only related discussion I can find to this is a Github issue on the Roslyn repo: https://github.com/dotnet/roslyn/issues/20242. There's no code style/formatting option to suppress IDE0051, "Remove unused member", which is especially egregious towards methods invoked by Unity during runtime, without globally supressing this warning through a suppression file, or littering my source files with #pragma pre-processor directives, both of which I consider worst-case scenarios to simply ignoring the IDE "warnings."

    If anyone has a solution other than what I've listed, I'm keen to hear it.
     
  2. detzt

    detzt

    Joined:
    Oct 6, 2018
    Posts:
    6
  3. Bip901

    Bip901

    Joined:
    May 18, 2017
    Posts:
    71
    Has anyone found a proper solution? I don't have ReSharper.
     
  4. I_Am_Err00r

    I_Am_Err00r

    Joined:
    Jul 9, 2018
    Posts:
    1
    The fix is simple.

    In Unity, go to the Edit=>Preference and then in that window click on the External Tools tab, and click Regenerate Project Files:

    upload_2020-11-13_12-18-45.png

    This happens when you upgrade Visual Studio.
     

    Attached Files: