Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Odin Inspector & Serializer] Lower FPS When MaterialEditor.OnEnabel

Discussion in 'Assets and Asset Store' started by zhaochaofan, Jan 11, 2019.

  1. zhaochaofan

    zhaochaofan

    Joined:
    Dec 26, 2017
    Posts:
    3
    企业微信截图_15471998101553.png
    When I modified the any of the attributes in material which is add on the Particle Sytem, the FPS Down.
    When I press Ctrl+S to save the project, the FPS resume.
    From the profiler, I found 1166 GC.Alloc.
    Could any one help me? Thanks!!
    bandicam 2019-01-11 18-03-58-349[00_00_00--00_00_14].gif
    Material is working with "Particles/Standard Unlit" shader.
     
  2. zhaochaofan

    zhaochaofan

    Joined:
    Dec 26, 2017
    Posts:
    3
    When I create an empty project, with same particle sytem and same material, everything looks good. But once the Odin plugin is imported, the material inspector on particle system will cause the lower fps.
     
    io-games likes this.
  3. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    301
    Hello @zhaochaofan,

    Thanks for sharing this, and thanks for sharing an image of the profiler as well.

    This is a Unity bug, and unfortunantly not a bug we can do anything about, Odin doesn't interfeer with the drawing of particles in any way.

    We've reported the same error in the past here which Unity claims to have resolved. https://fogbugz.unity3d.com/default.asp?1099071_p9h343vg0j0u6ig7

    I belive it it happens because CreatePreviewForAsset is creating an editor each frame in order to get the preview, which means scanning a bunch of assemblies for editors each frame in the inspector. So the more types you have in you app domain, the laggier it gets.

    However, Unity has claimed to have solved this, are you on the latest version of Unity? If so I'll leave update the issue once again, saying that the issue still persist, and link this forum post as well.
     
  4. zhaochaofan

    zhaochaofan

    Joined:
    Dec 26, 2017
    Posts:
    3
    QQ截图20190114121129.png
    I am afraid it hasn't beed fixed in 2018.3.1f1 :(
     
  5. RecursiveRuby

    RecursiveRuby

    Joined:
    Jun 5, 2013
    Posts:
    163
    Hey so in the patch notes for 2018.3.9 this is supposedly fixed

    I just updated and I'm still having the same problem. Still insane lag. Is anyone else still having this issue after updating?
     
  6. io-games

    io-games

    Joined:
    Jun 2, 2016
    Posts:
    104
    Updated to 2019.1.4 still have this issue in MaterialEditor.OnEnabel
    I think it does not connect to Odin
     
  7. RecursiveRuby

    RecursiveRuby

    Joined:
    Jun 5, 2013
    Posts:
    163
    It was an issue on Unity's end. I believe they fixed it in 2018.3.10. It was the update after I made this post that I noticed it was actually fixed. So maybe it was mislabeled as being fixed in 2018.3.9. I haven't updated to 2019.1.4 yet but maybe its a regression if you're still getting it. Have you tried a version above 2018.3.9 but lower than 2019.1.4? I'm on 2019.1.3f1 and don't seem to be getting this problem.
     
  8. io-games

    io-games

    Joined:
    Jun 2, 2016
    Posts:
    104
    Have no idea how but when I import Odin editor starts work slow, when delete Odin editor works faster
    MaterialEditor.OnEnable
    Unity 2019.1.10f1
    upload_2019-7-16_18-3-12.png
     
  9. io-games

    io-games

    Joined:
    Jun 2, 2016
    Posts:
    104
  10. ZenTeapot

    ZenTeapot

    Joined:
    Oct 19, 2014
    Posts:
    65
    This is still happening, confirmed in 2018.4.30f. For me it's an initial lag when click on the gameobject that requires a custom material editor. If I delete Odin this lag goes away. Very annoying, and hopefully there is a fix.
     
  11. io-games

    io-games

    Joined:
    Jun 2, 2016
    Posts:
    104
    path above works for me
    first lag is still exists, but after works smooth

    Same with you, problem goes away when delete odin, but I can not work without odin anymore)