|
I have this function from an old Javascript I wrote. I want to reuse it in a new script written in C# (2nd script below). The script is assigned to the parent and its children. I need to tell the children that they are selected.
(comments are locked)
|
|
Given you are using the two different languages you are best of sending a message to the other script and passing the value. Child: When you use scripts in different languages it is hard to integrate them as they are compiled separately. I'm not using the scripts together. I'm wanting to re-use a feature from the *.js in a C# script.
Jul 24 '12 at 05:58 PM
Stridulent
So you are dumping the JS? In that case you want to get the component in the foreach loop
Jul 24 '12 at 06:05 PM
whydoidoit
Thanks, that did the trick. I added the same to the "scan" variable so that if the child is selected, it can tell the parent to be selected too.
Jul 24 '12 at 07:06 PM
Stridulent
(comments are locked)
|
|
Here is what I have now. When the parent object is hovered, it highlights all the children. When a child is hovered, it highlights itself and the parent but not the other children. What am I missing, so that all children are highlighted when one child is mouseovered? You want to do scan.GetComponentsInChildren() I think
Jul 24 '12 at 08:42 PM
whydoidoit
Did not work in the spots that I thought you meant. Where were you thinking of putting that line? And do I attach the IdentifiableObject script in " < > "?
Jul 26 '12 at 01:21 AM
Stridulent
(comments are locked)
|
