Search Unity

Question Modifying built-in inspectors.

Discussion in 'Editor & General Support' started by pineapuru, Nov 3, 2021.

  1. pineapuru

    pineapuru

    Joined:
    Mar 21, 2018
    Posts:
    46
    Hey guys, a basic question regarding the LOD Group component inspector.

    Is there any way I can type the percentage amount on LOD Groups instead of sliding it? I want my objects to have the same distance percentage but sliding it makes it quite inaccurate. If there is not, can we edit Unity Component editor scripts so I can somehow add that?

     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    The easiest way is probably to use the preset system. ( The sliders on the top Right)
    That way you can save the percentages and load the preset on the LOD Groups .
    In newer unity version (i tested only 2021.2 so far) you can type it in but just upgrading for that seems like not a good deal)
    upload_2021-11-3_10-5-51.png

    If that is not enough control for you you can add your own inspector code on top or the bottom of the build in inspector.
    https://docs.unity3d.com/Manual/editor-CustomEditors.html
     
    Last edited: Nov 3, 2021
    pineapuru likes this.
  3. pineapuru

    pineapuru

    Joined:
    Mar 21, 2018
    Posts:
    46
    This is a very good suggestion! I was worried that loading presets the meshes would also change, not only the percentage, which would ruin my idea. I'll give some tries, if it happens of the meshes change with the preset, I'll try to make a simple inspector code to override the percentages. ;)