I my scene I have a sphere prefab with a script that captures mouse click raycasts.
When hit, it instantiates another sphere prefab with the same script, at a different position. It also parents that new object to itself. Works fine.
When I click on that second sphere, I would expect it to capture the click, to load a third sphere prefab and parent it to itself, as per its script.
Instead, I get four objects: the initial prefab, the second sphere parented to the initial one, the expected third one parented correctly to the second, and an extra one parented to the initial prefab. It’s as if both prefabs have captured the click and each has loaded its own sub-prefab.
Am I missing something on how raycasts propagate on parent-child hierarchy?
Or on how they work with clones?
I’m using 4.6 beta 20 - in case that’s not normal behavior.
Can someone shed some light on me?
Thnx.