How to Instantiate prefab when dragging an object through a specific area?

I have an inventory panel and I want to know how to instantiate a prefab every time I drag an object out of it. When the object crosses the border of the panel, it turns into a prefab and turns back to the object when it crosses back in.

Good day.

You are asking fora lot of things in only one question. I suggest you to look for tutorials and manuals of this things:

https://docs.unity3d.com/ScriptReference/Object.Instantiate.html()

You only need to detect the mouse position, know when is over the map

Then know what world position is the position of the mouse

Then detect when the player click with the mouse

Then instantiate there the real prefab object

Bye.