-
-
Notifications
You must be signed in to change notification settings - Fork 9
Add theme color binders for various renderers #41
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
Conversation
…hRenderer's material color
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR extends the Unity Theme system by introducing multiple color binders for various renderer types and refactors the TextMeshPro color binder to use the more generic TMP_Text base class instead of TextMeshProUGUI. The changes improve consistency and expand theme color binding support to additional Unity components.
Key Changes:
- Added color binders for Renderer, MeshRenderer, LineRenderer, and SpriteShapeRenderer components
- Refactored TextMeshProColorBinder to use
TMP_Textinstead ofTextMeshProUGUIfor broader compatibility - Updated all test files to reflect the TMP_Text naming change
Reviewed changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Unity-Theme/Assets/root/Scripts/Binders/Base/GenericRendererColorBinder.cs | New base class for renderer-based color binders supporting material color properties |
| Unity-Theme/Assets/root/Scripts/Binders/RendererColorBinder.cs | New binder for generic Renderer components |
| Unity-Theme/Assets/root/Scripts/Binders/MeshRendererColorBinder.cs | New binder specifically for MeshRenderer components |
| Unity-Theme/Assets/root/Scripts/Binders/LineRendererColorBinder.cs | New binder supporting LineRenderer start/end color properties |
| Unity-Theme/Assets/root/Scripts/Binders/SpriteShapeRendererColorBinder.cs | New binder for SpriteShapeRenderer components |
| Unity-Theme/Assets/root/Scripts/Binders/TextMeshProColorBinder.cs | Refactored to use TMP_Text instead of TextMeshProUGUI |
| Unity-Theme/Assets/root/Scripts/Binders/SelectableColorBinder.cs | Updated component menu attribute |
| Unity-Theme/Assets/root/Scripts/Binders/ButtonColorBinder.cs | Updated component menu attribute, removed unused using statement |
| Unity-Theme/Assets/root/Scripts/Utils/LogableMonoBehaviour.cs | New utility class providing standardized logging methods for MonoBehaviour |
| Unity-Theme/Assets/root/Scripts/Unity.Theme.asmdef | Added UnityEngine.UI assembly reference |
| Unity-Theme/Assets/root/Tests/Runtime/ColorBinder/*.cs | Updated test method names from TextMeshProUGUI to TMP_Text |
| Unity-Theme/Assets/root/Tests/Editor/ColorBinder/*.cs | Updated test method names from TextMeshProUGUI to TMP_Text |
| README.md | Removed Asset Store badge and reformatted binder list |
| Unity-Theme/Assets/root/README.md | Removed Asset Store badge and reformatted binder list |
| Unity-Theme/.gitignore | Added MCP servers configuration exclusion |
| Unity-Theme/Assets/Resources/Unity-MCP-ConnectionConfig.json | Modified local development configuration settings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Unity-Theme/Assets/root/Scripts/Binders/Base/GenericRendererColorBinder.cs
Show resolved
Hide resolved
Unity-Theme/Assets/root/Scripts/Binders/LineRendererColorBinder.cs
Outdated
Show resolved
Hide resolved
Unity-Theme/Assets/root/Scripts/Binders/Base/GenericRendererColorBinder.cs
Outdated
Show resolved
Hide resolved
…, LineRenderer, MeshRenderer, and SpriteShapeRenderer
…r.cs Co-authored-by: Copilot <[email protected]>
…lorBinder.cs Co-authored-by: Copilot <[email protected]>
…anMurzak/Unity-Theme into feature/material-color-binder
…material for color binding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 36 out of 37 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Unity-Theme/Assets/root/Scripts/Binders/Base/GenericRendererColorBinder.cs
Outdated
Show resolved
Hide resolved
…ors array before applying changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 55 out of 57 changed files in this pull request and generated 9 comments.
Comments suppressed due to low confidence (2)
Unity-Theme/Assets/root/Tests/Editor/ColorBinder/TestColorBinder.Create.cs:51
- Missing test coverage for new color binders. The existing test pattern in
TestColorBinder.Create.csincludes tests for Image, TextMeshProUGUI, SpriteRenderer, Shadow, and Outline binders. The newly introduced binders (LineRenderer, MeshRenderer, SkinnedMeshRenderer, Renderer, Light, and SpriteShapeRenderer) should have corresponding test cases following the same pattern to ensure consistency and adequate coverage.
Unity-Theme/Assets/root/Tests/Runtime/ColorBinder/TestColorBinder.Create.cs:51 - Missing test coverage for new color binders. The existing test pattern in
TestColorBinder.Create.csincludes tests for Image, TextMeshProUGUI, SpriteRenderer, Shadow, and Outline binders. The newly introduced binders (LineRenderer, MeshRenderer, SkinnedMeshRenderer, Renderer, Light, and SpriteShapeRenderer) should have corresponding test cases following the same pattern to ensure consistency and adequate coverage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Unity-Theme/Assets/root/Scripts/Binders/SpriteRendererColorBinderRequired.cs
Show resolved
Hide resolved
Unity-Theme/Assets/root/Scripts/Binders/ImageColorBinderRequired.cs
Outdated
Show resolved
Hide resolved
Unity-Theme/Assets/root/Scripts/Binders/TextMeshProColorBinderRequired.cs
Show resolved
Hide resolved
Unity-Theme/Assets/root/Scripts/Binders/SpriteShapeRendererColorBinder.cs
Show resolved
Hide resolved
Unity-Theme/Assets/root/Scripts/Binders/LightColorBinderRequired.cs
Outdated
Show resolved
Hide resolved
Unity-Theme/Assets/root/Scripts/Binders/SpriteShapeRendererColorBinderRequired.cs
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Introduce multiple color binders to manage theme colors for different Unity components, including Renderers, MeshRenderers, and LineRenderers. Update the TextMeshPro color binder to use TMP_Text and refactor tests accordingly for consistency and clarity. Remove the Asset Store badge from the README for a cleaner presentation.