Skip to content

Instantly share code, notes, and snippets.

Avatar

Draugor Draugor

View GitHub Profile
View SimplePool.cs
///
/// Simple pooling for Unity.
/// Author: Martin "quill18" Glaude (quill18@quill18.com)
/// Extended: Simon "Draugor" Wagner (https://www.twitter.com/Draugor_/)
/// Latest Version: https://gist.github.com/Draugor/00f2a47e5f649945fe4466dea7697024
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
/// UPDATES:
/// 2020-07-09: - Fixed a Bug with already inactive members getting Despawned again. thx AndySum (see: https://gist.github.com/Draugor/00f2a47e5f649945fe4466dea7697024#gistcomment-2642441)
/// 2020-06-30: - made the "parent" parameter avaible in the public API to spawn GameObjects as children
/// 2018-01-04: - Added Extension Method for Despawn on GameObjects
You can’t perform that action at this time.