object follow mouse

hello,

i need a editor script that when i select a object in de project window, and when i go in de scene window with my mouse.
The object what i have selected must follow my mouse. when i click on my left mouse button it place the game object on that position in the scene window.

can anybody help me with this??

Not sure I understand what you need. You want to be able to pick up items in your game? Unity comes with a script for that.

Not in game, i’m creating an editor script.

I’m not sure you could do that. Drag drop normally works (when picking the right kind of asset) but I doubt there is such thing out of the box.

Perhaps you could accomplish this by monitoring mouse moves over the Scene view, while tracking the last selection in project view (available from EditorWindow subclasses).

See EditorWindow.OnSelectionChange.