Search Unity

[Rant] Unity QA's inadequate responses to a simple issue with OnTriggerStay2D

Discussion in '2D' started by idunlop_oefun, Jul 5, 2018.

  1. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    While using OnTriggerStay2D I noticed that is very unreliable. After investigating it further I discovered that it only works with Rigidbodies that are awake. If they go to sleep they stop calling OnTriggerStay2D.

    I created a simple test case and reported the bug. Only to be told that it's by-design (for performance reasons), it's been like that since day 1 and it's NOT a bug.

    QA, do you realize why we report bugs? We are stuck, have issues, want to make Unity a better product (there are many reasons); so when we get back a (paraphrasing) - you're outta luck / it's not a bug, that is very disheartening.

    The documentation clearly states: "Sent each frame where another object is within a trigger collider attached to this object (2D physics only)". It mentions nothing about sleeping rigid bodies or workarounds (you can set the Rigidbody2D to 'never sleep') nor why it works this way. In short it leaves you with just the right amount of information to make you think it's a useful API and waste hours of time. Thanks Unity!

    Here's a tip for QA - if you get a report from a user about a "bug" and determine that it's not really a bug - don't just say that in the reply. Go ahead and let us know that you're going to update the documentation to make things easier in the future.

    FWIW, OnTriggerStay2D might not be the most efficient thing to use in your code - but it should work as advertised (or at the very least the reference documentation should advertise the correct purpose or use of).
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    The person you spoke with may be unaware that this information is missing from the documentation.

    If you go to the documentation page, there is a link at the bottom to report an issue with it. You could try requesting to add this information from there.
     
    Thorlar likes this.
  3. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    My point / rant is that; the response I got isn't good enough. If QA decides that the issue isn't a bug - then *they* need to determine if their documentation should be updated. If you look at the reference documentation it's lacking details (in a lot of places). How would I know the documentation is incomplete? This morning I thought it was a bonafide bug... (actually I still do).

    FYI, QA is now stating that they will update the documentation.