N ot much has happened (as in new features) since the last blog entry. There are 2 main things, that needs mentioning.
-
AssetRefMockerManagerwas moved to theBootstrapManagerclass. BecauseBootstrapManageris now a singleton then there is no need to beAssetRefMockerManagerin each scene. Therefor, it was made as part of theBootstrapManagerclass. Because of this, the code required some changes. The one reason was, that while theAssetRefMockerManagerwas in the each scene, then on the start of scene all the ref mockers could be loaded. But now, theStart()method is run only in the bootstrap scene so therefor batching mode was implemented. That is, when the batching mode is on, the asset ref mockers are just registered. And only after all the mocker are present they are loaded. - Implementation of the fast help text (FHT, a.k.a. tooltips). This was implemented using separate canvas in the bootstrap scene. There the FHT would be shown, always on the top. The FHT consist of two parts. The
FastHelpTextComponentwhich is used for game objects, which will have some tooltip info. And theFastHelpTextRendererComponentwhich is actually used for rendering the text. The glue between those two isFastHelpTextManager. Because of how are FHT implemented, the "control" characters in the text (like "|") were replaced with tag based (like <b>...</b>). Then, they're further processed to TMP's rich text tags (like <font>, <color>, ...). For instance | is processed as custom font and custom color. The custom font is needed, because the text should be bold. And because a bitmap fonts are used, for bold text the separate font need be used (well this is not strictly true, as even with bitmap fonts one can used "weight table" but it is much harder implement it in our situation, because of "embedded" font assets int.stiassets). Then color tag is used for the color (which is defined as a field inFastHelpTextComponent.
There were also some minor changes, like fixing the focus "bug" in the preference item prefab (when the item was unchecked, it still retained in the "selected" state, so the sprite wasn't changed. This was fixed with disabled "Navigation"). Also, sound volume settings changes are now reflected in the appropriate mixer. Then there was implemented color change on focus for Toggle4State and changing the default colors for the buttons and preferences item in preferences screen.
Link to repository: https://github.com/Trigve/Ja2xUnity

Top comments (0)