Pool Extension
Creative Spore
$10.00
$20.00
50%OFF
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
09/28(2018) |
20.0 |
03/12(2019) |
10.0 |
11/22(2024) |
10.0 |
Jump AssetStore
Compatible with Unity 2017 & 2018!
Pool Extension is just an extension for Unity.Component that will extend the Unity methods Instantiate and Destroy to use a pool instead of creating and destroying gameObjects all the time, reducing the garbage memory allocation and improving the performance.
The same Unity events will be called for reused gameObjects (Awake, Start, Destroy) and you can restore prefabs properties and fields using the special attributes [PoolRestoreValue] and [PoolRestoreAllValues]
Manual | API Doc. | Forum
⭐ FEATURES ⭐
• Easy Setup and Use
Instead of Instantiate or Destroy, use this.PoolInstantiate and this.PoolDestroy.
Examples:
♻ Instanciate(bulletPrefab, transform.position, transform.rotation) ➡ this.PoolInstanciate(bulletPrefab, transform.position, transform.rotation)
♻ Destroy(this.gameObject, 4f) ➡ this.PoolDestroy(this.gameObject, 4f)
If you want to restore a field or property from the prefab in a custom Monobehaviour, use the attribute [PoolRestoreValue] before the field or property, and use [PoolRestoreAllValues] before the Monobehaviour class to restore all the properties and fields in the Monobehaviour.
Examples:
[PoolRestoreValue] public int Lives { get{ return m_lives;} set{ m_lives = value; } };
[PoolRestoreValue] private int m_lives = 3;
[PoolRestoreAllValues]
public class Enemy : Monobehaviour
{
}
• Extras:
♻ PoolAudioSource.PlayClipAtPoint & PoolAudioSource.PlayClipAtPoint2D: enhanced versions of AudioSource.PlayClipAtPoint using the pool extension.
• Great Support: If you need help with something, just contact the support email or forum.
Support: support@creativespore.com
Web: www.creativespore.com
Twitter: https://twitter.com/CreativeSpore