Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: KJIB on October 30, 2012, 10:12:26 AM

Title: error CS1955: The member `UICamera.hoveredObject'
Post by: KJIB on October 30, 2012, 10:12:26 AM
I am trying to access the static member of UICamera, UICamera.hoveredObject(). I have this code in a function:

  1. if (UICamera.hoveredObject() == null)
  2. {
  3.    // Do stuff while NGUI is not over a UI item
  4.    ...
  5. }
  6.  

I get this error from Unity:
  1. Assets/Code/PlayMaker and NGUI extras/ObjectPicker.cs(187,38): error CS1955: The member `UICamera.hoveredObject' cannot be used as method or delegate

NGUI is in the default location (Assets/NGUI). I don't want to put my code in with NGUI because the code is not specifically for NGUI (it works with other things too). What simple thing is it that I am not doing to get rid of the error? I use similar statics with no problem elsewhere, what is my mistake?

Title: Re: error CS1955: The member `UICamera.hoveredObject'
Post by: JRoch on October 30, 2012, 11:11:04 AM
Why are you using function syntax with a variable?  Remove those parentheses.
Title: Re: error CS1955: The member `UICamera.hoveredObject'
Post by: KJIB on October 31, 2012, 07:00:22 AM
I knew it had to be something daft  :P

Thank you.