I’ve made dynamic spell descriptions, to my game, however, the text box is really inconsitent in its behavior:
I got an “empty” parent element, with just a Vertical Layout Group and Content Size Fitter, then as a child it has a “text box” - the background of the text, which has these 2 elements, as well as an Image, Canvas Renderer and a Layout Element, and it has children: text - spell name and text - spell description.
The spell name has just text & canvas renderer.
The spell description has these 2, as well as a Content Size Fitter, so it would scale along with the text (because it otherwise doesn’t).
In my scripts I simply enable/disable the parent object when my mouse is in/out of the button. And when I enable it, I move its x position to the mouse’s x position. And I update the 2 texts.
And I am getting this random jittering in the text box size when I open different descriptions. When I move the mouse out of the button and then back in - the text box size is normalized, until I go to another button. What am I doing wrong? Is this a problem of Unity, or is the problem in the way I’ve set things up?