{"id":28712359,"url":"https://github.com/bcoffeedev/game-core-architecture-modular-singleton","last_synced_at":"2025-06-14T23:05:32.825Z","repository":{"id":299115966,"uuid":"999761125","full_name":"BcoffeeDev/game-core-architecture-modular-singleton","owner":"BcoffeeDev","description":"A lightweight modular initialization framework for Unity.","archived":false,"fork":false,"pushed_at":"2025-06-14T18:22:25.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-14T19:38:49.624Z","etag":null,"topics":["design-patterns","framework","modular","singleton","unity","unity-package"],"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/BcoffeeDev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2025-06-10T18:39:44.000Z","updated_at":"2025-06-14T18:22:28.000Z","dependencies_parsed_at":"2025-06-14T19:38:52.066Z","dependency_job_id":"8380bf6e-b61f-481e-88b9-915743ae4e8a","html_url":"https://github.com/BcoffeeDev/game-core-architecture-modular-singleton","commit_stats":null,"previous_names":["bcoffeedev/game-core-architecture-modular-singleton"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BcoffeeDev/game-core-architecture-modular-singleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BcoffeeDev%2Fgame-core-architecture-modular-singleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BcoffeeDev%2Fgame-core-architecture-modular-singleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BcoffeeDev%2Fgame-core-architecture-modular-singleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BcoffeeDev%2Fgame-core-architecture-modular-singleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BcoffeeDev","download_url":"https://codeload.github.com/BcoffeeDev/game-core-architecture-modular-singleton/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BcoffeeDev%2Fgame-core-architecture-modular-singleton/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259896120,"owners_count":22928330,"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":["design-patterns","framework","modular","singleton","unity","unity-package"],"created_at":"2025-06-14T23:05:32.065Z","updated_at":"2025-06-14T23:05:32.816Z","avatar_url":"https://github.com/BcoffeeDev.png","language":"C#","readme":"# 🧱 Modular Singleton Architecture for Unity\n\nA lightweight and extensible modular architecture framework for Unity projects.  \nThis package provides a centralized `BaseContainer\u003cT\u003e` system that manages the lifecycle of self-contained modules derived from `BaseModule`.\n\n## ✨ Features\n\n- 🧩 **Modular Design** – Create independent components by inheriting from `BaseModule`.\n- 📦 **Centralized Access** – Retrieve modules via `BaseContainer\u003cT\u003e.Instance.GetModule\u003cM\u003e()`.\n- 🔁 **Lifecycle Control** – Built-in initialization flow with callback registration.\n- 🌐 **Cross-Scene Support** – Optional `DontDestroyOnLoad` singleton pattern.\n- 🔍 **Type-Safe Access** – Generic module resolution without casting.\n\n## 📦 Installation\n\nTo install this package in your Unity project using the Unity Package Manager:\n\n1. Open your Unity project.\n2. Go to `Window \u003e Package Manager`.\n3. Click the `+` button in the top-left corner and select `Add package from Git URL...`\n4. Paste the following URL and click `Add`:\n\n```\nhttps://github.com/BcoffeeDev/game-core-architecture-modular-singleton.git\n```\n\nAlternatively, you can add it directly to your `manifest.json`:\n\n```json\n\"dependencies\": {\n  \"com.bcoffee-dev.architecture.modular.singleton\": \"https://github.com/BcoffeeDev/game-core-architecture-modular-singleton.git\"\n}\n```\n\n## 🚀 Getting Started\n\n1. Create a container by inheriting from `BaseContainer\u003cT\u003e`, and add it to your scene:\n```csharp\npublic class MyGameContainer : BaseContainer\u003cMyGameContainer\u003e { }\n```\n2. Implement your own modules by inheriting from `BaseModule`, and add them to the `modules` list in your container (either via the Inspector).\n3. Access modules in code:\n```csharp\nvar myModule = MyGameContainer.Instance.GetModule\u003cMyCustomModule\u003e();\nmyModule.DoSomething();\n```\n4. Optionally, register a callback to wait for module initialization:\n```csharp\nMyGameContainer.RegisterInitializeCallback(() =\u003e {\n    Debug.Log(\"All modules initialized!\");\n});\n```\n\n## 🧪 Use Case\n\nPerfect for:\n- Small to mid-sized Unity games or apps\n- Prototyping tools or internal systems\n- Projects needing clean and maintainable module organization\n\n## 📜 License\n\nMIT License © 2025 [bcoffee](https://github.com/bcoffee0630)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcoffeedev%2Fgame-core-architecture-modular-singleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcoffeedev%2Fgame-core-architecture-modular-singleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcoffeedev%2Fgame-core-architecture-modular-singleton/lists"}