Update to force Enumerated start for Accordion elements
Resolves: https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/455pull/460/head
parent
b615c4b681
commit
9c7a59c9f2
|
@ -2,6 +2,7 @@
|
|||
///Sourced from - http://forum.unity3d.com/threads/accordion-type-layout.271818/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine.UI.Extensions.Tweens;
|
||||
|
||||
namespace UnityEngine.UI.Extensions
|
||||
|
@ -45,6 +46,13 @@ namespace UnityEngine.UI.Extensions
|
|||
this.onValueChanged.AddListener(OnValueChanged);
|
||||
}
|
||||
|
||||
private new IEnumerator Start()
|
||||
{
|
||||
base.Start();
|
||||
yield return new WaitForEndOfFrame(); // Wait for the first frame
|
||||
OnValueChanged(this.isOn);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnValidate()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue