An open API service indexing awesome lists of open source software.

https://github.com/rossogames/rossoforge-pool

A lightweight object pooling system for Unity, designed for performance-critical applications. Includes support for data-driven configuration via ScriptableObjects
https://github.com/rossogames/rossoforge-pool

pooling unity-package unity3d

Last synced: 7 months ago
JSON representation

A lightweight object pooling system for Unity, designed for performance-critical applications. Includes support for data-driven configuration via ScriptableObjects

Awesome Lists containing this project

README

          

# Rosso Games


RossoForge

RossoForge - Pool


**RossoForge - Pool** A lightweight object pooling system for Unity, designed for performance-critical applications. Includes support for data-driven configuration via ScriptableObjects, runtime instantiation, and integration with a global service locator. Ideal for reducing GC allocations and improving scene performance in games with frequent object spawning.

The following dependencies must be installed
* com.unity.addressables
* [Rossoforge-Core](https://github.com/rossogames/Rossoforge-Core.git)
* [Rossoforge-Addressables](https://github.com/rossogames/Rossoforge-Addressables.git) (Optional)

Watch the tutorial on [Pending]

#
```csharp
// Initialize Service default
private void Awake()
{
ServiceLocator.SetLocator(new DefaultServiceLocator());
ServiceLocator.Register(new PoolService());
ServiceLocator.Initialize();
}

// Initialize Service with addressables
private void Awake()
{
var addressableService = new AddressableService();
ServiceLocator.SetLocator(new DefaultServiceLocator());
ServiceLocator.Register(addressableService);
ServiceLocator.Register(new PoolService(addressableService));
ServiceLocator.Initialize();
}

// Get the gameobject from the pool
_poolService.Get(_missilePoolData, transform.parent, transform.position, Space.World);
_poolService.GetAsync(_missilePoolData, transform.parent, transform.position, Space.World);

// Get the gameobject's component from the pool
_poolService.Get(_missilePoolData, transform.parent, transform.position, Space.World);
_poolService.GetAsync(_missilePoolData, transform.parent, transform.position, Space.World);

// Preload pool
_poolService.Populate(_missilePoolData);
_poolService.PopulateAsync(_missilePoolData);

```
#
This package is part of the **RossoForge** suite, designed to streamline and enhance Unity development workflows.

Developed by Agustin Rosso
https://www.linkedin.com/in/rossoagustin/