Game Development Asked on November 20, 2021
I’d like to make a Tooltip System/Tutorial System.
I’m using the Content Size Fitter and Horizontal Layout Group components to have a dynamic text bubble..
Also I’d like to attach a button to it,
so when the tooltip appears, the game pauses,
and then when the player clicks the button, it closes the tutorial text, resuming the flow of the game.
But for some reason the click doesn’t reach the component. Not even the animation happen, like something is blocking my button from being clicked.
Hierarchy:
uiTutorialText
Has a CanvasGroup to fade the whole structure.
TutorialText
Has an Image (background)
And Text and Button are just simple plain Text and Button objects, and the Button’s Interactable is true.
I also tried making the Button a child of Text, and then translating it sideways, so the button doesn’t share screen space with the tooltip. But it’s not clickable this way as well.
As soon as I move the Button out of the hierarchy, like directly under the canvas, it works.
Has a CanvasGroup to fade the whole structure. Interactable = true, BlocksRaycast = false
Try checking "blocks raycast". CanvasGroup applies to the parent and all of its children. Unchecking "blocks raycast" is telling Unity "this object and all of its children should ignore the mouse".
Answered by Kevin on November 20, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP