Author Topic: Can you include a list of delegate functions (which NGUI will call via Buttons)  (Read 1648 times)

zippo227

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 55
    • View Profile
I often use find references to see all the places in my code where a function is called. This doesn't work for NGUI because the list of referenced functions is not stored in a file that Mono Develop can parse through. Even if it were in a simple text file (but a more elegant solution would be preferred), it would would be extremely useful for NGUI to save the list of function delegates that it references in button clicks, slider moves, etc. Having those function calls so separated from the code and the editor requires that the developer have explicit knowledge of all the buttons in the game.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
What do you mean? You can set just about any function to be called via an NGUI delegate such as the button's On Click notification. To be able to choose the function it should be public, and have a void return type, but that's about it. Parameters are up to you.

zippo227

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 55
    • View Profile
What do you mean? You can set just about any function to be called via an NGUI delegate such as the button's On Click notification. To be able to choose the function it should be public, and have a void return type, but that's about it. Parameters are up to you.

Apologies for my late response: was on vacation. This is not about setting the function delegates; it's about keeping track of them. The problem is that it can be difficult to find which NGUI objects call a certain function. I would like a way to easily list all of the objects that call a certain function. As it is, you have you manually look through your objects. Is there a way to export a list of OnClick function delegates and their associated game objects?
« Last Edit: May 15, 2014, 04:48:32 PM by zippo227 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
I see. No, there is no built-in functionality for something like this, but I'll give it some thought.