Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: mukulabdagiri on December 07, 2016, 11:56:50 AM
-
Hello,
I have a NGUI sprite, NGUI label and Rigidbody component attached to my gameobject. When I apply force to the rigidbody of my gameobject, only one of the UI components is affected. If I have both the components enabled, then force is applied to the sprite and if I disable the sprite, then force is applied to the label component. I need the force to get applied to all the NGUI components within the gameobject which has a rigidbody. What am i doing wrong or missing?
Thanks
-
Never mind. I put the sprite and label components in separate gameobjects and attached them to another container which has a rigidbody.
This solved the problem.
-
The rigidbody isn't required, but Unity doesn't like it when there is no rigidbody above a collider that can move around (as is the case with UI). That's the only reason NGUI adds rigidbodies to panels. As long as the root object has a rigidbody, you're fine.