How are people handling basic mouse events?

Like how are people handling click, hover, drag, etc. for entities?

System that reads required inputs and writes them to a component to be used.

Hey, thanks tertle for the reply! It’s not clear to me what the optimal way to set this up would be. Could you show me an example?

Say I have a 5 cubes, what’s a good way to know which one I clicked using ECS?

I use Unity.Physics CollisionWorld.CastRay to determine what’s under the mouse. You can then determine if dragging, hovering etc with Input class.

Oh I misinterpreted what you meant. I totally forgot those mouse events were a thing tbh, I haven’t used them in years.