From 51769b2224a1ffdf5bf9b5c1ea9bb8e83237df8a Mon Sep 17 00:00:00 2001 From: Ikiru Yoshizaki <3856350+guitarrapc@users.noreply.github.com> Date: Tue, 4 Aug 2020 13:20:33 +0900 Subject: [PATCH 1/5] chore: remove generate unity alf (activation license file) --- .github/workflows/build-debug.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build-debug.yml b/.github/workflows/build-debug.yml index d432c58..fbcdb17 100644 --- a/.github/workflows/build-debug.yml +++ b/.github/workflows/build-debug.yml @@ -42,13 +42,6 @@ jobs: steps: - run: apt update && apt install git -y - uses: actions/checkout@v2 - # create unity activation file and store to artifacts. - - run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -logFile -createManualActivationFile || exit 0 - - uses: actions/upload-artifact@v1 - with: - name: Unity_v${{ matrix.unity }}.alf - path: ./Unity_v${{ matrix.unity }}.alf - # activate Unity from manual license file(ulf) - run: echo -n "$UNITY_LICENSE" >> .Unity.ulf env: UNITY_LICENSE: ${{ secrets[matrix.license] }} From c99d3eb3c3ebee0a9de569ac4dad6f11f70f100d Mon Sep 17 00:00:00 2001 From: Yoshifumi Kawai Date: Wed, 5 Aug 2020 15:55:09 +0900 Subject: [PATCH 2/5] Update README.md --- README.md | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index e0e2898..43e7c0d 100644 --- a/README.md +++ b/README.md @@ -154,22 +154,19 @@ UniTask provides three pattern of extension methods. The type of `UniTask` can use utility like `UniTask.WhenAll`, `UniTask.WhenAny`. It is like Task.WhenAll/WhenAny but return type is more useful, returns value tuple so can deconsrtuct each result and pass multiple type. ```csharp -public class SceneAssets +public async UniTaskVoid LoadManyAsync() { - public SceneAssets() - { - // parallel load. - var (a, b, c) = await UniTask.WhenAll( - LoadAsSprite("foo"), - LoadAsSprite("bar"), - LoadAsSprite("baz")); - } + // parallel load. + var (a, b, c) = await UniTask.WhenAll( + LoadAsSprite("foo"), + LoadAsSprite("bar"), + LoadAsSprite("baz")); +} - async UniTask LoadAsSprite(string path) - { - var resource = await Resources.LoadAsync(path); - return (resource as Sprite); - } +async UniTask LoadAsSprite(string path) +{ + var resource = await Resources.LoadAsync(path); + return (resource as Sprite); } ``` From 3f3e03b83d2d16ce16930af1fbb310d010041266 Mon Sep 17 00:00:00 2001 From: Yoshifumi Kawai Date: Wed, 12 Aug 2020 11:22:52 +0900 Subject: [PATCH 3/5] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 43e7c0d..2f4f626 100644 --- a/README.md +++ b/README.md @@ -832,7 +832,15 @@ foreach (var (type, size) in TaskPool.GetCacheSizeInfo()) } ``` -> In UnityEditor profiler shows allocation of compiler generated AsyncStateMachine but it only occurs in debug(development) build. C# Compiler generate AsyncStateMachine as class on Debug build and as struct on Release build. +Allocation on Profiler +--- +In UnityEditor profiler shows allocation of compiler generated AsyncStateMachine but it only occurs in debug(development) build. C# Compiler generate AsyncStateMachine as class on Debug build and as struct on Release build. + +After Unity 2020.1 supports Code Optimization option on UnityEditor(right, footer). + +![](https://user-images.githubusercontent.com/46207/89967342-2f944600-dc8c-11ea-99fc-0b74527a16f6.png) + +You can change C# compiler optimization to release, it removes AsyncStateMachine allocation. Andalso optimization option can set via `Compilation.CompilationPipeline-codeOptimization`, and `Compilation.CodeOptimization`. UniTaskSynchronizationContext --- From f37278f2a69c98396b4de0dcf32470e2e5239fe5 Mon Sep 17 00:00:00 2001 From: neuecc Date: Wed, 12 Aug 2020 02:23:09 +0000 Subject: [PATCH 4/5] docs: update TOC --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2f4f626..1272c00 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Techinical details, see blog post: [UniTask v2 — Zero Allocation async/await f - [For Unit Testing](#for-unit-testing) - [Compare with Standard Task API](#compare-with-standard-task-api) - [Pooling Configuration](#pooling-configuration) +- [Allocation on Profiler](#allocation-on-profiler) - [UniTaskSynchronizationContext](#unitasksynchronizationcontext) - [API References](#api-references) - [UPM Package](#upm-package) From c6b7d332b2383757432475f8fcd0f693196124db Mon Sep 17 00:00:00 2001 From: Yoshifumi Kawai Date: Wed, 12 Aug 2020 11:41:21 +0900 Subject: [PATCH 5/5] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1272c00..5caf6cd 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,8 @@ UniTask provides three pattern of extension methods. > Note: WithCancellation is returned from native timing of PlayerLoop but ToUniTask is returned from specified PlayerLoopTiming. Details of timing, see: [PlayerLoop](#playerloop) section. +> Note: AssetBundleRequest has `asset` and `allAssets`, in default await returns `asset`. If you want to get `allAssets`, you can use `AwaitForAllAssets()` method. + The type of `UniTask` can use utility like `UniTask.WhenAll`, `UniTask.WhenAny`. It is like Task.WhenAll/WhenAny but return type is more useful, returns value tuple so can deconsrtuct each result and pass multiple type. ```csharp