jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
111 stars 27 forks source link

Visual bug with dictionaries #122

Closed sarkahn closed 9 years ago

sarkahn commented 9 years ago

Having a weird visual bug where removing an element from the middle of a dictionary which uses > 1 line values causes some really annoying overlap that makes it impossible to keep working. It seems to be purely visual but the only way to fix it is to enter/exit play mode.

Example: http://gfycat.com/ExcellentMammothBooby

Code I was using to reproduce:

public class DictHaver : FullInspector.BaseBehavior
{
    public Dictionary<string, DumbStruct> dict_;

    public struct DumbStruct
    {
        public int i_;
        public string str_;
        public List<int> ints_;
    }
 }
jacobdufault commented 9 years ago

Okay, thanks - this looks like some metadata is getting corrupted. I'll be able to take a look in a few days.

jacobdufault commented 9 years ago

Can you try changing fiGraphMetadata.cs line 260 from

copiedGraphs.Add(metadata._childrenInt[i]);

to

copiedGraphs.Add(metadata._childrenInt[migrations[i].OldIndex]);

Thanks

sarkahn commented 9 years ago

Just tried it. Appears to have fixed the issue, thanks!

jacobdufault commented 9 years ago

Awesome! Thanks