- Home /
Show dropdown on object instantiation
Hey,
in my application I want to spawn new dropdowns on a button click and have them spawned with the option list open. I tried to call dropdown.Show() directly after instantiation, but unfortunately this yields the following error:
NullReferenceException: Object reference not set to an instance of an object TMPro.TMP_Dropdown.AlphaFadeList (System.Single duration, System.Single start, System.Single end) (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Dropdown.cs:1071) TMPro.TMP_Dropdown.Show () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Dropdown.cs:889)
Do you know any way to get around this and spawn the dropdown with the option list already openend?
Many thanks in advance!
Comment