mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

GUI Bug on VectorTileFactory in inspector

Open doerrdude opened this issue 9 years ago • 6 comments

When adding Visualizers to a VectorTileFactory the only way that works is clicking Add New Empty - Find Asset - Selecting desired Visualizer. If I try to Drag & Drop or tap the circle and selecting from list, a Visualizer is not added. Using Unity 2017.2.0f3 + Mapbox SDK v1.2.0.

doerrdude avatar Nov 06 '17 21:11 doerrdude

I was aware of the circl assignment not working but didn't notice draw&drop in layer visualiser. I'm afraid we have bunch of issues like this and it's mainly because I'm really not good at editor coding and was /is ust learning while doing those. I actually tried to remove objcet field to remove that small circle all together but then you lose double click navigation as well so decided not to do it. Another big issue for me, regarding inspectors is that we don't have "duplicate" option on arrays anymore and it's a pain to insert a new modifier at the top of the list.

@apavani @lauri-rustanius @atripathi-mb do you have any experience in editor stuff?

brnkhy avatar Nov 07 '17 17:11 brnkhy

While I don't have much experience with editor scripting, I would certainly be happy to help with editor tooling design and implementation

apavani avatar Nov 07 '17 20:11 apavani

@brnkhy nope, don't have any experience coding with GUI. Will try to help to the best of my abilities though.

doerrdude avatar Nov 14 '17 23:11 doerrdude

Updates on this? Is the only option to use an older mapbox sdk version? Anyone solved or found a workaround?

thestubborndev avatar Nov 30 '17 23:11 thestubborndev

This issue was happening because the array never gets updated after a user has dragged and dropped or selected a modifier stack using the browse button circle Instead of just updating the GUI, the array needs to be reassigned with the newly dragged and dropper modifier.

So, instead of this

EditorGUILayout.ObjectField(_layerVis.Stacks[i].Stack, typeof(ModifierStackBase), true);

Do this:

_layerVis.Stacks[i].Stack = (ModifierStackBase)EditorGUILayout.ObjectField(_layerVis.Stacks[i].Stack, typeof(ModifierStackBase), true);

apavani avatar Dec 01 '17 21:12 apavani

Good, when will this change be added in a stable build of the SDK? I need this for mentoring a client, should I just go on and build from source with this edit?

thestubborndev avatar Dec 01 '17 22:12 thestubborndev