{"id":15292728,"url":"https://github.com/laicasaane/simple_setup_ecs_2d","last_synced_at":"2025-05-06T21:06:04.215Z","repository":{"id":255914985,"uuid":"853874900","full_name":"laicasaane/simple_setup_ecs_2d","owner":"laicasaane","description":"A simple setup for Unity ECS 2D (hybrid ECS)","archived":false,"fork":false,"pushed_at":"2025-02-03T13:37:23.000Z","size":5224,"stargazers_count":35,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T21:05:22.736Z","etag":null,"topics":["ecs","entity-component-system","spritesheet","unity","unity2d"],"latest_commit_sha":null,"homepage":"","language":"ShaderLab","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/laicasaane.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,"zenodo":null}},"created_at":"2024-09-07T19:20:45.000Z","updated_at":"2025-03-14T23:12:35.000Z","dependencies_parsed_at":"2024-11-21T08:18:42.743Z","dependency_job_id":"d0801e43-6344-4af9-b4aa-33374e3cbe73","html_url":"https://github.com/laicasaane/simple_setup_ecs_2d","commit_stats":null,"previous_names":["laicasaane/simple_setup_ecs_2d"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laicasaane%2Fsimple_setup_ecs_2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laicasaane%2Fsimple_setup_ecs_2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laicasaane%2Fsimple_setup_ecs_2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laicasaane%2Fsimple_setup_ecs_2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laicasaane","download_url":"https://codeload.github.com/laicasaane/simple_setup_ecs_2d/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252769397,"owners_count":21801376,"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":["ecs","entity-component-system","spritesheet","unity","unity2d"],"created_at":"2024-09-30T16:26:15.386Z","updated_at":"2025-05-06T21:06:04.196Z","avatar_url":"https://github.com/laicasaane.png","language":"ShaderLab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Setup for ECS 2D\n\n![spritesheet animations](docs~/preview.gif)\n\nThis repo demonstrates an approach to Unity ECS in 2D that answers these questions:\n\n- How to author and bake entity prefab for 2D character?\n- How to store and use information of spritesheets globally?\n- How to implement spritesheet animation logic in ECS?\n- How to synchronize sprite renderers with entities?\n- How to react to UI events in ECS?\n- How to implement object-pool for sprite presenters?\n- How to utilize [TransformAccessArray](https://docs.unity3d.com/ScriptReference/Jobs.TransformAccessArray.html)\nto update the transform of sprite presenters in parallel?\n- How to use Companion GameObject from Entities Hybrid?\n\n## Changelog\n\n### Version 3.0.0\n\nAdd more functionality\n\n- Spawn multiple characters\n- Randomly set the animation for each character\n- Automatically move characters\n- Can change global move speed for all characters in real-time\n- Destroy entities\n\n![spritesheet animations](docs~/preview-3.0.0.gif)\n\n### Version 3.1.0\n\n- Refactor some code\n- Teleport characters to the opposite side of the screen if they went out of bounds\n\n![spritesheet animations](docs~/preview-3.1.0.gif)\n\n### Version 4.0.0\n\n- Upgrade to Unity 6000.0.27\n- Fix a compilation error caused by missing TMPro\n- Add Entities Graphics and URP\n- Add a \"Version 2\" button that switch to Companion GameObject powered by Entities Hybrid\n- Make some changes to subscene and authoring to accomodate the Companion GameObject approach\n\n#### About companion GameObjects\n\nAs in the video below, when \"Version 1\" is still active, the entities will use GameObjects\nprovided by the [GameObjectPool](/Assets/Code/Managed/GameObjectPool.cs).\nThus in the Hierarchy window, GameObjects represent entities will be active too.\n\n![version 2](docs~/preview-4.0.0.gif)\n\nWhen \"Version 2\" is activated, entities from version 1 will be destroyed and entities for\nversion 2 will be spawned. This time, they will use Compnanion GameObjects provided\nby Entities Hybrid instead. Thus GameObjects on the Hierarchy window stay inactive.\n\n**Note:** As of now, Companion GameObjects generally stay invisible. We don't have any\npossible mean to directly inspect them.\n\n### Version 4.0.1\n\n- Correct subscene\n- Remove the code to add `Prefab` tag to prefab entities at runtime\n\n### Version 4.0.2\n\n- Remove `[BurstCompile]` on some `ISystem` methods and document the reason.\n\n## Credits\n\n- GandalfHardcore - Pixel Art Character Pack: https://gandalfhardcore.itch.io/free-pixel-art\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaicasaane%2Fsimple_setup_ecs_2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaicasaane%2Fsimple_setup_ecs_2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaicasaane%2Fsimple_setup_ecs_2d/lists"}