I have a model of human body which consists of hundreds of sub-models (muscles).
I want to click on the sub-model and get its name.
Basically, I know two possible solutions.
- To create stupid script OnButtonDown for every single sub-model.. which is insane.
- Create script using raycasting
I've tried the second one, didn't work for my sub-models.
As for the first one, I was thinking whether there is some kind of inheritance.. that I could move one script for Model and it would be applied on all its sub-models. I was trying to find the way to do that, but I have failed.
Any Ideas?