Overwrite prompt only works once
RushinRussian opened this issue · 3 comments
Hello, I've stumbled upon a problem when overwriting files. Simply put, opening the confirm-overwrite prompt more than once within a play session breaks it.
- Start a save-file dialog. Choose an existing file. A prompt will appear asking whether to overwrite the file or not. Everything looks good for now. Pick either "yes" or "no", it doesn't matter.
- Try overwriting any file again. The second time the modal prompt appears both "yes" and "no" buttons become unclickable and unresponsive. The prompt also doesn't go away and overwriting existing files is no longer possible. You can still save to a new file though.
- Try overwriting any file again for the third time. From this point onwards the modal prompt doesn't appear at all. Overwriting existing files is still impossible, though creating new files works.
I just have an empty scene with a simple button that calls:
FileBrowser.ShowSaveDialog(null, null, FileBrowser.PickMode.Files, false, "C:\\", "new.txt", "Save As", "Save");
I'm on Windows 10 with Unity 2021.3.6f1. I downloaded this package from Unity Asset Store. I've disabled ShowFileOverwriteDialog for now but hopefully this turns out to be an easy fix. Note that I did delete the two components as mentioned in #70 to get it working, otherwise there should be no changes.
Thank you for the assistance and a very quick response. This appears to have fixed it indeed.
For those who might arrive here from google:
- Go to Plugins/SimpleFileBrowser/Resources
- Open SimpleFileBrowserCanvas prefab
- Type "canvas" in the hierarchy search (like on the screenshot above)
- Remove components Grahic Raycaster and Canvas from the four objects on the list (all except for the parent "SimpleFileBrowserCanvas" node). You can see the list on the screenshot.
I'll consider upgrading my Unity version and redownloading the plugin. Perhaps this is worth a mention in the FAQ or somewhere in #70 (because this one is much more obscure than no files showing up at all). Thank you again.
I've done it as you've suggested, thanks!