SubjectNerd-Unity / ReorderableInspector

Automatic reorderable lists for Unity game engine components
MIT License
485 stars 47 forks source link

Context Buttons are gone after Recompile #10

Open hybridherbst opened 6 years ago

hybridherbst commented 6 years ago

1) have a script selected in the Inspector that has an [Reorderable] Attribute on a field 2) do any change in any script, causing Unity to recompile

Expected: Context Menu buttons are still there Actual: Context Menu buttons disappear. They appear again when the object is deselected and then selected again.

ChemiKhazi commented 5 years ago

Hmm, I can't seem to replicate this issue with a simple project. I don't have a lot of time to work on this repo now, but if you feel like making a more detailed bug report about what other plugins/extensions you have in your project I may be able to look into this more.

hybridherbst commented 5 years ago

Just tested again with the lastest from master.

Steps: 1) empty new project 2) import ReorderableInspector 3) create a script public class MyTestScript : MonoBehaviour { [ContextMenu("Some Method")] void DoSomething() {} } 4) put it on a GameObject image 5) have that GameObject still selected 6) edit the script (add a newline somewhere) in Visual Studio / other external editor 7) change focus back to Unity 8) for a moment, the compilation wheel spins and the button is still there 9) compilation ends and the button disappears image 10) de-selecting the GameObject and selecting it again makes the button reappear

Note that it seems that this happens to happen always with only ContextMenu and sometimes with both ReorderableAttribute and ContextMenu in the same script.

mages-gamedev commented 5 years ago

Just tested again with the lastest from master.

Steps:

  1. empty new project
  2. import ReorderableInspector
  3. create a script public class MyTestScript : MonoBehaviour { [ContextMenu("Some Method")] void DoSomething() {} }
  4. put it on a GameObject image
  5. have that GameObject still selected
  6. edit the script (add a newline somewhere) in Visual Studio / other external editor
  7. change focus back to Unity
  8. for a moment, the compilation wheel spins and the button is still there
  9. compilation ends and the button disappears image
  10. de-selecting the GameObject and selecting it again makes the button reappear

Note that it seems that this happens to happen always with only ContextMenu and sometimes with both ReorderableAttribute and ContextMenu in the same script.

I am also getting this with the latest master