how to drag gameobject in specific area ?

i already created a c# script to drag and drop gameobjects with GUI but i need to specify area to drop them …

Hi,

it will depend on your script - but you could specify a MIN/MAX X and MIN/MAX Y position and when you release the mouse button it would check if the object is between this min and max before releasing it.

Or you could raycast below the object you are dragging and only authorize release when it hits and object tagged as drop area.
This would be the best out of UI - I use this for building placement - but not sure if it will work in UI -

I would also recommend to add a small sprite showing item is not releasable - and hide it when it is.

hope this helps,