Object-Pooling with C# in Unity

Offered By
Coursera Project Network
In this Guided Project, you will:

Create an Object-Pooler that instantiates and manages a collection of GameObjects.

Write a C# script that spawns GameObjects on a specified schedule.

Create assets to spawn and destroy objects, including particle effects.

Clock1.5 hours
BeginnerBeginner
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

In this one-hour, project-based course, you'll learn about the concept of object-pooling and its benefits in game-design. You'll learn how to write a simple class that will instantiate and store GameObjects for repeated reuse. You'll write methods that will allow the activation, return and recycling of the objects, to greatly improve memory and CPU efficiency of your games. The guided project will introduce you to the following coding concepts: - Instantiating, activating, repositioning and deactivating GameObjects - Pooling GameObjects in Queues - Spawning GameObjects from Pools

Skills you will develop

  • Video-game Development
  • C sharp (C#) Programming Language
  • Unity 3D
  • Unity
  • Application development

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Introduction and License Activation

  2. Create a Sample Prefab for Pooling

  3. Create the Object Pooler

  4. Create a Basic Spawner

  5. Return the Object to the ObjectPool

  6. Create a Pool for Explosion Effects

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.