Skip to content

Overwrite prompt only works once #74

Closed

Description

@RushinRussian

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.

Activity

  1. yasirkula commented on Oct 31, 2022

    @yasirkula
    Owner

    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.

  2. RushinRussian commented on Oct 31, 2022

    @RushinRussian
    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.

  3. yasirkula commented on Oct 31, 2022

    @yasirkula
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions