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. Response avatar

    Resolution Note (fix version 2021.2):

    Fixed in: 2022.1.0a2

  2. Response avatar

    Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0b6

  3. Response avatar

    Resolution Note (fix version 2021.1):

    Fixed in 2021.1.17f1

  4. Response avatar

    Resolution Note (fix version 2020.3):

    Fixed in 2020.3.16f1

Comments (10)

  1. 3431da7f2962c0ec01299ff0e46772fd?d=mm

    Legend_Bacon

    Aug 18, 2021 18:58

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

  2. 1fe4904857798affa9b7e130ee165042?d=mm

    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.

  3. B5591b43d532b2cabf749bb05c1008d5?d=mm

    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.

  4. 1f62610339e18a4457fefd954b9ad847?d=mm

    eskivor

    Jun 16, 2021 16:58

    Issue reproducible with 2021.1.7f1

  5. C344d0b44ce47ae534a16cb651d7a6a5?d=mm

    alpsoy

    Jun 13, 2021 09:56

    Can reproduce in 2020.3.9f1

  6. Cc8e00d537326e87826507560e17d2ed?d=mm

    liveswithoutfear

    Apr 17, 2021 09:40

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

  7. Cc8e00d537326e87826507560e17d2ed?d=mm

    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

  8. 3f8fc3f0ac29398b432badeacebaffa7?d=mm

    tomfulghum

    Apr 17, 2021 09:19

    I can reproduce the issue in 2021.1.3f1.

  9. Eb97e7fb7fe9e801a08ce8e5f30571ea?d=mm

    Jakintosh

    Mar 12, 2021 20:15

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

  10. Eb97e7fb7fe9e801a08ce8e5f30571ea?d=mm

    Jakintosh

    Mar 12, 2021 20:05

    Also seeing this, currently in 2020.2.3f1. Super annoying, makes debugging very difficult.

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.