Search Unity

[RELEASED] PoolGen - Networked Multi-object pooling system

Discussion in 'Assets and Asset Store' started by GibTreaty, Apr 5, 2017.

  1. GibTreaty

    GibTreaty

    Joined:
    Aug 25, 2010
    Posts:
    792


    Asset Store Link

    Documentation
    WebGL Example
    Networked Example (Standalone Player)
    Website


    Description

    PoolGen is a multi-object pooling system with a unique inspector to help you setup your object pools super quick!

    Features
    • UNET networking support via ClientScene.RegisterSpawnHandler (Coming Soon!)
    • Easy to use inspector with object previews
    • Handles different objects in a single pool manager
    • Random weighted chance spawning system
    • UnityEvents for OnPooled, OnSpawn, OnDespawn so you can setup events either through inspector or script
    • A scene with a very basic example of how to use this system
    • A handy ResetRigidbody component to zero out the velocities of the Rigidbody upon spawning
    Note: Some C# knowledge required to incorporate this into your project via scripting. Variables that need to be reset upon spawning/despawning must be implemented by you as this system will not automatically do it for you (ex. character health, level, etc.).


     
    Last edited: Apr 24, 2017
  2. GibTreaty

    GibTreaty

    Joined:
    Aug 25, 2010
    Posts:
    792
    UNET Networking support for server-controlled spawning has been added. Set the pool to be networked in the inspector, spawn the object on the server and it'll spawn for everyone! How cool is that? This feature will be in version 1.1 which has been submitted for review.
     
  3. GibTreaty

    GibTreaty

    Joined:
    Aug 25, 2010
    Posts:
    792
    I'm going to look into adding support for spawning from the client and having that object's authority be set to that client. I've been told it's possible!
     
  4. GibTreaty

    GibTreaty

    Joined:
    Aug 25, 2010
    Posts:
    792
  5. Jayme65

    Jayme65

    Joined:
    Dec 11, 2016
    Posts:
    94
    Hi,

    I've to create a Texture2D pool.
    How would I achieve this with PoolGen please?
     
    GibTreaty likes this.
  6. GibTreaty

    GibTreaty

    Joined:
    Aug 25, 2010
    Posts:
    792
    @Jayme65 PoolGen's main use is for pooling GameObjects. I don't think it would be appropriate to pool Texture2D assets. Unless you wanted to generate and store a reference to them per-GameObject through a component on each GameObject.

    Also, sorry for the delay replying!
     
    Last edited: Nov 28, 2017