How to display material name by hovering mouse

Help me. Thank you!
The editor has the same effect,I want to display the name after hovering over the material。It’s very important to me. I’ve been working overtime for 17 days。

Add bounding box to the element. And when the ray cast from the camera to the mouse pointer hit the target just show the name.
See this in a way how button works.

I am not sure if these are optimized solution but I think it will work.

thank you!I use imported 3D model, this method is not applicable

you can use the Picker to pick the object under the mouse.

This gives you a mesh instance under the mouse cursor. You can access the material on it as well, and likely find out its asset name too.

example: PlayCanvas Examples