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

These Null Pointer Exceptions Tell Me Nothing?

Discussion in 'UGUI & TextMesh Pro' started by DESTRUKTORR, Aug 28, 2014.

  1. DESTRUKTORR

    DESTRUKTORR

    Joined:
    Jul 4, 2012
    Posts:
    22
    I'm assuming this has something to do with the fact that the UnityEvents run on delegates, but every time I get a null pointer exception, rather than pointing to the actual origin of the exception in the code, the error in the console simply states that there was an exception in the event. Here's an example:

    Code (CSharp):
    1. Type IPointerClickHandler expected Button received. i:0. Object reference not set to an instance of an object
    2. UnityEngine.EventSystems.EventSystem:Update()
    Is this a bug? Or is this actually supposed to happen? Because I would like it if it could tell me at least a bit more about which specific method caused the error, if not the exact line it occurred on.
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,181
    Hi are you using b18? this error message should be improved there.
     
  3. DESTRUKTORR

    DESTRUKTORR

    Joined:
    Jul 4, 2012
    Posts:
    22
    I was unaware b18 was out yet o_O When I use "check for updates" from the help menu, it tells me that my current version is up to date. Where should I be looking to check to see if I'm using the most recent version?
     
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,181
    There is a sticky post at the top of this forum :)
     
  5. DESTRUKTORR

    DESTRUKTORR

    Joined:
    Jul 4, 2012
    Posts:
    22
    Fair enough XD Thank you.