Giter VIP home page Giter VIP logo

pools's Introduction

Welcome to Expresso Bits Pools ๐Ÿ‘‹

Version Documentation License: MIT Twitter: ScriptsEngineer

Unity performance issues generating and destroying multiple objects? This simple library solves your problem in a simple way. With few steps your object can be reused several times, avoiding the garbage collector. Create Simple and Easy Pool of objects! This extension creates easy use of Pool with objects that are instantiated and destroyed, avoiding excessive use of memory and processing.

Features

โœ”๏ธ Simple use, Change only 2 line of your code!

โœ”๏ธ Interfaces for events.

โœ”๏ธ Pooler component for Unity Events.

Usage

Simple change Instantiate/Destroy method for this.InstantianteInPool/this.DestroyInPool!.

Before

      Instantiate(prefab);
      ...
      Destroy(gameObject);

After

    this.InstantiateFromPool(prefab);
    ...
    this.DestroyInPool(gameObject);

Advanced Usages

For more advanced use, scriptable Pool can be created by Expresso Bits/Pools/Pool

Pool

In the code just use:

    pool.Instantiate();
    ...
    pool.Destroy();

Install

With Git Url

To install open Window > Package Manager and click on the + package icon and choose "Add package from git url" and type:

https://github.com/ExpressoBits/Pools.git

and you're done!

With OpenUPM

  1. Add openupm registry. Click on the menu Edit -> Project settings..., and add a scoped registry like so:

Name: OpenUPM

Url: https://package.openupm.com

Scopes:

com.openupm br.com.expressobits

  1. Close the project settings
  2. Open the package manager. Click on menu Window -> Package Manager and select "Packages: My Registries", select the latest version of EB Pools and click install
  3. You may come back to the package manager to unistall EB Pools or upgrade it.

pools's People

Contributors

scriptsengineer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.