Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

UnityEvents are generating lots of garbage

$
0
0
Internally, it seems that UnityEvents are holding an instance of type ArgumentCache that performs this logic on serialization / deserialization:
View attachment 158999

When profiling, i see these generate GC allocations (all due to performing Regex replacements):
View attachment 159000

Generally, this should only happens *once* when displaying the object, but in our game, we have different scenes added and destroyed dynamically (happens many times during a play session), so...

UnityEvents are generating lots of garbage

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>