{"id":13661337,"url":"https://github.com/garettbass/UnityExtensions.EditorCoroutine","last_synced_at":"2025-04-25T02:32:33.986Z","repository":{"id":88957521,"uuid":"132171175","full_name":"garettbass/UnityExtensions.EditorCoroutine","owner":"garettbass","description":"UnityExtensions.EditorCoroutine makes it easy to run coroutines from Unity editor code.","archived":false,"fork":false,"pushed_at":"2018-05-04T17:56:54.000Z","size":5,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T12:00:19.622Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garettbass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-05-04T17:43:00.000Z","updated_at":"2024-08-28T19:09:13.000Z","dependencies_parsed_at":"2023-06-13T08:00:12.151Z","dependency_job_id":null,"html_url":"https://github.com/garettbass/UnityExtensions.EditorCoroutine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garettbass%2FUnityExtensions.EditorCoroutine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garettbass%2FUnityExtensions.EditorCoroutine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garettbass%2FUnityExtensions.EditorCoroutine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garettbass%2FUnityExtensions.EditorCoroutine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garettbass","download_url":"https://codeload.github.com/garettbass/UnityExtensions.EditorCoroutine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250742029,"owners_count":21479716,"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-08-02T05:01:32.869Z","updated_at":"2025-04-25T02:32:33.744Z","avatar_url":"https://github.com/garettbass.png","language":"C#","readme":"# `UnityExtensions.EditorCoroutine`\n\nThe `EditorCoroutine` class implements a disposable coroutine runner that will\nexecute one iteration on each `EditorApplication.update` callback.\n\nIf the coroutine `yields` another `IEnumerator`, that subroutine will be \niterated to completion before the parent coroutine continues.\n\n**NOTE:** There is explicit support for `UnityEngine.WaitForSeconds`, but other\n`UnityEngine.YieldInstruction` subclasses will not function as documented when\nrunning in the editor.\n\n```cs\nstatic class Sample\n{\n\n    public static void CountToTen()\n    {\n        EditorCoroutine.Start(CountToTenCoroutine());\n    }\n\n    private static IEnumerator CountToTenCoroutine()\n    {\n        for (var i = 1; i \u003c= 10; ++i)\n        {\n            Debug.LogFormat(\"{0}\", i);\n\n            // yield until next EditorApplication.update\n            yield return null;\n\n            // yield until 1 second has passed\n            yield return new WaitForSeconds(1);\n        }\n\n        // yield until a subroutine has completed\n        yield return CountToTenCompletedSubroutine();\n    }\n\n    private static IEnumerator CountToTenCompletedSubroutine()\n    {\n        Debug.LogFormat(\"DONE!\");\n\n        yield break;\n    }\n\n}\n```\n\n# License\n\n## [The MIT License (MIT)](https://mit-license.org)\nCopyright © 2018\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","funding_links":[],"categories":["C\\#","Coroutine"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarettbass%2FUnityExtensions.EditorCoroutine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarettbass%2FUnityExtensions.EditorCoroutine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarettbass%2FUnityExtensions.EditorCoroutine/lists"}