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

Event.current is NULL

Discussion in 'Scripting' started by Dark-Protocol, Jan 30, 2013.

  1. Dark-Protocol

    Dark-Protocol

    Joined:
    Nov 19, 2011
    Posts:
    279
    Today I ran across a very weird issue that has never happened to me before. I opened Unity and ran a test of the scene, the console started to show Null Reference Exception errors. I looked the code, did some debugging and I finally cut to the core of the problem - Event.current returns Null. I don't know what, I haven't touched anything in the project, nor in Unity's settings. Tried to search for that problem in internet, but nobody seems to have had this error before. Whatever I do, Event.current gives a null value. What can be causing this?
     
    blox5000 likes this.
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Using it outside OnGUI.

    --Eric
     
    mishasniper and blox5000 like this.