Hi. Hope this is quick since it seems like an easy question.
I have two objects in a parent/child hierarchy that I created by dragging one object onto another in the Unity editor then saving the whole thing as a prefab. The child object has a visual aspect to it, but not the object it is under.
In a new scene I am scaling the prefab in the X direction. This visually scales the child object as well. What I would like to do is have the child object detect how much the top object is scaled by in the X direction, then divide its own scale by that number.
So if I were to scale the prefab to 5 in the X direction, the child in the prefab would (upon playing the scene) divide its X scale by 5.
What do I put on the second object to have it find the first object's scale? I'm not sure if it is considered a true parent/child relationship in the javascript since I did not make that distinction in code. Once I have the scale of the "parent" I'm golden since the rest is just division.
Thanks!