{"id":13730988,"url":"https://github.com/coryleach/UnityAsync","last_synced_at":"2025-05-08T03:32:36.147Z","repository":{"id":138391102,"uuid":"205254593","full_name":"coryleach/UnityAsync","owner":"coryleach","description":"Task and Async Utility Package for Unity. Start co-routines from anywhere.","archived":false,"fork":false,"pushed_at":"2023-08-30T17:28:59.000Z","size":87,"stargazers_count":85,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-12T17:03:01.261Z","etag":null,"topics":["async","async-utility","coroutine","openupm","package","package-manager","tasks","unity","unity-package","unity-scripts","unity-thread","unity3d","unity3d-plugin","unitypackage","upm"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coryleach.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-08-29T21:38:45.000Z","updated_at":"2024-11-04T18:52:27.000Z","dependencies_parsed_at":"2024-09-22T11:02:22.665Z","dependency_job_id":null,"html_url":"https://github.com/coryleach/UnityAsync","commit_stats":{"total_commits":75,"total_committers":3,"mean_commits":25.0,"dds":0.06666666666666665,"last_synced_commit":"be6b8a77aa0fee2dfe59f5b3e12e5b5a2ca9785f"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryleach%2FUnityAsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryleach%2FUnityAsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryleach%2FUnityAsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryleach%2FUnityAsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coryleach","download_url":"https://codeload.github.com/coryleach/UnityAsync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224315396,"owners_count":17290992,"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":["async","async-utility","coroutine","openupm","package","package-manager","tasks","unity","unity-package","unity-scripts","unity-thread","unity3d","unity3d-plugin","unitypackage","upm"],"created_at":"2024-08-03T02:01:22.403Z","updated_at":"2024-11-14T21:32:02.280Z","avatar_url":"https://github.com/coryleach.png","language":"C#","readme":"\u003cp align=\"center\"\u003e\n\u003cimg align=\"center\" src=\"https://raw.githubusercontent.com/coryleach/UnityPackages/master/Documentation/GameframeFace.gif\" /\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eGameframe.Async 👋\u003c/h1\u003e\n\n\u003c!-- BADGE-START --\u003e\n![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/coryleach/UnityAsync?include_prereleases)\n[![openupm](https://img.shields.io/npm/v/com.gameframe.async?label=openupm\u0026amp;registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gameframe.async/)\n[![license](https://img.shields.io/github/license/coryleach/UnityAsync)](https://github.com/coryleach/UnityAsync/blob/master/LICENSE)\n[![twitter](https://img.shields.io/twitter/follow/coryleach.svg?style=social)](https://twitter.com/coryleach)\n\u003c!-- BADGE-END --\u003e\n\n\u003e Async task utility package for Unity    \n\u003e Helper methods for starting tasks on the Unity thread.    \n\u003e Start and await coroutines from any thread.\n\n## Quick Package Install\n\n#### Using UnityPackageManager (for Unity 2019.3 or later)\nOpen the package manager window (menu: Window \u003e Package Manager)\u003cbr/\u003e\nSelect \"Add package from git URL...\", fill in the pop-up with the following link:\u003cbr/\u003e\nhttps://github.com/coryleach/UnityAsync.git#1.0.7\u003cbr/\u003e\n\n#### Using UnityPackageManager (for Unity 2019.1 or later)\n\nFind the manifest.json file in the Packages folder of your project and edit it to look like this:\n```js\n{\n  \"dependencies\": {\n    \"com.gameframe.async\": \"https://github.com/coryleach/UnityAsync.git#1.0.7\",\n    ...\n  },\n}\n```\n\n\u003c!-- DOC-START --\u003e\n\u003c!--\nChanges between 'DOC START' and 'DOC END' will not be modified by readme update scripts\n--\u003e\n\n### Using OpenUPM\n\nThe package is available on the [openupm registry](https://openupm.com). It's recommended to install it via [openupm-cli](https://github.com/openupm/openupm-cli).\n\n```console\nopenupm add com.gameframe.async\n```\n\n## Quick Start\n\n### Start and Await a coroutine from anywhere\n```c#\n//Start a coroutine from anywhere without a monobehaviour\n//Your coroutine will run on the main thread\nvar task = CoroutineRunner.RunAsync(MyCoroutine());\n//You can await the returned task which will complete when the coroutine is done\nawait task;\n```\n\n### Start a Task on the main unity thread from anywhere\n```c#\n//This will execute MyMethod on the main Unity thread\nvar task = UnityTaskUtil.RunOnUnityThreadAsync(MyMethod);\n//A task is returned that you can await\nawait task;\n```\n\n### Switch between Main thread and Background thread in any task\n```c#\n\n// Currently on main thread\nawait Awaiters.BackgroundThread;\n//You should now be on a background thread\n\n//Await one frame\nawait Awaiters.NextFrame;\n\n//Currently on a background thread\nawait Awaiters.MainUnityThread;\n//Task is now running on the Unity main thread\n\n```\n\n\u003c!-- DOC-END --\u003e\n\n## Author\n\n👤 **Cory Leach**\n\n* Twitter: [@coryleach](https://twitter.com/coryleach)\n* Github: [@coryleach](https://github.com/coryleach)\n\n\n## Show your support\nGive a ⭐️ if this project helped you!\n\n\n***\n_This README was generated with ❤️ by [Gameframe.Packages](https://github.com/coryleach/unitypackages)_\n","funding_links":[],"categories":["C#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryleach%2FUnityAsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoryleach%2FUnityAsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryleach%2FUnityAsync/lists"}