Author Topic: Grouping 3D objects into one "clickable" Parent  (Read 3152 times)

Tuss

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 2
    • View Profile
Grouping 3D objects into one "clickable" Parent
« on: August 14, 2014, 04:37:52 PM »
Hi everyone, :)
I have a question on grouping 3D objects into one Parent.

EmptyGameObject
-> Cube
-> Cube
-> Cube

Using my hierarchy above as an example, I would like it so that clicking on any of the 3 Cubes will call the "On Click" message of their parent, WITHOUT the Cubes themselves having any NGUI components.

Is this possible?


Best

- Troy
« Last Edit: August 14, 2014, 06:18:56 PM by Tuss »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Grouping 3D objects into one "clickable" Parent
« Reply #1 on: August 15, 2014, 07:34:32 AM »
Put a rigidbody on it.

Might need the latest NGUI from the Pro repository though... I don't remember if it's a 3.7.0 feature or not. Might be, in which case -- wait for tonight's update.

Tuss

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Grouping 3D objects into one "clickable" Parent
« Reply #2 on: August 15, 2014, 01:38:59 PM »
Hi ArenMook,

At the moment, I have tried with just a rigidbody and it still won't pick up my click message, unless I add a collider to the EmptyGameObject.   However, I will try adding a rigidbody again with tonight's patch.

Thank you for the assistance.  : )

- Tuss