OnMouseEnter Event for Group

Hello ,

I’m trying to apply “OnMouseEnter” event for my building design. what i need is , whenever Mouse over to the any floor, other floors will fade-out.

I wrote Script “Hide.cs” and it’s worked for direct Mesh Render objects. (ModelWithStages.rar)

But the issue is , the building have different levels of Groups(floor==>room) and then direct Mesh Renderer.
(issue.png)

Please help me, how to enable “OnMouseEnter” event for Groups.

Thanks

2243760–149814–Hide.cs (3.69 KB)
2243760–149815–ModelWithStages.rar (41.2 KB)

What about using transform.parent to find the group the floor belongs to?

1 Like