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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question How do I make my array inspector look like this?

Discussion in 'Editor & General Support' started by aganm, Apr 14, 2022.

  1. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    114
    When I use an array as a public variable in my script, it looks like this in the inspector:



    But I can see other arrays use a different style, like the materials array inspector for a mesh renderer:


    How do I make my array look like the second style?
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,233
    If you're using a modern version of Unity, I believe 2020+, the second style is now the default for all arrays. Previously it was an internal-only thing called ReorderableList, but it is used always now.
     
  3. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    114
    Hmmm, then I am confused because I am on 2021 LTS and I'm getting the old style.
     
  4. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    114
    Wait, you're right. I created a new project in 2021 and I actually had the new array inspector. It's because I upgraded my old project to 2021, I think my packages must be out of date. I'll try updating my packages as well.
     
  5. aganm

    aganm

    Joined:
    Sep 25, 2019
    Posts:
    114
    Would someone happen to know which package I need to update to get the new array inspector after upgrading a project to 2021 LTS?
     
unityunity