When added to an entity with a Text2DRenderer component, auto-fits the text
within a RectTransform.
For Text2DAutofit to work, you must also: add a RectTransformFinalSize
component to the entity, and schedule the SetRectTransformSizeSystem in
the UILayout module.
The RectTransformFinalSize component enables the SetRectTransformSizeSystem
to get the correct auto-fit size at runtime.
When added to an entity with a Text2DRenderer component, auto-fits the text within a RectTransform.
For Text2DAutofit to work, you must also: add a RectTransformFinalSize component to the entity, and schedule the SetRectTransformSizeSystem in the UILayout module.
The RectTransformFinalSize component enables the SetRectTransformSizeSystem to get the correct auto-fit size at runtime.