Dreadrith / HierarchyPlus

A general improvement to the unity hierarchy such as component icons, guide lines, row coloring and settings for customization.
GNU General Public License v3.0
35 stars 4 forks source link

[WARN] warning CS0162: Unreachable code detected #10

Closed JustBuddy closed 5 months ago

JustBuddy commented 5 months ago

Noticed H+ throws this warning when loaded. Packages\com.dreadscripts.hierarchyplus\Editor\SavedSettings.cs(67,10): warning CS0162: Unreachable code detected

JustBuddy commented 5 months ago

Seems to only appear in 2019 on 1.2.1

Dreadrith commented 5 months ago

As it mentions, it's due to the SavedSettings class. I didn't remove it during open sourcing but it's because it's using a const bool as a condition, meaning the condition is always true/false and never the other. I had it that way because I reuse the code often and it's easy to just switch the bool. It's safe to delete the bool and modify the condition code to always run one way.