-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…2369) Now TextMeshPro labels are hidden when they leave their scenes. Added Assembly definitions to let systems access some dependencies. Calculations are performed only when the Transform of the TMP changes or when its properties change (we are only interested in text though). It enables and disables the TMP in the VisibilityTextShapeSystem, according to what was calculated in the UpdateTextShapeSystem (added IsContainedInScene flag to TexhShapeComponent to transmit the result). It properly calculates the bounds of the TMP when it is disabled by caching the latest valid bounds size (added vector to TextShapeComponent) and using it when the bounds are zero. It takes into account the changes in the text of the TMP of the scene, and it calculates the visibility accordingly. It forces the TMP to rebuild when the text changes, in order to be able to use the proper bounds.
- Loading branch information
Showing
13 changed files
with
135 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 14 additions & 1 deletion
15
Explorer/Assets/DCL/SDKComponents/TextShape/Component/TextShapeComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Explorer/Assets/DCL/SDKComponents/TextShape/Demo/DCL.TextShapeSystems.asmref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"reference": "GUID:fc4fd35fb877e904d8cedee73b2256f6" | ||
} |
7 changes: 7 additions & 0 deletions
7
Explorer/Assets/DCL/SDKComponents/TextShape/Demo/DCL.TextShapeSystems.asmref.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Explorer/Assets/DCL/SDKComponents/TextShape/System/DCL.TextShapeSystems.asmref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"reference": "GUID:fc4fd35fb877e904d8cedee73b2256f6" | ||
} |
7 changes: 7 additions & 0 deletions
7
Explorer/Assets/DCL/SDKComponents/TextShape/System/DCL.TextShapeSystems.asmref.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters