Author Topic: UIToggleObjects (not a bug) misuse  (Read 2719 times)

toqueteos

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 13
    • View Profile
UIToggleObjects (not a bug) misuse
« on: November 26, 2013, 08:32:37 AM »
It lacks a
  1. [RequireComponent(typeof(UIToggle))]
line, manually adding UIToggle works, of course, but this is clearly a requirement for UIToggleObjects to work.

EDIT: Changed title.
« Last Edit: November 26, 2013, 08:58:52 AM by toqueteos »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIToggleObjects bug
« Reply #1 on: November 26, 2013, 08:35:38 AM »
UIToggleObjects doesn't require a UIToggle to be present. You can have it be present anywhere -- such as a manager object, and have your toggle trigger a remote function in its onChange,

toqueteos

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: UIToggleObjects bug
« Reply #2 on: November 26, 2013, 08:57:38 AM »
UIToggleObjects doesn't require a UIToggle to be present. You can have it be present anywhere -- such as a manager object, and have your toggle trigger a remote function in its onChange,
That explains why my tabbed chat isn't working... I'm sorry, my bad.
Can I ask a related doubt with it here?

Explicative drawing:
« Last Edit: November 26, 2013, 09:04:46 AM by toqueteos »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIToggleObjects (not a bug) misuse
« Reply #3 on: November 26, 2013, 11:19:13 AM »
I would use the same input field for both. Just have a drop-down in front of it that selects whether the chat will go to everyone, or only to the player's team.

toqueteos

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: UIToggleObjects (not a bug) misuse
« Reply #4 on: November 26, 2013, 01:22:04 PM »
I would use the same input field for both. Just have a drop-down in front of it that selects whether the chat will go to everyone, or only to the player's team.
Nice! I just saw the new NGUI 3.0.6 video you made yesterday and it did help me with some things, plus this answer. So simple yet I was doing it so wrongly...

Thanks Aren!