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

Discussion VS allocating GC every frame

Discussion in 'Visual Scripting' started by GuirieSanchez, Aug 3, 2022.

  1. GuirieSanchez

    GuirieSanchez

    Joined:
    Oct 12, 2021
    Posts:
    406
    I was having a hard time tracking down some garbage that was being allocated every frame, and I finally found the reason was the
    VisualScripting GlobalEventListener
    GameObj that is created automatically in
    DontDestroyOnLoad
    , whose component is necessary to relay Unity messages to Visual Scripting. It adds a constant 368B of garbage per frame, every frame.

    Is anyone else aware of this? And, do you mind having this amount of GC allocation being added every frame?
     
  2. ncr100

    ncr100

    Joined:
    Jul 23, 2015
    Posts:
    32
    Which platform / build?
     
  3. GuirieSanchez

    GuirieSanchez

    Joined:
    Oct 12, 2021
    Posts:
    406
    PC (Windows).