Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual debugging. Coloring components not working properly. #1090

Open
OutdoorHawk opened this issue May 19, 2024 · 2 comments
Open

Visual debugging. Coloring components not working properly. #1090

OutdoorHawk opened this issue May 19, 2024 · 2 comments

Comments

@OutdoorHawk
Copy link

OutdoorHawk commented May 19, 2024

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.

@sschmid
Copy link
Owner

sschmid commented May 22, 2024

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

@OutdoorHawk
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
Development

No branches or pull requests

2 participants