{"id":25791137,"url":"https://github.com/yanicksenn/unity-pools","last_synced_at":"2026-05-19T19:10:20.286Z","repository":{"id":134783694,"uuid":"470664018","full_name":"yanicksenn/unity-pools","owner":"yanicksenn","description":"Unity3d package allowing to pool frequently used GameObjects.","archived":false,"fork":false,"pushed_at":"2022-03-19T21:27:58.000Z","size":139,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T22:39:56.810Z","etag":null,"topics":["game-development","open-source","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yanicksenn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-16T16:26:13.000Z","updated_at":"2022-10-25T22:48:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"d09f0585-55f8-4f5c-8715-cff477a2a753","html_url":"https://github.com/yanicksenn/unity-pools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yanicksenn/unity-pools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanicksenn%2Funity-pools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanicksenn%2Funity-pools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanicksenn%2Funity-pools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanicksenn%2Funity-pools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanicksenn","download_url":"https://codeload.github.com/yanicksenn/unity-pools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanicksenn%2Funity-pools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33229106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T15:49:41.270Z","status":"ssl_error","status_checked_at":"2026-05-19T15:49:22.917Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-development","open-source","unity","unity3d"],"created_at":"2025-02-27T12:54:43.034Z","updated_at":"2026-05-19T19:10:20.253Z","avatar_url":"https://github.com/yanicksenn.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity-Pools\n\nUnity3d package allowing to pool frequently used GameObjects.\n\nFeedback is welcome.\n\n## Plug and Play\n1. Open \"Package Manager\"\n2. Choose \"Add package from git URL...\"\n3. Use the HTTPS URL of this repository:\n   `https://github.com/yanicksenn/unity-pools.git`\n4. Click \"Add\"\n\n## Usage\n\n- [Poolable](#user-content-poolable)\n- [Pool](#user-content-pool)\n- [Fetching](#user-content-fetching)\n- [Instantiation](#user-content-instantiation)\n\n### Creating Poolable\n\nAssign the `Poolable` component to the `GameObject` that should be pooled.\n\n![Poolable](./Documentation/poolable.png)\n\nConfiguring the `OnFetchEvent` allows to listen and handle whenever an instance of this poolable is fetched from a `Pool`. \n\n### Creating Pool\n\nAssign the `Pool` component to the `GameObject` that should manage all instances.\n\n![Pool](./Documentation/pool.png)\n\nReference the `GameObject` with the `Poolable` component within the `Pooled Object` field and set the `Initial Capacity` to a desired number.\n\n### Fetching\n\nIt is possible fetch instances from the `Pool` with the `Fetch()` method. It is possible to fetch as many instances as needed as long as the flag `Has Fixed Capacity` is not checked (Checking the flag prevents the creation of new instances when at capacity).\n\nInstances that are no longer needed can made available again by deactivating the `GameObject` (`gameObject.SetActive(false)`). \n\n```c#\npublic class MyGun : MonoBehaviour\n{\n    [SerializeField]\n    private Pool myBullets;\n    \n    [SerializeField]\n    private Transform myBore;\n    \n    public void Shoot() \n    {\n        var instance = myPool.Fetch();\n        instance.transform.position = myBore.transform.position;\n        instance.transform.rotation = myBore.transform.rotation;\n    }\n}\n```\n\nThe instances will be created in the scene root (no parent). It is possible to change the default parent by specifying a transform in the `Default Parent` field.\n\n### Instantiation\n\nIf a pool is allowed to grow and has no available instances an additional instance will be created. Therefore the pool capacity is increased by one. Sometimes it makes sense to additionally create a few more instance when growing. This can be accomplished by specifying the additional amount in the `Growing Capacity` field.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanicksenn%2Funity-pools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanicksenn%2Funity-pools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanicksenn%2Funity-pools/lists"}