Entitas icon indicating copy to clipboard operation
Entitas copied to clipboard

Visual debugging. Coloring components not working properly.

Open OutdoorHawk opened this issue 1 year ago • 4 comments

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:

  1. Entitas 1.14.1, Windows 11, Unity 2022.3.22f1.
  2. Go to display settings -> Scale & Layout -> Scale -> Set anything more than 100%.
  3. Open & Run your project with at least 1 entity -> Open visual debugging of an entity.
  4. 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 image image image

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.

OutdoorHawk avatar May 19 '24 12:05 OutdoorHawk

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

sschmid avatar May 22 '24 08:05 sschmid

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.

OutdoorHawk avatar May 23 '24 19:05 OutdoorHawk

How can the Visual debugging has worked? I'm using version 2022.3.15f1

image

And it has UI issue

tuananh940205 avatar Sep 09 '24 04:09 tuananh940205

Nvm: I've found the fix here: https://github.com/sschmid/Entitas/issues/1067

tuananh940205 avatar Sep 09 '24 04:09 tuananh940205