Skip to content

Commit 686c2d6

Browse files
committed
AdvancedDropdownItem.children is obsolete in 6.5+, replaced with new more optimized childList for UNITY_6000_5_OR_NEWER
1 parent 5fadcb6 commit 686c2d6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/AdvancedTypePopup.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ public static void AddTo (AdvancedDropdownItem root, IEnumerable<Type> types)
121121

122122
private static AdvancedDropdownItem GetItem (AdvancedDropdownItem parent, string name)
123123
{
124+
#if UNITY_6000_5_OR_NEWER // AdvancedDropdownItem.children is obsolete in Unity 6.5+, use more optimized childList
125+
foreach (AdvancedDropdownItem item in parent.childList)
126+
#else
124127
foreach (AdvancedDropdownItem item in parent.children)
128+
#endif
125129
{
126130
if (item.name == name)
127131
{

0 commit comments

Comments
 (0)