d4rkc0d3r / d4rkAvatarOptimizer

d4rkpl4y3r's VRChat Avatar 3.0 optimizer
MIT License
368 stars 16 forks source link

d4rk's inspector breaks components inserted below it when an exception is thrown during render #104

Closed SenkyDragon closed 3 months ago

SenkyDragon commented 3 months ago

Add a d4rk optimizer component, then add any component to the same object afterward, and the inspector will be broken until refocused.

image

d4rkc0d3r commented 3 months ago

Doesn't happen for me. Layouting issues can often be caused by another tool and are really hard to debug. I blame something else overwriting one of the built in gui styles unless there is more info that directly points to what I might be doing wrong here.

SenkyDragon commented 3 months ago

Update: This happened because of #102 . Seems that if an exception is thrown during the rendering of the editor, that's what causes the inspector to blow up. Not sure if there's a good way to resolve this issue (aside from wrapping.... basically everything individually in a try catch), but it is a good reason for d4rk to be using UIElements (which has been available since at least 2017) rather than IMGUI. It would probably require a pretty big rewrite of the editor though.

d4rkc0d3r commented 3 months ago

Thanks for the info. That actually makes a lot of sense. I'll close this as won't fix though as its really just making crashes worse. But crashes shouldn't happen to begin with. I also have no plans to rewrite the editor to using UIElements.