How can I manipulate a layer with click and drag functionality?

This works well on clicking layers but not click and dragging layers.

public class FishClicker : MonoBehaviour {

public LayerMask whatIsFish;

public float clickRadius = 0.1f;

void Update() {

    if (Input.GetMouseButtonDown(0)) {
        var mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
        var hit = Physics2D.OverlapCircle(mousePos, clickRadius, whatIsFish);

        if (hit != null) {
            var fish = hit.GetComponentInParent<Fish>();

            if (fish != null) { fish.DoClickThing(); }
        }
    }
}
}

“This works well on clicking layers but not click and dragging layers.”

Input.GetMouseButtonDown gets only called once, when you press button down (like it says).

You’ll have to use GetButton instead for continuous press of a button:

BTW - if you are doing something that is more like UI, consider using Canvas, Images and UI events.

Thank you and its not UI.