Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Accordion - Dynamic content before Start()/Awake() #455

Closed
jonathan-bryant opened this issue Oct 26, 2023 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@jonathan-bryant
Copy link

Unity UI Extensions Feature Request - Dynamic content before Start()/Awake()

I was having issues with the Accordion component loading correctly, especially in build.
This was due to dynamic content being added before the first frame. Adding the below to AccordionElement.cs fixed it for me:

private IEnumerator Start()
{
	yield return null; // Wait for the first frame
	OnValueChanged(this.isOn);
}
@jonathan-bryant jonathan-bryant added the enhancement New feature or request label Oct 26, 2023
@jonathan-bryant
Copy link
Author

It's worth noting that a side effect of this issue was the inability to open that element after the first frame without enabling another element.

@SimonDarksideJ
Copy link
Contributor

That is a severe limitation for how the Unity UI system works sadly @jonathan-bryant , although I will add an action to look into being able to initialise the control with some input to possible enable this capability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

2 participants