- changed status to resolved
Drag and Drop on Fields with preview-field attribute doesn´t work
Hi, i made two fields with previewfield attribute- one for a sprite and one for a prefab. On both i can´t drag and drop things. On Sprite field - Drag and Drop a sprite Image - nothing happens - Drag and Drop a png - Unity crashes On GameObject(Prefab) field unity crashes when putting a prefab on it.
With select function from the preview window it works to select things but thats of cause a horrible workflow.
I´m on OSX, Unity 2017.3f
Comments (10)
-
-
It still doesn’t work in the latest version (2.1.13)
-
Hey, I’m still having this same problem. Seems like a really bad workflow, should be able to drag & drop.
-
Could you clarify the exact reproduction steps needed to cause this issue to appear? Drag and drop seems to work fine for PreviewField as far as I can tell, and the above steps do not seem to reproduce for us. Which OS is it on, which Unity version, etc. etc., and is it globally or only in certain scripts?
-
This does not work 3.0.12.0 and Unity 2020.2.7f1 on W10.
The field in the inspector is “[SerializeField] [PreviewField(150)] public Sprite ImageAndIcon;”
The Sprites I’m trying to d&d is marked as “Sprite (2D and UI”
I have to click the “Select” button and then search for the Sprite rather than drag n dropping it. So they are all the right types etc.
This has been an issue since 2018 sirenix / Odin Inspector / issues / #372 - Remove extra steps to sprite assignment when using the PreviewField attribute. — Bitbucket
-
Just upgraded Unity to 2020.3.24f1 and 3.0.12.0 still isn’t working.
-
How could it be resolved when it doesnt work.
I have an array of sprite pairs.
public class FeedItSpritePair { [PreviewField] public Sprite animal; [PreviewField] public Sprite food; }
And I cant drag and drop sprites. I’m able to do it without preview attribute applied.
Unity 2021.1.7f1This is what I have in editor. I cant drag sprite here. I had to click on picture and select from list.
-
I mentioned it in the Discord a month ago, nobody wanted to know
-
There is a way to use drag and drop feature for sprites by using “filter by type” button next to the search field in the project tab. This is not an exact solution but at least it will do the job.
-
The drag and drop issue is fixed and will be distributed in the next Odin release (Current: 3.0.13.0).
As for the crashes, I could not reproduce it with the provided information.
Feel free to reopen this ticket if you’re still encountering crashes and share the necessary reproduction steps. - Log in to comment
Resolved in the next major release of Odin, 2.0 (formerly known as 1.1).