99using UnityEngine . SceneManagement ;
1010using UnityEngine . UI ;
1111
12+ #pragma warning disable CS0618 // Several TMP/Object APIs are deprecated in 6000.x but required for 2022.3 compatibility
13+
1214/// <summary>
1315/// Drop-in main menu that discovers every scene in Build Settings and presents them
1416/// in a searchable, categorised grid. Creates all UI at runtime — no prefabs or
@@ -151,9 +153,7 @@ static void SetupEventSystem()
151153 var activeScene = SceneManager . GetActiveScene ( ) ;
152154 bool hasSceneES = false ;
153155
154- #pragma warning disable CS0618 // FindObjectsSortMode overload is deprecated in 6000.x but required for 2022.3
155156 foreach ( var es in FindObjectsByType < EventSystem > ( FindObjectsSortMode . None ) )
156- #pragma warning restore CS0618
157157 {
158158 if ( es . gameObject . scene == activeScene )
159159 {
@@ -382,13 +382,13 @@ void BuildSearchBar(Transform parent)
382382 var ph = MakeText ( "Placeholder" , textArea . transform , "Search scenes\u2026 " , 18 ,
383383 kTextSecondary , TextAlignmentOptions . MidlineLeft ) ;
384384 ph . fontStyle = FontStyles . Italic ;
385- ph . textWrappingMode = TextWrappingModes . NoWrap ;
385+ ph . enableWordWrapping = false ;
386386 ph . overflowMode = TextOverflowModes . Ellipsis ;
387387 Stretch ( ph . gameObject ) ;
388388
389389 var txt = MakeText ( "Text" , textArea . transform , "" , 18 ,
390390 kTextPrimary , TextAlignmentOptions . MidlineLeft ) ;
391- txt . textWrappingMode = TextWrappingModes . NoWrap ;
391+ txt . enableWordWrapping = false ;
392392 Stretch ( txt . gameObject ) ;
393393
394394 var input = bar . AddComponent < TMP_InputField > ( ) ;
@@ -614,7 +614,7 @@ void BuildSceneButton(Transform parent, SceneEntry entry)
614614 var nameT = MakeText ( "Name" , go . transform , entry . displayName , 15 , kTextPrimary ,
615615 TextAlignmentOptions . Center ) ;
616616 nameT . overflowMode = TextOverflowModes . Ellipsis ;
617- nameT . textWrappingMode = TextWrappingModes . NoWrap ;
617+ nameT . enableWordWrapping = false ;
618618 var nr = Rect ( nameT ) ;
619619 nr . anchorMin = new Vector2 ( 0.04f , 0.38f ) ;
620620 nr . anchorMax = new Vector2 ( 0.96f , 0.94f ) ;
@@ -626,7 +626,7 @@ void BuildSceneButton(Transform parent, SceneEntry entry)
626626 var subT = MakeText ( "Sub" , go . transform , entry . subcategory , 11 , kTextSecondary ,
627627 TextAlignmentOptions . Center ) ;
628628 subT . overflowMode = TextOverflowModes . Ellipsis ;
629- subT . textWrappingMode = TextWrappingModes . NoWrap ;
629+ subT . enableWordWrapping = false ;
630630 var srr = Rect ( subT ) ;
631631 srr . anchorMin = new Vector2 ( 0.04f , 0.06f ) ;
632632 srr . anchorMax = new Vector2 ( 0.96f , 0.38f ) ;
0 commit comments