@@ -2895,21 +2895,23 @@ public static IEnumerator WaitForSaveDialog( PickMode pickMode, bool allowMultiS
28952895 string initialPath = null , string initialFilename = null ,
28962896 string title = "Save" , string saveButtonText = "Save" )
28972897 {
2898- if ( ! ShowSaveDialog ( null , null , pickMode , allowMultiSelection , initialPath , initialFilename , title , saveButtonText ) )
2898+ bool ? result = null ;
2899+ if ( ! ShowSaveDialog ( ( paths ) => result = true , ( ) => result = false , pickMode , allowMultiSelection , initialPath , initialFilename , title , saveButtonText ) )
28992900 yield break ;
29002901
2901- while ( Instance . gameObject . activeSelf )
2902+ while ( ! result . HasValue )
29022903 yield return null ;
29032904 }
29042905
29052906 public static IEnumerator WaitForLoadDialog ( PickMode pickMode , bool allowMultiSelection = false ,
29062907 string initialPath = null , string initialFilename = null ,
29072908 string title = "Load" , string loadButtonText = "Select" )
29082909 {
2909- if ( ! ShowLoadDialog ( null , null , pickMode , allowMultiSelection , initialPath , initialFilename , title , loadButtonText ) )
2910+ bool ? result = null ;
2911+ if ( ! ShowLoadDialog ( ( paths ) => result = true , ( ) => result = false , pickMode , allowMultiSelection , initialPath , initialFilename , title , loadButtonText ) )
29102912 yield break ;
29112913
2912- while ( Instance . gameObject . activeSelf )
2914+ while ( ! result . HasValue )
29132915 yield return null ;
29142916 }
29152917
0 commit comments