u3d-community / U3D

Open-source, cross-platform 2D and 3D game engine built in C++
https://u3d.io
MIT License
160 stars 26 forks source link

Fix for EditorResourceBrowser not showing resource types #45

Closed lucasvinbr closed 1 year ago

lucasvinbr commented 1 year ago

Apparently, only the first "get" in the chain of conditions was setting and keeping the value of the fileType variable, so only some of the resources were being shown correctly. If we changed the order of conditions and, for example, put GetBinaryType before GetExtensionType, then another group of resources would display correctly, and the previous one would break. Separating the checks in if statements seems to fix the issue, making all 3 groups show their types correctly.

I think this is related to the angelscript update, since I don't remember having this issue in base Urho