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

Inspector not updating to selected GameObject

Discussion in 'Editor & General Support' started by SkrenZz, Apr 11, 2020.

  1. SkrenZz

    SkrenZz

    Joined:
    Apr 11, 2020
    Posts:
    26
    Hello there,

    I am new to Unity and I suddenly came across what I believe is a bug (although it might be intended behaviour, but if so- I definitely do not want it), which causes the inspector to show the components of a specific GameObject despite me clicking other GameObjects in the Hierarchy tab (see following attached screenshots).

    It is very frustrating, I will greatly appreciate any attempt to help me solve it. Also, if it is actually an intended behaviour, I'll also be happy to know what its use is for (I thought it might be useful when handling with two or more inspector tabs of various GameObjects, but when I add another inspector tab it doesn't show any components even if I try selecting a GameObject).

    Thank you all very much!
     

    Attached Files:

    nvllap likes this.
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,120
    Unity does have a way to "lock" the inspector window, so that it doesn't change as you click on different game objects, but from your screenshot, you don't have that enabled. (It's the tiny "lock" icon near the top-right corner of the inspector window). So in that case, I don't know what could have caused this, other than a bug.

    Two possible ways to fix it:
    • Right-click the top of the inspector tab itself, and choose to close the tab. Then, open a new inspector tab by right-clicking on pretty much any other tab and choosing Add Tab -> Inspector window.
    • If that doesn't work, go to Window -> Layouts -> Revert Factory Settings. That should reset all the windows to their default state, and hopefully fix this as well.
     
  3. BitGamey

    BitGamey

    Joined:
    Jun 11, 2016
    Posts:
    52
    I'm seeing this today in 2019.3.6f1. It refreshes if you click Play and then Stop otherwise it just stays on what it was showing as if the lock was selected and neither of the suggestions posted in the previous post fixed it.
     
    Last edited: Jul 4, 2020
  4. heirenton

    heirenton

    Joined:
    Feb 7, 2018
    Posts:
    1
    I am having same problem. Clicking to anything does not update inspector to clicked items properties. I updated to last LTS 2019.4.3f1. Only going in & out to play mode refreshes the inspector.
     
    Last edited: Jul 9, 2020
  5. Homeship

    Homeship

    Joined:
    Mar 4, 2016
    Posts:
    9
    Same problem. Unity 2019.4.3f1 LTS.
    Fixed after Revert Factory Layout Settings.

    Problem returns after recompiling scripts.
     
    Last edited: Jul 10, 2020
  6. jaymacka

    jaymacka

    Joined:
    Mar 7, 2017
    Posts:
    1
    Similar bug experienced in 2019.4.4f1. Only started happening after loading extra prefabs into the '3D With Extras' template.

    Reverting layout to factory default settings doesn't fix.

    Toggling play mode does refresh inspector to the selected GameObject.
     
  7. leslviv

    leslviv

    Joined:
    Jun 22, 2019
    Posts:
    32
    Same story 2019.4.0f1
    Fixed by reinstalling unity, but it came back again...
     
    Last edited: Jul 26, 2020
  8. antounk

    antounk

    Joined:
    Jan 22, 2020
    Posts:
    1
    i'm using unity 2019.4.0f1 and it's happening too idk how to fix it please help
     
  9. Wolfram

    Wolfram

    Joined:
    Feb 16, 2010
    Posts:
    253
    FYI: a simpler workaround than entering Play mode is to switch the Inspector between Normal and Debug mode, and back again.
     
  10. geff

    geff

    Joined:
    Mar 3, 2013
    Posts:
    28
    Same bug here with 2020.1.0f1
    Steps to reproduce :

    1 : Select an object witch contains a box collider
    2 : Entering the collider editing mode
    3 : Select another object in the hierarchy

    Instead of canceling the edit mode, it lock sthe inspector without any chance of unlocking it.
     
    CGCowboy, n8dev_yt and ThomRobinGames like this.
  11. Aurigan

    Aurigan

    Joined:
    Jun 30, 2013
    Posts:
    291
    Same in 2019.4.5f1 - Editor worked fine for days, now even restarting it doesn't fix the issue.
     
  12. ThomRobinGames

    ThomRobinGames

    Joined:
    May 20, 2020
    Posts:
    3
    Toggling from debug to normal does fix it (2019.4.2)
     
    ND_59 likes this.
  13. OsamaDeep

    OsamaDeep

    Joined:
    Jun 22, 2013
    Posts:
    20
    try all previous ways, none solve the problem expect restart the engine solve that. its very annoying bug (2019.4.4f1)
     
  14. melos_han_tani

    melos_han_tani

    Joined:
    Jan 11, 2018
    Posts:
    77
    It's happening to our artist using Windows 7 on 2019.4.2f1. They have a dual monitor setup where one monitor is a large tablet for drawing too.
     
  15. CreativeUrge

    CreativeUrge

    Joined:
    Jun 22, 2019
    Posts:
    4
    Having the same issue here in 2019.4.2
     
  16. xavierdhjr

    xavierdhjr

    Joined:
    Jan 20, 2020
    Posts:
    5
    I'm also experiencing this in 2020.1.4f1. Switching between Debug / Normal refreshes the inspector panel, but this has to be done every time I select a different object. While not in Play Mode everything works fine.
     
    supTE likes this.
  17. OneOfMany

    OneOfMany

    Joined:
    Jun 11, 2015
    Posts:
    24
    This bug is plaguing me last year. Extremely annoying.
     
  18. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,196
    This is happening with as well, every time I save a script when in play mode (I'm on "Recompile after stop playing" setting).

    productivity killer!

    Btw: Toggling between debug then back to normal inspector will only refresh to the currently selected gameobject, the problem won't go away unless I exit playmode.
     
  19. OneOfMany

    OneOfMany

    Joined:
    Jun 11, 2015
    Posts:
    24
    When you create a selection rectangle and hit Esc to cancel sellection, it triggers this bug. Creating a rectangle selection again and selecting some object with it will repair the bug again.
     
  20. joshua-sprague

    joshua-sprague

    Joined:
    Sep 19, 2017
    Posts:
    1
    This worked perfectly.
     
    ursxiz, ScarabGameDev and OneOfMany like this.
  21. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    45
    Can confirm this worked for me. Also used a selection rectangle but canceled with ESC. Doing as above solved the problem for me.
     
  22. OneOfMany

    OneOfMany

    Joined:
    Jun 11, 2015
    Posts:
    24
    I was a bit imprecise, you don't need to select anything, just making the rectangle selection without closing it with ESC does all the magic.
     
  23. ThirdeyeNZ

    ThirdeyeNZ

    Joined:
    Feb 1, 2013
    Posts:
    2
    I found clicking the Lock icon to lock the Inspector then immediately unlocking it fixed it for me. It's like it has to be reminded that it's actually unlocked.
     
  24. Larper

    Larper

    Joined:
    Jun 17, 2015
    Posts:
    4
    I would literally PayPal you a beer for posting this as I almost had a heart attack thinking I screwed up my project somehow and that I would have to start all over again. Thanks! <3
     
    OneOfMany likes this.
  25. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    100

    This is still happening in 2019.4.14f1 (LTS). Escape key didn't work for me but creating a small selection rectangle in an empty area and releasing without pressing Esc fixed it for me, thanks!

    I figured the debug trick aswell or creating a new inspector tab but this is by far the quickest.
     
  26. MarcOwaR

    MarcOwaR

    Joined:
    Dec 27, 2015
    Posts:
    31
    This is happening pretty bad for myself, on version Unity 2020.2.1f1 (64-bit)
    Import game object prefabs into scene, they showing in editor (vanish when I zoom in)
    not seen in game window (hidden from view), so kinda sucks to not see the final image in the game panel.

    game works when I hit play, all assets are there.
     
  27. OneOfMany

    OneOfMany

    Joined:
    Jun 11, 2015
    Posts:
    24
    Can you describe your problem better? Sounds like you have a quite different issue.
     
  28. eresgamestudio

    eresgamestudio

    Joined:
    Jan 16, 2021
    Posts:
    1
    After editing colliders you should quit the Edit Collider manually instead of clicking somewhere in the scene. The bug came from there for me.
     
  29. VtheV

    VtheV

    Joined:
    Feb 5, 2021
    Posts:
    1
    OMG, you are a life saver!
     
    OneOfMany likes this.
  30. Magic_Nano

    Magic_Nano

    Joined:
    Oct 24, 2020
    Posts:
    1
    OMG IT WORKED, but without the ESC
    version - 2019.4.13f1
     
  31. True_BRS

    True_BRS

    Joined:
    Nov 3, 2018
    Posts:
    1
    This actually works just draw your cursor over and select something then all good!!!
    2019.4.21f1 LTS
     
    OneOfMany likes this.
  32. akpharaoh

    akpharaoh

    Joined:
    Feb 23, 2021
    Posts:
    1
    THANK YOU
     
    jumisko and OneOfMany like this.
  33. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    168
    Terrible experience, Same problem. Unity 2019.4.21. Mostly happening in prefabs. But I have to close Unity every 10 minutes and restart in order to fix the problem. At one point it just won't refresh the Inspector anymore.

    None of the above suggestions helps in my case.

    I do think it might have to do with rectangle selection though since I can't do those either. As soon as the mouse 'touches' the first object this one gets selected and the further selection gets automatically canceled.
     
  34. OneOfMany

    OneOfMany

    Joined:
    Jun 11, 2015
    Posts:
    24
    So it seems to be a slightly different problem triggered by different kind of action. Do you think it might have something to do with editting box colliders using mouse in scene view? I think when you don't close the collider edit mode (or maybe even other scene view UI tools like joint limits etc.) before deselecting the object, somewhat similar problems might occur.

    And have you tried to uninstall Unity completely and discard all of the remaining data in %appdata% folder, program files folder etc, and reinstall it again? Sometimes Unity become haunted by evil spirits and you have to perform some exorcism.

    Hope it helps somehow.
     
  35. avinash213

    avinash213

    Joined:
    Dec 4, 2018
    Posts:
    5
    Thank you so much. This is fixed for me. I will update if this is working in other cases as well.

    Unity guys have to consider this and fix this issue.
     
    OneOfMany likes this.
  36. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    168
    No, I'm not changing collision box at all. I'm just designing the prefab content and after a while this happens. And nothing, going in out of the prefab, create a new selection or canceling with esc will work. Only a restart helps.

    Yeah I actually did that like 4 weeks ago. Deleted literally everything I had installed related to Unity and started fresh. No change.
     
  37. OneOfMany

    OneOfMany

    Joined:
    Jun 11, 2015
    Posts:
    24
    Just to clear this out: Canceling the rectangle selection by pressing ESC causes the inspector freeze bug, creating a rectangular selection without pressing ESC to cancel it fixes the problem after it occured.

    Other than that, I can't help, I can't reproduce what you described and I'm not sure if I understood clearly what precisely went wrong on your side. Try to rephrase it and find new possible keywords and google around, it really seems as a problem unrelated to what this thread delves into. With the bug we're discussing here, selection of gameobjects is entirely possible, Inspector just doesn't update itself properly.
     
    Tonymotion and Strom_CL like this.
  38. Taobao

    Taobao

    Joined:
    Oct 25, 2015
    Posts:
    8
    Edit -> Preferences -> External Tools and disable Editor Attaching checkbox fixed this issue for me.
     
  39. jumisko

    jumisko

    Joined:
    Feb 18, 2020
    Posts:
    10
    Same problem here with Inspector on 2019.4.19f1. Clicking on anything in the hierarchy or project window would not show in the inspector. I believe as many have noted here, that I neglected to manually exit out of a capsule collider adjustment, which triggered this issue. Restarting Unity worked to bring back the Inspector, but I have not tried the rectangle select work-around. I have never encountered this problem before, so it seems related to editing colliders as well as the rectangle select functions as stated above. Definitely a bug.
     
  40. akuno

    akuno

    Joined:
    Dec 14, 2015
    Posts:
    73
    Same here
     
  41. edit_poly

    edit_poly

    Joined:
    Sep 15, 2021
    Posts:
    1
    YOU ARE A TRUE HERO!!!! I want to invite you to a lunch!!!!!!
     
    OneOfMany likes this.
  42. ursxiz

    ursxiz

    Joined:
    Jun 18, 2020
    Posts:
    6
    This is still happening in 2020.1.8f1, and the solution posted and upvoted above works.

    Still, Unity, please fix it?
     
  43. cheesepant

    cheesepant

    Joined:
    Jun 28, 2017
    Posts:
    4
    Wow 2021 and still the rectangle selection did it. Unbelievable. Maybe more hands on fixing and less on adding features.
     
    avinash213 likes this.
  44. poyoworks

    poyoworks

    Joined:
    Mar 7, 2021
    Posts:
    4
    Wow, its december 2021 and still just had this issue and fixed it with the rectangle selection tips. Its been 1.5 years, Unity seriously?
     
  45. Strom_CL

    Strom_CL

    Joined:
    Nov 17, 2012
    Posts:
    91
    Just upgraded my project from 2019 to 2020 and encountered this bug. @Unity this is a ridiculous bug to exist. Fix this. Thank you to OneOfMany for the fix on how to get around this for now.
     
    OneOfMany likes this.
  46. hugotactical

    hugotactical

    Joined:
    Jan 4, 2022
    Posts:
    1
    Last edited: Mar 25, 2022
    OneOfMany likes this.
  47. foxache

    foxache

    Joined:
    Feb 8, 2015
    Posts:
    8
    Thank you so, so much. This has wasted so much time for me, not only because it's time consuming to either press play or toggle debug, but because it murders creativity and leaves me too livid to work. This workaround actually allows me to get some stuff done. It's been an issue on and off for years. Why it isn't fixed is utterly baffling.

    Anyways, thanks again. :)
     
    OneOfMany likes this.
  48. OneOfMany

    OneOfMany

    Joined:
    Jun 11, 2015
    Posts:
    24
    I know exactly how you feel! I thought I'll explode with relief when I found out. Total motivation killer every f-in time it happened. It felt like a toxic relationship, like walking on eggshells. I really started to seriously think about divorce with Unity. But I'm a persistent lover. It took more than a year until I realized what even causes it. I always noticed it long after i triggered it. After that, it became self-evident.

    Apparently in versions 2020+ this issue does no longer exist (according to the response in the issue tracker). But because we started developing our VR game some time ago, we need to stick with 2019 LTS, newer versions would make substantial parts of our code obsolete.

    Glad I've been able to help.
     
    Last edited: Apr 26, 2022
  49. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66
    Fixed for me as well. Thank you so much, rare it's so simple haha.
     
    OneOfMany likes this.
  50. ZoozleZone

    ZoozleZone

    Joined:
    Dec 29, 2018
    Posts:
    1
    Same here and that is what works for me - but it is very annoying to have to continuously do that - so if you hear of a permanent fix - please share :)