Unity Text UI that moves automatically from side to side.
If the string is long and appears to be cut, You can extend width of the RectTransform by applying the Content Size Fitter, Adjust the font size with BestFit. But you may not like either way. For example, when you have to display long text to a specified width.
- You can change both the forward and backward scroll speed. Or you can move text to the front immediately.
- Only Unity UI elements used. (No DoTween, No TextMeshPro)
- Simple and commented script. (~200 lines)
2019.4.40f1
- Create Panel
- Add Component 'SlidingText'. Then other components will be added automatically via script.
- Adjust font size of the Text component, Edit text string, ... etc.
- Extend the RectTransform of Text longer than the parent (Panel we created before).
- Support TextMeshPro
- Use Linear interpolation
- Use AnimationCurve