Skip to content

Overwrite prompt only works once #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RushinRussian opened this issue Oct 31, 2022 · 3 comments
Closed

Overwrite prompt only works once #74

RushinRussian opened this issue Oct 31, 2022 · 3 comments
Labels

Comments

@RushinRussian
Copy link

RushinRussian commented Oct 31, 2022

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.

  1. 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.
  2. 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.
  3. 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.

@yasirkula
Copy link
Owner

yasirkula commented Oct 31, 2022

Please apply the same fix to all of these nested canvases or upgrade to the latest LTS version:

image

P.S. It works fine on 2021.3.1f1 and 5.6.2f1. P.P.S. And 2021.3.6f1 with the above fix.

@RushinRussian
Copy link
Author

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:

  1. Go to Plugins/SimpleFileBrowser/Resources
  2. Open SimpleFileBrowserCanvas prefab
  3. Type "canvas" in the hierarchy search (like on the screenshot above)
  4. 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.

@yasirkula
Copy link
Owner

I've done it as you've suggested, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants