Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Show custom warning popup when I try to delete specific file

Discussion in 'Editor & General Support' started by seec1, Mar 6, 2018.

  1. seec1

    seec1

    Joined:
    Jun 6, 2016
    Posts:
    11
    Dear all,

    I have two problem with unity editor

    1. I want show custom warning popup when delete specific file. Is there anyway to do this?
    Ex: When I try to delete .prefab file, I want to show custom message with big text size and red color text ...

    2. I using macos, when using shortcut [cmd+backspace], Editor delete file without popup message, How can show popup in this case?

    Thank you very much.
     
  2. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,956
    You can show a popup after there is change, but I don't think you can before. You might (haven't tried), be able to bind a key command to that key command that calls a script instead of the default behaviour, then your script could throw a dialog and perform the action. Maybe, don't know if it is possible.
     
    seec1 likes this.
  3. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,900
    seec1 likes this.
  4. seec1

    seec1

    Joined:
    Jun 6, 2016
    Posts:
    11