Search Unity

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:
    9,051
    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. seec1 likes this.
  4. seec1

    seec1

    Joined:
    Jun 6, 2016
    Posts:
    11