- Home /
Weird bug when dragging object onto EditorGUILayout.ObjectField
Hello, In my custom editor window I have several Object fields (EditorGUILayout.ObjectField) and there is one object field which accepts objects of a type I created called AssetData. The line of code for the object field is as follows:
assetData = (AssetData)EditorGUILayout.ObjectField(assetData, typeof(AssetData), false);
For some reason for an object to be placed in the field it has to be dragged there twice. Any idea why? Thanks, Elad
Your answer
![](https://koobas.hobune.stream/wayback/20220612134311im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Editor window doesn't open 2 Answers
Changes to Object made in custom Editor Window don't persist 0 Answers
Dynamic content in custom EditorWindow 1 Answer
Enter to "set name in hierarchy" mode via script 0 Answers
Is there a way to avoid the Animation window drop-down menu with a selected Animator? 0 Answers