Author Topic: error CS1955: The member `UICamera.hoveredObject'  (Read 4426 times)

KJIB

  • Guest
error CS1955: The member `UICamera.hoveredObject'
« 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?


JRoch

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
Re: error CS1955: The member `UICamera.hoveredObject'
« Reply #1 on: October 30, 2012, 11:11:04 AM »
Why are you using function syntax with a variable?  Remove those parentheses.

KJIB

  • Guest
Re: error CS1955: The member `UICamera.hoveredObject'
« Reply #2 on: October 31, 2012, 07:00:22 AM »
I knew it had to be something daft  :P

Thank you.