Get unlimited access
Open in app
Home
Notifications
Lists
Stories

Write
Hernando Nieto Jaramillo
Hernando Nieto Jaramillo

Sep 29, 2021

·
2 min read

Optimizing Coroutines

In a game, we can have a GC (Garbage Collection) like this:

It’s not so much, but it is better to improve its performance

After diving into the EnemyDamage code, we may find this coroutine:

The yield return lines generate GC. To avoid this, we can cache those values:

--

--

More from Hernando Nieto Jaramillo

Unity developer

Love podcasts or audiobooks? Learn on the go with our new app.

Try Knowable

Recommended from Medium

Benilde HiFi

Benilde HiFi

in

Benilde HiFi

Team HiFi

Dinero Financial

Dinero Financial

Dinero has passed an Audit with SolidProof

Marcus Raitner

Marcus Raitner

in

The Startup

The Customer-Vendor Anti-Pattern

Dacio Romero

Dacio Romero

Fantastic Iterators and How to Make Them

Almost Engineer

Almost Engineer

Picking Numbers HackerRank Exercise

John Elliott

John Elliott

AWS Glue to Lambda via JSON

NulliusIn Verba

NulliusIn Verba

Sherlock Holmes Lived In A Cube Root

Ayoub NEJJARI

Ayoub NEJJARI

in

The TechCave

Real-Time Web with JavaScript — II

AboutHelpTermsPrivacy


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Hernando Nieto Jaramillo

Hernando Nieto Jaramillo

Unity developer

More from Medium

Michel Besnard

Michel Besnard

Adding Emissions to Custom Textures in Unity using Krita.

Tyler Smallwood

Tyler Smallwood

Day 108: Ladder System Part 2

GameDev Dustin

GameDev Dustin

Adding Multiple Animations to a Timeline

Farrukh Sajjad

Farrukh Sajjad

The right way to wrap your UI inside the safe area — Unity

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable