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.

Discussion VS allocating GC every frame

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

  1. GuirieSanchez

    GuirieSanchez

    Joined:
    Oct 12, 2021
    Posts:
    320
    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:
    22
    Which platform / build?
     
  3. GuirieSanchez

    GuirieSanchez

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