Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Bug EditorOnly [GetComponentNullErrorWrapper] creating 15.9MB Garbage on every ScriptReload

Discussion in 'Editor & General Support' started by Hannibal_Leo, Mar 25, 2021.

  1. Hannibal_Leo

    Hannibal_Leo

    Joined:
    Nov 5, 2012
    Posts:
    295
    On every script reload, this strange entry appears in the profiler, creating a huge amount of garbage which slows down iteration times significantly.

    What is this? How can I get rid of it?
    Using Unity Version 2020.1.17f1

    Edit: We don't have any MissingComponents in our Scenes, I made a script to check and remove them, using
    RemoveMonoBehavioursWithMissingScript()
    .

    (next line is also very strange - calling GC.Alloc 1.699.287 times on script reload? All in all Script Reloading takes 32 seconds, every single time - I want to fix this, somehow)

    upload_2021-3-25_16-8-6.png
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,327
unityunity