Unity3d: Drag & Drop setting not installed

I was working on a Unity 2D game project on OS X 10.10 and I cannot drag a file or folder, it will show this error.

No Drag&Drop has been setup. Please
UnityEditor.DockArea:OnGUI()

I tried:

  • save the project and then reload
  • click Assetsfolder and selectReimport All

But it doesn't seem to work, how to fix it?

+4
source share
6 answers

Unity uses NSPasteboard (the general OSX clipboard manager) to store data for Drag & Drop, so any process that controls / modifies the clipboard can be messy with Drag & Drop.

, Chrome, , - . google chrome, Unity, google chrome.

: , , ,

Unity pboard Unity.

, .

+4

, Unity pboard , Unity, .

+9

Sinyo, script, , . [ Mac] Unity, pboard, Unity.

#!/bin/sh

osascript -e 'quit app "Unity"'

pid=$(ps -fe | grep 'pboard' | grep -v grep | awk '{print $2}')
if [[ -n $pid ]]; then
    kill $pid
else
    echo "Does not exist"
fi
osascript -e 'launch the application "Unity"'
+1

, , , . " Drag & Drop" , , . , . , DragAndDrop.SetGenericData() mouseDown. , MouseDrag , DragAndDrop ( DragAndDrop.GetGenericData()). null, MouseDrag DragAndDrop.StartDrag(). . , - .

0

Based on @ user3130047 answer, this is another version. Mac only.

  • Get out of unity.
  • Place this command in the console and execute it.

    ps aux | grep pboard | grep -v grep | awk '{print $2}' | xargs kill -9 | launchctl start com.apple.pboard
  • Open unity.


It.

But this can lead to your other open copy of applications and pasting not working. Therefore, you need to restart them.

0
source

This is the easiest way to accomplish the best answer:

killall -HUP pboard

(from a terminal or similar, obviously)

0
source

Source: https://habr.com/ru/post/1605982/


All Articles