Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to disable specific warning

Discussion in 'Scripting' started by XukeLho, Jan 13, 2022.

Thread Status:
Not open for further replies.
  1. XukeLho

    XukeLho

    Joined:
    Dec 30, 2014
    Posts:
    199
    I'd like to disable this warning:
    "NavMeshAgent and NavMeshObstacle components are active at the same time. This can lead to erroneous behavior."
    Yes I understand the risks of using both components on the same object, but I have a manager for doing so.
    I've tried #pragma warning disable/restore but with no success (as expected as these are for specific error codes)
    I'd like to disable this warning only on the gameobject that I am currently using it on, as if I mix NavMeshAgent and NavMeshObstacle in the future in a different object, I'd like to receive that warning again, to remind me to be sure that I want to do that, or to remind me it was a mistake.

    EDIT: Question moved to subforum here: https://forum.unity.com/threads/how-to-disable-specific-warning.1224822/
     
    Last edited: Jan 14, 2022
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,316
    Wouldn't you be better off asking on the Navigation sub-forum here?
     
  3. XukeLho

    XukeLho

    Joined:
    Dec 30, 2014
    Posts:
    199
    Will do!
    Thanks!
     
Thread Status:
Not open for further replies.