ganesh
October 3, 2012, 6:36am
1
hi to all
need help for onmousedown on children in parent then all childs will be false except cliking object…i have 50children of parent object suppose i am cliking particular children of parent then except cliking obj all childs will be false…
Regards,
Ganesh…
JackiM
October 3, 2012, 7:04am
2
what you want to do now? should false the all object or particular obj?
marata
October 3, 2012, 7:05am
3
Hi
I don’t know what do you mean with true and false.
If is about visibility use the enabled property on the MeshFilter component of the child, anyway you can use this suggest.
You can add a collider to each child, and use This script for getting the collision.
http://docs.unity3d.com/Documentation/ScriptReference/Camera.ScreenPointToRay.html
Then you can switch off all the childrens, using this
http://answers.unity3d.com/questions/10417/how-can-i-access-the-children-of-a-transform.html
At end you only turn on the selected child.
Hope this helps
except that cliking object all objects will be false
ganesh
October 3, 2012, 7:17am
5
yes andrew except that clicking particular children all childrens renderer will be false…
ganesh
October 3, 2012, 7:19am
6
javkim except that clicking particular children all childrens renderer will be false…