Get the Player that Clicked an Object in Multiplayer?

So, I’m using IPointerClickHandler on an object

 public void OnPointerClick(PointerEventData eventData) // 3
 {
     Debug.Log("Click!");
 }

This is a multiplayer game, so each play has a Player character. What would be the best way to get the player character that clicks an object? I’m hoping not to have global variables to do this.

Essentially each player has a tooltip that I want to populate with information on things they click.

If every Player has localAuthority you can use NetworkInstanceId https://docs.unity3d.com/ScriptReference/Networking.NetworkInstanceId.html. (I assume the script with the method OnPointerClick is a NetworkBehaviour

  public void OnPointerClick(PointerEventData eventData) // 3
  {
      CmdSendClickToServer(netId)
  }

[Command]
void CmdSendClickToServer(NetworkInstanceId Id)
{
     //I assume you have created a class called Player:
     Player clickingPlayer= NetworkServer.FindLocalObject(Id).GetComponent<Player>();
    
}

If you want to know the clicking Client directly you can also look into https://docs.unity3d.com/ScriptReference/Networking.NetworkConnection-connectionId.html. But if each Player has localAuthority, that would be redundant.

(Unity) I have a similar problem, but it is in a local structure, using the new Input System and the MultiplayerEventSystem. I have 4 players and they all have the same buttons for selection (in this case the same Root). How do I identify the player who pressed the button (OnClick)? I don’t know what kind of return parameter to ask to be able to link to the player who made the click action. If possible, could you briefly demonstrate a script? Thank you!