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. Dismiss Notice

Customizing a custom inspector!

Discussion in 'Scripting' started by Xtro, Oct 4, 2014.

  1. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    544
    Hi,

    I've asked this question in Answers site but nobody could help. I'm giving the forum a try.
    http://answers.unity3d.com/questions/795717/customizing-a-custom-inspector.html

    Is there a proper way of customizing a custom inspector from an asset vendor? For example, NGUI customizes the default transform inspector (for adding some useful buttons) and PrefabEvolution customizes the default gameobject inspector (for its own way of implementing stuff).

    I still want to be able to add more buttons or labels into these inspectors. Basically, they are conflicting with my custom versions for those default inspectors.

    How should we handle this situation? If I'm using a 3rd party that customizes a default inspector(say transform inspector), do I have to lose my ability to customize it for my self ?
     
  2. aoe_labs

    aoe_labs

    Joined:
    Nov 4, 2013
    Posts:
    42
    What was wrong with the responses from Answers? I was thinking the same thing. Either edit the third party's custom inspector code or [CustomEditor(typeof(YourComponentClass))], as Alessio wrote.

    Perhaps this video series can help.
     
  3. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    544
    When I posted this messahe here, there were no answer on the answers site for days. I'll check the new answer now.
     
  4. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    Aren't NGUI custom inspector files editable? So... Just modify those?
     
  5. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    544
    Editing the 3rd party code is not the proper way. I'm looking for a proper way of doing this but I think it doesn't exits in unity's design. :(
     
  6. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    Editing the 3rd party code is the proper way.
     
  7. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    544
    Hehe :) you think so? Can you live with being have to edit the 3rd party code every single time they publish an update ? :)
    Thank you but when you say it's proper way, it doesn't become proper :)
     
  8. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    What other way would you imagine?
     
  9. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    544
    I can imagine some ways to achieve this but Unity doesn't support it. It doesn't matter because my question is about a "proper" way; not just a possible way. Reflection is a possible way but still not cool.