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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Editor-Loop causes lag

Discussion in 'Editor & General Support' started by The_wARmAcH1n3, Sep 26, 2023.

  1. The_wARmAcH1n3

    The_wARmAcH1n3

    Joined:
    Aug 5, 2023
    Posts:
    37
    I want to report a bug:

    I’m using Editorversion 20022.3.6f1. I create an empyt 2D project, and import a asset like this:
    https://assetstore.unity.com/packag...mer-controller-with-animated-character-245475

    or this
    https://assetstore.unity.com/packages/templates/systems/corgi-engine-2d-2-5d-platformer-26617

    After importing I save and test the demo scene (playing the level in the editor), the framerate is stable at 120-140fps

    Then I close the project and Unity3d. After loading the project again, I test again the demo scene and then the framerate drops from 140fps to 60-70fps every 5-6 second.

    Both assets have the same fps-drop, on a 2D scene and at a 3D scene too. I don’t know why, is this a bug from the editor? I’m new on the unity engine I have no experiene with older version of unity.

    I used the profiler and the lag comes from the Editor-loop.
     

    Attached Files:

  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,789
    You have the profiler there so look at the EditorLoop?

    166ms is not 60FPS though, that's more like 6fps. I seem to recall there was an issue with the Aseprite Importer package recently where it was taking a lot of CPU whilst idle but that was fixed AFAIK. I'm not sure if it was intermittent or not.

    The above doesn't sound like a 2D issue though given what you've said. Might be better for me to move this to the Editor & General Support forum if you cannot isolate what the profiler is saying is causing the issue.
     
  3. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,247
    Just to clarify the point about looking at the Editor Loop: if you switch the Profiler target from Playmode to Editor you'll get that broken down in detail.
     
    MelvMay likes this.
  4. The_wARmAcH1n3

    The_wARmAcH1n3

    Joined:
    Aug 5, 2023
    Posts:
    37
    Yes its in the wrong section, I didn't see the editor forum before because I looked only on the left site.

    Hopyfuly a mod will put this into the editor forum.
     
  5. The_wARmAcH1n3

    The_wARmAcH1n3

    Joined:
    Aug 5, 2023
    Posts:
    37
    The lag I have without using Profiler too.
     
  6. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,247
    Yes, but the profiler can tell you what causes it, but only if you switch the target to be the Editor.
     
  7. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,323
    Note that it may make a difference what is currently selected in the scene hierarchy, and how many Inspector and other editor windows you have open and visible. Most notably having both game and scene view visible at the same time.
     
    MelvMay and MartinTilo like this.
  8. The_wARmAcH1n3

    The_wARmAcH1n3

    Joined:
    Aug 5, 2023
    Posts:
    37
    I created a built and the exe standalone doesn't have the lag. That's good.