Author Topic: OnSelectionChange  (Read 2067 times)

xikky

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 46
    • View Profile
OnSelectionChange
« on: March 20, 2013, 01:49:11 PM »
I'm having problems to use this event with UIPopUpList. I am thinking this works the same as OnClick() with button, but I cannot get OnSelectionChange() to work. I'm afraid got more confused with the Localization example. I don't wish to use event receiver. Or do I have to?

currently I attached a script (javascript) to UIPopUpList gameobject and included the following code to it:

function OnSelectionChange() {
 print("x");
}

On selection change nothing is happening. Can anyone help pls here?

xikky

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 46
    • View Profile
Re: OnSelectionChange
« Reply #1 on: March 21, 2013, 10:13:14 AM »
Anyone pls? I know this might be a very simple question but I cannot get this to work.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: OnSelectionChange
« Reply #2 on: March 21, 2013, 10:52:21 AM »
You need to specify the game object that has the script with your function.

xikky

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 46
    • View Profile
Re: OnSelectionChange
« Reply #3 on: March 21, 2013, 03:32:46 PM »
Thank you