Massive Memory Leak with entities

Hello guys,
In my most recent work on our project, I built the game to find a massive memory allocation seemingly out of nowhere. My previous branch doesn’t seem to have this problem, and it has surfaced out of nowhere. Every time I seem to manipulate URPMaterialPropertyEmissionColor I get massive memory allocations to GfxDeviceClient, sometimes as much as 1.5g per second. This allocation never leaves and seems to keep running. Keep in mind I have made no changes to this script in months. Also, whenever I’m spawning in new entities which represent resources in my game the allocation is also massive 500 mb per second.

Has anyone ever experienced something like this before? I’ve been trying to find the source for 2 days now and I’m just not getting any results.

Attached are some memory profiling things below.

1 Like
1 Like

Thank you, following this down to Adding in a MeshFilter and MeshRenderer into the baking subscene fixed my issue!

I’m currently developing a console, and it’s using a lot of memory even though installed the Entity package. In the build test, 10G memory was used before installing the Entity package, after installing the Entity package 30G memory was used.
Unity version 2022.3.45f1. :smiling_face_with_tear: