Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2020.3.X, 2021.1.X

Votes

18

Found in

2020.2.2f1

2020.2.3f1

2021.1.0b4

2021.2

Issue ID

1316226

Regression

Yes

Cannot expand a private list of variables when using the Debug Inspector mode

Inspector Framework

-

How to reproduce:
1. Open the attached project
2. Open SampleScene
3. Select GameObject in the Scene Hierarchy
4. Switch inspector to Debug mode (click the dots on the top right corner of the Inspector > select Debug)
5. Observe MyScript has a private list My Private List of ints
6. Try clicking the arrow to expand the list
7. Select MyFile in Project assets
8. Observe MyFile has a list MyList
9. Try clicking the arrow to expand the list

Expected result: You can expand the list to monitor the list values
Actual result: You cannot expand the list

Reproducible with: 2020.2.2f1, 2020.2.5f1, 2021.1.0b4, 2021.1.0b8, 2021.2.0a6
Not reproducible with: 2018.4.30f1, 2019.4.21f1, 2020.2.1f1, 2021.1.0a1, 2021.1.0b3

Workaround: Use [SerializeField] to display values in Normal Inspector mode, but this will allow modifying the values

Notes:
1. MyFile MyList field in inspector can not be expanded to inspect content in Normal mode as well

  1. Resolution Note (fix version 2021.2):

    Fixed in: 2022.1.0a2

  2. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0b6

  3. Resolution Note (fix version 2021.1):

    Fixed in 2021.1.17f1

  4. Resolution Note (fix version 2020.3):

    Fixed in 2020.3.16f1

Comments (11)

  1. hotroddd1

    Jun 10, 2022 22:03

    I am using version 2021.3.4f1 and this is still a problem.
    The add comment button is overlaying the top of the elements that I am trying to expand. I cannot expand them and use them because the UI has the focus on the Add Component button.

  2. Legend_Bacon

    Aug 18, 2021 18:58

    Reproduced in 2020.3.10f1 and it's driving me crazy.
    Time to make everything public! :)

  3. Imm0rt4l_PL

    Jul 20, 2021 07:59

    There is a workaround for this. Make the field public, recompile, expand in the Inspector and then you can change it back to private. The list/array will stay expanded.

  4. hlmgmc

    Jun 23, 2021 04:24

    Also in 2021.1.12f1 and yup super annoying.

    As a work around for now, you can add the [SerializeField] as suggested, then expand all private vars in the Inspector (debug mode), then remove the [SerializeField] tag.

    It only seems to be the top level that cannot open, lower levels operate as normal.

  5. eskivor

    Jun 16, 2021 16:58

    Issue reproducible with 2021.1.7f1

  6. alpsoy

    Jun 13, 2021 09:56

    Can reproduce in 2020.3.9f1

  7. liveswithoutfear

    Apr 17, 2021 09:40

    P.s. same goes for arrays, anything expandable it seems

  8. liveswithoutfear

    Apr 17, 2021 09:37

    I second this. Still an issue in 2020.3.3f1. One thing that was quite handy in Unity 2019 was that in debug mode you could expand these lists. Now in order to check them you must make them public, which exposes them, which I'm not always a fan of. I just like my privacy ok! Now I need to find a corner to cry in... I still love Unity regardless. But a fix would be AWESOME! Thank you please

  9. tomfulghum

    Apr 17, 2021 09:19

    I can reproduce the issue in 2021.1.3f1.

  10. Jakintosh

    Mar 12, 2021 20:15

    And to add, just updated to 2020.3.0f1 and it is still a problem there as well.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.