Sebify

#gamedev vet, C# fan, DOD/ECS expert. Made Robocraft & Svelto.ECS.

@MartinTilo @marwi yes I meant those, anyway I don't know enough about their implementations to suggest anything

@MartinTilo @marwi are these all going through custom allocators?

@MartinTilo @marwi yeah possibly. It looks like they are not disposing or the cancellation token however that alone wouldn't explain the quantity of memory that was leaking, so there must be more to it

@MartinTilo @marwi the Unknown one is a big problem for me for sure. The InstantiateAsync bug turns out to be tracked and marked as fixed, but it is a lie (I am using 6000.1.7) issuetracker.unity3d.com/issue

also in relation to my previous post:

issuetracker.unity3d.com/issue

this is not solved, I can repro it in 6000.1.7 and 6000.0.26

all the cancellation tokens in the screenshot are leaked from InstantiateAsync

DO NOT use Object.InstantiateAsync. This hidden method must stay as it is. It causes massive leaks and me spending days to pinning it down. Eventually and sadly it wasn't Memory Profiler to help me but instead the still maintained (and now I know why) Heap Explorer plugin (you can find it on github).

At this point I think I am gonna write a blog post about the tools I am using for memory investigation on Android (and one day on iOS) #unity3d

@MartinTilo @marwi cool just letting you know that heap explorer ultimately was the key to unblock me, plus Object.InstantiateAsync should be banned until unity fixes the massive leak it has

@MartinTilo @marwi

another good one. HeapExplorer gave me a crucial clue that MemoryProfiler was not giving: the Linked1Cancellation token was linked to AsyncInstantiateOperation which is very likely linked to Object.InstantiateAsync

Unity Memory Profiler is great but it can be easily improved a ton.
The comparison window misses two fundamental features (why?!)
I need to be able to compare just the resident memory
I need to be able to compare the Memory Map tab too!
I am doing this work now without the comparison help

When people tell me how I use Unity I tell them (I kid you not)

vanilla c#, Il2CPP, burst, collections + SRP with custom rendering (potentially GPU Instancer plugin, MAYBE DOTS rendering on mobile, not sure), Asset bundles. No Monobehaviours, No Gameobjects.

WITH CAUTION:

UI toolkit (never tried but seems good, only exception for the MB/GO rule), VFX Graph

all the rest..is a waste of time (I'd include DOTS framework too because I would use Svelto.ECS obviously, but DOTS libraries are OK)

The addressables documentation used to have a very useful FAQ page, why is this gone? Especially the part on the addressable rebuild, there are info that are not found anywhere else in the docs!

docs.unity3d.com/Packages/com.

I cannot believe that some sweet unity features like shader level of detail are NOT mapped by any node in ShaderGraph yet...so sad

It's a while now I don't use target frame rate on android (using my own sleep instead), today I had another go since the incremental GC doesn't run when I ask it to run (manually), but inside WaitForTargetFPS, which is naturally driven by Application.TargetFrameRate.

I set TargetFrameRate 60 and it adds 11ms to a frame that already lasted 11ms? what the hell is going on here?!

what's the deal with Unity URP, RenderMeshInstanced and Reflection Probes? A lot of promises to fix the support, but then it never happened.

I wouldn't mind to use a super fast version of RenderMesh (which would fall back to SRP batching) but only if I could disable culling, which for some reason is an option that Unity devs think is useless sigh.

Did anyone already use a custom Static Analyser in Unity? Finding the right version of Microsoft.CodeAnalysis.CSharp is extremely time consuming, I don't understand why doesn't unity find a way to provide it. Also I wonder how Project Auditor works without it. Where can I find the right dll to use ?

I tried everything, all the possibile combinations, to force Unity to ignore specific warnings for specific assemblies. I cannot make the csc.rsp files work, suggestions from google do not work (let alone AI). What am I missing? This is not for the IDE, but just for the unity console.

C# devs, how hard would be to make generic overload through the where clause possible? I mean, I am already doing it, I just would like to avoid the namespace overhead.

So many things that could be theoretically done with generics have never been considered by the C# language committee

Unity Memory Profiler has an incredibly useful feature that I just noticed few days ago, it reports the object that reference a managed object and thus prevent garbage collection. In the image is not a good example, but it shows the powerful feature nevertheless

ok so you make fun of AI and whatever, vibe code is obviously a moronic concept, but AI is an incredibly useful too and does boost productivity also for game coders, where standards do not exist. Among the things it can do for me, code review is one of the most useful ones. Honestly I am happy to live in modern times.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst