Skip to content

Instantly share code, notes, and snippets.

View Guendeli's full-sized avatar
💭
6caVlL420IvU

Guendeli Omar Guendeli

💭
6caVlL420IvU
  • Ubisoft
  • Abu Dhabi - UAE
View GitHub Profile
@Guendeli
Guendeli / Pool.cs
Created April 24, 2019 19:39
Object pooler
/// Usage:
///
/// There's no need to do any special setup of any kind.
///
/// Instead of calling Instantiate(), use this:
/// SimplePool.Spawn(somePrefab, somePosition, someRotation);
///
/// Instead of destroying an object, use this:
/// SimplePool.Despawn(myGameObject);
///