It's already been said TCAS is not a radar, but how come it knows the bearing, and how does it work with the different transponder types?
Radar
A basic ground secondary surveillance radar sends an interrogation signal as it sweeps the sky, and the transponders in the direction of sending reply.
TCAS
A TCAS system is similar, by having an on board directional antenna, the plane sends interrogation signals, and airborne transponders reply to it.
The reply delay would indicate the distance, the reply will contain the barometric pressure (which is used to discern the altitude difference), and the directional antenna will display the relative bearing.
The bearing is informative only (for display), and its resolution is not used in the decision making.

White diamonds show other traffic with +/- relative altitude in hundreds of feet and arrows would indicate climb/descent (flickr.com).
Cooperative
The TCAS' decision (conflict resolution advice) can be cooperative as well in Mode S. So if a TCAS of one plane says "climb", this information is sent, so the other TCAS in conflict would order the opposite, for example.
Once an RA has been issued, the vertical sense (direction) of the RA is coordinated with other ACAS II equipped aircraft via a mode S link, so that two aircraft choose complementary manoeuvres. (SKYbrary)
Drones
So if the unmanned aerial vehicle does not have at least a barometric transponder (Mode C) system, TCAS equipped aircraft won't offer conflict resolution.
ACAS II will not detect non-transponder-equipped aircraft and will not issue any resolution advice for traffic without altitude reporting transponder. (SKYbrary)
ADS-B
But what about having only an ADS-B transponder on the UAV? TCAS still needs Mode C/S on the other plane, ADS-B only permits fewer interrogations.
Hybrid surveillance does not make use of ADS–B's aircraft flight information in the TCAS conflict detection algorithms; ADS–B is used only to identify aircraft that can safely be interrogated at a lower rate. (Wikipedia)
Further reading: https://www.skybrary.aero/index.php/Airborne_Collision_Avoidance_System_(ACAS)