{"id":19704264,"url":"https://github.com/rimurudev/unity-actionupdaterservice","last_synced_at":"2026-04-11T21:02:43.402Z","repository":{"id":207455030,"uuid":"719293071","full_name":"RimuruDev/Unity-ActionUpdaterService","owner":"RimuruDev","description":"IActionUpdaterService is a flexible and easy-to-use service for Unity, designed to manage and dispatch update-related actions (FixedUpdate, Update, LateUpdate) outside of MonoBehaviour. It allows for a more modular approach to handling updates, especially useful in projects using dependency injection frameworks like Zenject.","archived":false,"fork":false,"pushed_at":"2023-11-15T21:34:33.000Z","size":525,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T11:48:02.116Z","etag":null,"topics":["architecture","dependencies","dependency-injection","dispatcher","extenject","nakama-unity","rimuru-dev","rimurudev","service","services","unity","unity-services","zenject"],"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/RimuruDev.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":"2023-11-15T21:30:32.000Z","updated_at":"2024-07-11T18:29:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0434cf3-28a7-47b6-a746-d61145009b02","html_url":"https://github.com/RimuruDev/Unity-ActionUpdaterService","commit_stats":null,"previous_names":["rimurudev/unity-actionupdaterservice"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-ActionUpdaterService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-ActionUpdaterService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-ActionUpdaterService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-ActionUpdaterService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RimuruDev","download_url":"https://codeload.github.com/RimuruDev/Unity-ActionUpdaterService/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241019977,"owners_count":19895352,"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":["architecture","dependencies","dependency-injection","dispatcher","extenject","nakama-unity","rimuru-dev","rimurudev","service","services","unity","unity-services","zenject"],"created_at":"2024-11-11T21:21:36.394Z","updated_at":"2026-04-11T21:02:38.350Z","avatar_url":"https://github.com/RimuruDev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ActionUpdaterService for Unity\n\n## Overview\n\n`IActionUpdaterService` is a flexible and easy-to-use service for Unity, designed to manage and dispatch update-related\nactions (`FixedUpdate`, `Update`, `LateUpdate`) outside of `MonoBehaviour`. It allows for a more modular approach to\nhandling updates, especially useful in projects using dependency injection frameworks like Zenject.\n\n## Features\n\n- Separate update methods (`FixedUpdate`, `Update`, `LateUpdate`) outside `MonoBehaviour`.\n- Easy subscription and unsubscription of actions.\n- Pause functionality to control the execution of update actions.\n- Automatic cleanup to prevent memory leaks.\n\n## Getting Started\n\n### Installation\n\n1. Import the `IActionUpdaterService` package into your Unity project.\n2. Add `ActionUpdaterService` and `ActionUpdateDispatcher` scripts to your project.\n\n### Zenject Binding\n\nBind the `IActionUpdaterService` in your Zenject installer like this:\n\n```csharp\npublic sealed class ServicesInstaller : MonoInstaller\n{\n    public override void InstallBindings()\n    {\n        Container.Bind\u003cIActionUpdaterService\u003e().To\u003cActionUpdaterService\u003e().AsSingle();\n    }\n}\n```\nDon't forget to add to the ProjectContext:\n\n![DocsMaterials/img.png](DocsMaterials/img.png)\n![DocsMaterials/img_1.png](DocsMaterials/img_1.png)\n\n# Dispatcher\nAdd the `ActionUpdateDispatcher` class to the ProjectContext prefab, Bootstrupper or any other object that will be the only one in the game.\n\n![img_2.png](DocsMaterials/img_2.png)\n\n# Usage\n\nInject IActionUpdaterService into your classes and subscribe to the desired update methods:\n\n```csharp\npublic sealed class YourClass\n{\n    private IActionUpdaterService actionUpdater;\n\n    [Inject]\n    private void Constructor(IActionUpdaterService actionUpdater) =\u003e\n        this.actionUpdater = actionUpdater;\n\n    public void SomeMethod()\n    {\n        actionUpdater.Subscribe(MyUpdateMethod, UpdateType.Update);\n    }\n\n    private void MyUpdateMethod()\n    {\n        // Your update logic here\n    }\n}\n```\n\nRemember to unsubscribe from the service to prevent memory leaks:\n\n```csharp\npublic void OnDestroy()\n{\n    actionUpdater.Unsubscribe(MyUpdateMethod, UpdateType.Update);\n}\n```\n\n# Pausing Updates\n\nYou can pause and resume the execution of update methods:\n\n```csharp\nactionUpdater.SetPause(true); // Pauses updates\nactionUpdater.SetPause(false); // Resumes updates\n```\n\n# Example\n![DocsMaterials/img_4.png](DocsMaterials/img_4.png)\n![DocsMaterials/img_3.png](DocsMaterials/img_3.png)\n\n# License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Credits\n\nDeveloped by RimuruDev.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frimurudev%2Funity-actionupdaterservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frimurudev%2Funity-actionupdaterservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frimurudev%2Funity-actionupdaterservice/lists"}