Search Unity

Custom asset selector

Discussion in 'Immediate Mode GUI (IMGUI)' started by Mr-Logan, Apr 8, 2018.

  1. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I've been googling around for this answer for about a day, but I can't find anything mentioning it.
    Is it possible to override the asset selector window, or extend it with custom code?
     
  2. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    I had the same question some weeks ago... I reverse engineered unity to see how the object selector window is implemented.
    Unfortunately there are classes marked as internal which would have been needed to replace the existing selector window.
    So, the answer is: No, it is not possible.

    What might be possible, though: You can write custom property drawers for certain types which can replace the default ones. They probably can open your own asset selector window...
    However, you would need to do this for every kind of asset you want to support. Also, it will probably clash with other assets which have custom property drawers for the same types.
     
    Mr-Logan likes this.
  3. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Ok it sounds like it would be too much work.
    Thank you for the answer! :)