RTS like development help

Hi, im doing a project for college with the theme “social network”.
But social network is so bland for my taste, so i thought i could “spice” things up with a rts like game that would be influenced by the number of “likes/dislikes” of posts.
The web part is more or less finished but since i never programed in c# before im kinda in a pinch.
how do i make a clickable building that would trigger a ingame window with the building stats?
Thanks in advance

You want to do something like this

Public Camera playerCam;

void Update (){
If(Input.GetMouseDown(0)){
OnMouseClick ();
}
}

void OnMouseClick (){
RaycastHit camRayHit;
If(Physics.Raycast(playerCam.transform.position, playerCam.transform.forward, out camRayHit, 1000)){
If(camRayHit.collider != Null){ If(camRayHit.collider.GetComponent()){
//Hit object is building
}
}
}
}

I apologize for the format I am on a mobile device