Visual debugging. Coloring components not working properly.
Describe the bug Coloring components on the entity does not work at a display scale of more than 100%.
To Reproduce Steps to reproduce the behavior:
- Entitas 1.14.1, Windows 11, Unity 2022.3.22f1.
- Go to display settings -> Scale & Layout -> Scale -> Set anything more than 100%.
- Open & Run your project with at least 1 entity -> Open visual debugging of an entity.
- Components on the entity are not coloring into different colors.
Expected behavior Components on the entity are coloring into different colors at any display scale.
Screenshots
Additional context To enable colors again you need to set scale to 100% and restart project. The problem is important because it is extremely inconvenient to use 100% scale on many monitors, due to the high resolution. The problem with exact same behaviour have been confirmed by at least three people besides me.
Hi, thanks for the issue. I removed colored components a while back when preparing Entitas 2.0. Versions after 1.14.x won't have colored components anymore. In case you want to patch it for your project, here's the code that creates the colored texture for boxstyle
https://github.com/sschmid/Entitas/blob/1.14.1/src/Entitas.VisualDebugging.Unity.Editor/src/Entity/Entity/EntityDrawerState.cs#L125-L156
and it's used when drawing a component here: https://github.com/sschmid/Entitas/blob/1.14.1/src/Entitas.VisualDebugging.Unity.Editor/src/Entity/Entity/EntityDrawer.cs#L151
Hi, thanks for getting in touch. Cool, I would try to work with this code. But, I still don't quite understand how I can make changes to the code, since I use Entitas from releases and the code is packaged in a dll.
By any chance, there are no recent instructions on how to use Entitas with source code in a project? I tried to replace the dll with the source code several times, but I encountered many errors.
How can the Visual debugging has worked? I'm using version 2022.3.15f1
And it has UI issue
Nvm: I've found the fix here: https://github.com/sschmid/Entitas/issues/1067