{"id":13661207,"url":"https://github.com/OlegDzhuraev/PerseidsPooling","last_synced_at":"2025-04-24T23:32:06.929Z","repository":{"id":125503211,"uuid":"293907557","full_name":"OlegDzhuraev/PerseidsPooling","owner":"OlegDzhuraev","description":"Simple object pooling implementation for Unity","archived":false,"fork":false,"pushed_at":"2023-08-04T10:11:59.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-10T15:45:41.929Z","etag":null,"topics":["gamedev","unity"],"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/OlegDzhuraev.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}},"created_at":"2020-09-08T19:27:40.000Z","updated_at":"2023-08-21T07:47:04.000Z","dependencies_parsed_at":"2024-01-26T19:19:47.354Z","dependency_job_id":"7a5666f0-7d96-4faa-b35b-9cd962c0bfd1","html_url":"https://github.com/OlegDzhuraev/PerseidsPooling","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OlegDzhuraev%2FPerseidsPooling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OlegDzhuraev%2FPerseidsPooling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OlegDzhuraev%2FPerseidsPooling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OlegDzhuraev%2FPerseidsPooling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OlegDzhuraev","download_url":"https://codeload.github.com/OlegDzhuraev/PerseidsPooling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250727748,"owners_count":21477366,"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":["gamedev","unity"],"created_at":"2024-08-02T05:01:31.040Z","updated_at":"2025-04-24T23:32:02.973Z","avatar_url":"https://github.com/OlegDzhuraev.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# Perseids Pooling\nPerseids Pooling is a basic object pooling implementation for Unity.\n\n## How to use?\nYou can check **Example** folder, it will show you classic use case. \n\nTo spawn poolable object (or activate it from the pool):\n```cs\nvar instance = Pool.Spawn(DamageablePrefab);\n```\n\nIt replaces GameObject.Instantiate, but only without arguments like position and rotation (in actual version).\n\nTo return object back to the pool:\n```cs\nPool.Back(instance); // you can use this code from any script, instance here is gameObject link, so it can be also Pool.Back(gameObject) etc.\n```\n\nIt will deactivate object and move it to the pool.\n\nYou also need to implement IResettable in all of your MonoBehaviour components, attached to the poolable objects, if there exist some data (variables), which should be resseted after respawn from the pool.\n\n```cs\npublic class Damageable : MonoBehaviour, IResettable\n{\n  [SerializeField] float maxHealth = 100;\n  [SerializeField] float health;\n        \n  void IResettable.ResetPooled()\n  {\n    health = maxHealth;\n  }\n}\n```\n\nWhen scene changed, you need to call\n```cs\nPool.Reset();\n```\nTo clean already pooled objects.\n\n### Utilities ###\nThere included some utilities which implements frequently used tools with pools.\n\n**DelayedPoolDestruction** - Simple timed destruction script, which returns object to a pool instead of destroying it.\n\n**PoolableParticleSystem** - Replays particle systems with Play on Awake enabled after every unpooling of the object.\n\n**LightFxTimedPoolable** - Can be used to play simple light animation effect every time object being unpooled.\n\n## License\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOlegDzhuraev%2FPerseidsPooling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOlegDzhuraev%2FPerseidsPooling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOlegDzhuraev%2FPerseidsPooling/lists"}