{"id":23331065,"url":"https://github.com/capsize-games/gameobjectpool","last_synced_at":"2025-04-07T10:47:33.077Z","repository":{"id":40491289,"uuid":"94722563","full_name":"Capsize-Games/GameObjectPool","owner":"Capsize-Games","description":"Unity3D GameObject pool manager","archived":false,"fork":false,"pushed_at":"2022-05-05T04:17:03.000Z","size":7673,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T13:24:44.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Capsize-Games.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}},"created_at":"2017-06-19T00:58:06.000Z","updated_at":"2022-05-06T02:04:45.000Z","dependencies_parsed_at":"2022-08-09T22:00:41.763Z","dependency_job_id":null,"html_url":"https://github.com/Capsize-Games/GameObjectPool","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capsize-Games%2FGameObjectPool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capsize-Games%2FGameObjectPool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capsize-Games%2FGameObjectPool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capsize-Games%2FGameObjectPool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Capsize-Games","download_url":"https://codeload.github.com/Capsize-Games/GameObjectPool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640509,"owners_count":20971553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-20T22:30:28.316Z","updated_at":"2025-04-07T10:47:33.030Z","avatar_url":"https://github.com/Capsize-Games.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GameObjectPool\n\n![Logo](https://user-images.githubusercontent.com/25737761/166617633-fc360248-09cd-49c9-80b4-dca6d281626d.png)\n\n***Average runtime of 0.0001930632 seconds to spawn an object using `PoolManager` based on 5000 iterations.***\n\n![alt text](Screenshots/example.gif)\n\nEasily create and access pools of GameObjects to save on memory.\n\n`GameObjectPool.Pool` extends `System.Collections.Generic.Queue` and takes\ninstructions in the form of `PoolSettings` objects.\n\n## PoolSettings\n\n- `Name` - the name of the pool\n- `Prefab` - the prefab item that will fill the pool\n- `Starting Item Count` - the number of items to initially create\n- `Max Item Count` - the number of items to add to the pool before triggering an error message\n- `Parent` - transform to parent pooled objects to\n- `Allow Unrestricted Growth` - allow pool to continue populating itself with objects after max reached\n\n## Using with a project\n\n### Installation\n\n1. [Get latest GameObjectPool.unitypackage release from Github](https://github.com/mdmnk/GameObjectPool/releases/latest)\n2. Import package into project through menu in Unity `Assets \u003e Import package \u003e Custom Package...`\n2. Uncheck example if you don't need it\n3. Add ObjectPool project to your version control ignore file\n\n### Scene setup\n\nAssign `GameObjectPool.PoolManager` to a game object in your main scene\n\n![alt text](Screenshots/objectpool_manager_inspector_1.png)\n\nOn that game object script set `Pool \u003e Size` to a number greater than zero and a list of properties called \"Element N\" will show up\n\n![alt text](Screenshots/objectpool_manager_inspector_size.png)\n\nSee `PoolSettings` in this file for information regarding the settings available\n\n![image](https://user-images.githubusercontent.com/25737761/166725509-bea923b5-fb23-4039-ac37-bf88db16b431.png)\n\nClicking on the \"Regenerate pool\" button will cause the Pool Manager to regenerate (or generate if clicked the first time) the pools according to the settings in the Pool Manager. This allows you to generate GameObjects for the pool within the editor rather than at run-time.\n\n**Note** Items will still be generated at run time if the pool does not have the minimum number of start items in it at run time.\n\n#### Get an object from a pool\n\n`GameObjectPool.PoolManager.Get(\"PoolName\")`\n\n#### Return an object to the pool\n\nUse the standard MonoBehaviour method `SetActive(false)` on the game object you want to disable and it will return to its pool.\n\n## Examples\n\nSee **Example \u003e Scenes \u003e Test** for sample usage involving shape spawning.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsize-games%2Fgameobjectpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapsize-games%2Fgameobjectpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsize-games%2Fgameobjectpool/lists"}