Easy Pooling View on Asset Store (opens in new tab)

Package details

Latest version
1.0
Last updated
First released
Unity version
2019.1.3 or later
Package size
62 KB
Files
20
Favorites
38
Views in the past week
10

Price tracking

Last checked
Tracked since
Lowest recorded
Free on

Easy Pooling

by TIGERFORGE (opens in new tab)

2 ratings, too few to average

Price Free

Get it free on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for Easy Pooling, 6 months Current Free; lowest Free; highest Free in this period. $0 Jun Jul Aug Sep Oct Nov

Asset preview

1 / 3

Easy Pooling screenshot 1

Easy Pooling screenshot 1

About this asset

Easy Pooling is a lightweight suite of Unity C# Scripts to implement a very easy and efficient Pooling System in your game projects. All the Scripts have comments to explain what they do and how they work.
The suite has 3 files: 2 ScriptableObject, and 1 MonoBehaviour Script.
The 2 ScriptableObjects activate the TigerForge > EasyPooling voices in the Project panel context menu.
From this menu, you can create Object Poolers and Audio Poolers.
The Object Pooler is designed for pooling GameObjects. Instead, the Audio Pooler manages and plays Audio Clips.
OBJECT POOLER
This Pooler just needs a GameObject reference. Optionally, you can set a number of objects that have to be instantiated on game start.
In your C# Scripts, just create a link to the Pooler and then use GetObject() method to get one or more objects managed by the Pooling System.
There are also other methods to obtain various information.
AUDIO POOLER
This Pooler just needs an Audio Clip reference. Optionally, you can define volume, a start delay and a number of clips that have to be instantiated on game start.
In your C# Scripts, just create a link to the Pooler and then use PlayAudio() method to play the clips managed by the Pooling System. There are also other methods to obtain various information.
TIGERFORGE NAMESPACE
To avoid class names conflicts, the Easy Pooling classes are inside TigerForge namespace. Just put a "using TigerForge" at the beginning of your C# Scripts.
POOLER MANAGER
The Pooler Manager is a MonoBehaviour Script that can be optionally used to manage your Poolers in a different way. Basically, using this Script, you don't need to link your Scripts to the Poolers.
Just create an Empty GameObject in your Scene and drag the EPPoolerManager script on it. In the Editor panel, now you have two arrays, one for all your Object Poolers, and one for your Audio Clip Poolers.
Now, in your C# Scripts you can call directly EPPoolerManager.GetObjectPooler(index) and EPPoolerManager.GetAudioPooler(index) to obtain the Poolers stored in the 2 arrays at index location.
DEMO PROJECTS
Two Demo Scenes are provided to better understand how the Pooling System works and can be used.
The "Demo" folder project shows how to use the two Scriptable Objects.
The "Demo2" folder project shows how to do the same operations using the alternative approach offered by the Pooler Manager Script.
SUPER-EASY TO USE
This is an example of a Player Script for making a Player able to shoot bullets.
using UnityEngine;
using TigerForge;
public class Player : MonoBehaviour
{
public EPObjectPoolerScriptableObject bulletPooler;
public EPAudioPoolerScriptableObject audioPooler;
// Update is called once per frame...
void Update()
{
// If I press the Space Bar...
if (Input.GetKeyUp(KeyCode.Space)) {
// I ask the Pooling System to create or reuse a bullet.
GameObject myBullet = bulletPooler.GetObject();
// I put this bullet where the player is located.
myBullet.transform.position = transform.position;
// I play the shoot audio fx, locating it in the player position.
AudioSource myShootAudio = audioPooler.PlayAudio(transform.position);
}
}
}

From the publisher's Asset Store listing.