Page 1 of 1
All answers are forming all over each other in response button
Posted: Tue Jul 12, 2016 4:34 pm
by Evgeny
All answers buttons are formed in one place at once. Then in a second they are moved to their places.
Buttons size for answers does change depending on amount of lines for each answer.
Re: All answers are forming all over each other in response button
Posted: Tue Jul 12, 2016 8:52 pm
by Tony Li
Hi,
What GUI system are you using? I'm guessing Unity UI (as in Unity UI Dialogue UI). If so, are you using a prefab dialogue UI or one you've made? If you're using a prefab, which one?
It sounds like the Unity UI
auto-layout components (e.g., Content Size Fitter, Vertical Layout Group, etc.) are taking effect after the first frame that the UI elements are visible. If this is the case, here are two ways to address it:
1. Add an Animator to the Response Menu > Panel with an animator controller that has Show and Hide animations, similar to the Animator that's probably on your Dialogue > Panel. For the Show animation, start the first frame with the panel invisible (e.g., Canvas Group alpha = 0). In the second frame, make the panel visible (Canvas Group alpha = 1). Reverse the process for the Hide animation. I can provide more details if you need it.
2. Or adjust the
Script Execution Order of the Dialogue System's Unity UI components so they run before the Unity UI layout components. I don't know which ones to suggest at the moment because I don't know exactly what's going on, or if you're even using Unity UI.
Re: All answers are forming all over each other in response button
Posted: Wed Jul 13, 2016 9:29 am
by Evgeny
We use NGUI.
I will try the first offered option. The problem because in buttons of answers the quantity of lines changes and because of it goes rebuild of the table.
Re: All answers are forming all over each other in response button
Posted: Wed Jul 13, 2016 1:16 pm
by Tony Li
Sounds like a good approach. The steps I listed previously were intended primarily for Unity UI, but you can do something similar with NGUI. If you need any assistance, just let me know!