Due to project requirements, you need to use a mouse click to implement sliding events, viewing the official documentation on the Input.getmousebutton section.
Getmousebutton: Each frame of the mouse in the pressed state will return True,input.getmousebutton (0): The left mouse button press, Input.getmousebutton (1): The right mouse button is pressed, Input.getmousebutton (2): Indicates the middle mouse button is pressed
Getmousebuttondown: The mouse button down the frame returned True,input.getmousebuttondown (0): The left mouse button press, Input.getmousebuttondown (1): The right mouse button down, Input.getmousebuttondown (2): Indicates the middle mouse button is pressed
Getmousebuttonup: The mouse button down the frame returned True,input.getmousebuttonup (0): The left mouse button press, Input.getmousebuttonup (1): The right mouse button down, Input.getmousebuttonup (2): Indicates the middle mouse button is pressed
The position of the mouse down and lifted can be obtained by input.mouseposition, but this parameter returns the screen coordinate position, which is the coordinate system with the bottom left corner as the origin point.