i know its supposed to be easy but it doesn’t work as i expected to
instead of one at a time on item clicked
i know its supposed to be easy but it doesn’t work as i expected to
You need to detail more what you are trying to do, it is not clear.
There are some functions to get actors under cursor: Get Hit Result Under Cursor for Objects | Unreal Engine Documentation
You have to store the default materials of a static mesh component somewhere, so you can reapply the good material once you deselect. Applying “none” is not a good solution.
and for the attribute two part
so my Q is how do I make selection with one element is highlighted each time with its his attribute
You need to store the last actor you have “Highlighted” (1).
If this actor is not empty you first have to “de Highlight” it (2): that means you need to store the original material that was stored on your static mesh component of your actor, something you should do in step (3). Then you need to reapply all the original materials to your static mesh components. To be done in step (2) but not fully shown on the screenshot.
Please note that some actors have static mesh component but are not static mesh actors, so instead of casting to a static mesh actor you should get all static mesh component on actor (2) and (3)
Once you have “de highlighted” your last Hit actor you got to step (3):