Skip to content

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

Description

@jonathan-bryant

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);
}

Activity

  1. jonathan-bryant commented on Oct 27, 2023

    @jonathan-bryant
    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.

  2. SimonDarksideJ commented on Nov 10, 2023

    @SimonDarksideJ
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions