open editor;
place a player and an enemy group (with no ammo for instance or allowdamage false for player);
place friendly/empty units apart;
Test the mission. When scrolling, you generally open weapon menu but also the reveal about kind of unit under the cursortarget.
It works for friendly & empty units, and doesn't seem to work for enemies. In fact, you obtain this information after a large amount of bullets in your direction or if you have a whatever unit in your group.