UnityFx.Async Versions Save

Asynchronous operations (promises) for Unity3d.

v1.1.0

4 years ago

Added

  • Added Promise helper class with promise-specific helpers.
  • Added ThenSequence extensions.
  • Added unhandled exception event for Done promise extensions.
  • Added LoadSceneAsync extension method for AssetBundle.
  • Added AsyncUtility.LoadSceneAsync helper.
  • Added npm support.

Fixed

  • Fixed build issue for Unity 2018.3.

v1.0.2

4 years ago

Fixed

  • Fixed AsyncUtility.FrameUpdate not scheduling callbacks.

v1.0.1

5 years ago

NOTE: NuGet-only release to cover unlisted v1.0.0.

Changed

  • Deprecated all Task-related extension methods. They are considered out of the library scope.

v1.0.0

5 years ago

Added

  • Added more comments throughout the code.
  • Added Unity 2018.3 support (esp. support all target .NET frameworks in a single Asset Store package).
  • Added await support to YieldInstruction Unity class.
  • Added coroutine helpers (AsyncUtility.FromCoroutine).
  • Added helpers for loading assets from an AssetBundle.
  • Added AsyncUtility.FrameTime await helper.

Changed

  • Added DebuggerHidden attribute to some properties/methods to make stack traces a bit more friendly.
  • Renamed AsyncContinuationContext to AsyncCallbackOptions.
  • Renamed web request helper methods (added Async postfix to their names).
  • Moved Unity extension methods to UnityFx.Async.Extensions namespace (previously they were in namespace UnityFx.Async).

Fixed

  • Fixed web requests null result in cases when downloaded file failed to open.
  • Fixed AsyncUtility.AddCompletionCallback exception when adding new callbacks from another callback.
  • Fixed AsyncUpdateSource implementation to allow adding listeners from a callback.
  • Fixed AsyncCompletionSource.SetProgress implementation to allow setting progress when the operation is not started.

Removed

  • Removed many specialized IAsyncOperationCallbacks methods to make the interface as minimalistic as possible (new extension methods are added to compensate).
  • Removed (Try)SetExceptions methods/extensions and FromExceptions helpers.
  • Removed extension methods of the Animation class.
  • Removed WaitAsync extension methods of the Animator class.
  • Dropped MovieTexture support.

v0.9.8

5 years ago

Added

  • AsyncResult is now Task-like type and can be used as async method result value (requires C# 7.2).
  • Added new AsyncResult.FromAction overloads.
  • Added new SynchronizationContext extension methods (PostAsync, InvokeAsync etc).
  • Added extension methods for Socket, WebRequest, Stream BCL classes.

Changed

  • Moved BCL extension methods to namespace UnityFx.Async.Extensions (previously they were in namespace UnityFx.Async).

Fixed

  • Fixed AsyncResult completion callbacks to be called event if OnCompleted throws.
  • Fixed exception not been set for AsyncResult.FaultedOperation and AsyncResult.CanceledOperation.
  • Disabled MovieTexture helpers for iOS/Android (as it is not supported on mobiles).

Removed

  • Removed AsyncResultQueue.
  • Removed AsyncLazy.

v0.9.7

5 years ago

Added

  • Added convenience overloads for SetException-like methods accepting as error message string.
  • Added allocation optimizations for single-threaded applications (particularly for Unity3d). See AsyncResult.DefaultSynchronizationContext for more info.
  • Added new overloads for ConfigureAwait extensions accepting continuation options instead of boolean flag.
  • Added SynchronizationContext extension methods for Send/Post accepting Action as the delegate.
  • Added AsyncResult.Yield static method (workd exactly as Task.Yield).
  • Added AsyncUtility.AddFrameCallback helper for scheduling delegates for MonoBehaviour update loop.
  • Signed the assembly with a strong name.
  • Added performance benchmarks.
  • Added sandbox Unity project.

Changed

  • Moved several of IAsyncOperationEvents methods to the interface extensions.
  • Simplified AsyncLazy interface.

Fixed

  • Fixed error handling in AsyncOperationResult.

Removed

  • Removed Asset Store samples.
  • Dropped Unity 5.0 support (the minimum version supported is now 5.4).
  • Dropped WWW support for Unity 2018.3+ (it has been deprecated in Unity).

v0.9.6

5 years ago

Added

  • Added Play/Wait extension methods for Animation and Animator.
  • Added AsyncResult.IsStarted helper property.

Changed

  • Changed AsyncResult constructors argument order to avoid ambiguity in some cases.
  • Moved the package content to Plugins folder and remove assembly definition file.
  • Moved web request related helpers from AsyncUtility to AsyncWww class.
  • Changed AsyncUtility.SendToMainThread, AsyncUtility.PostToMainThread and AsyncUtility.InvokeOnMainThread implementation to use ConcurrentQueue for net46+ to avoid unnesesary locks.
  • Changed interface of AsyncResultQueue.

Removed

  • Removed IAsyncOperationEvents.TryAddCompletionCallback and IAsyncOperationEvents.TryAddProgressCallback methods. These methods are not needed in 99% of cases and may lead to logic errors in multi-threaded environment.

v0.9.5

5 years ago

Added

  • Added IAsyncOperation.Id property for easy operation identification.
  • Added AsyncUtility.GetText and AsyncUtility.GetBytes helpers.
  • Added ToTask extensions for AsyncOperation/UnityWebRequest/WWW.
  • AsyncResult now implements AsyncContinuation to enable easy operation chaining.

Fixed

  • Fixed compile warnings for Unity 2018.2.

Removed

  • Removed ToAsyncXxx extension methods for WWW and UnityWebRequest.
  • Removed MovieTexture related methods for Unity 2018.2 (the class is deprecated now).
  • Removed IAsyncSchedulable interface (it was just another form of IAsyncContinuation).

v0.9.4

5 years ago

Added

  • Added assembly definition file for Unity 2017.3+.
  • Added AsyncResult.FaultedOperation helper.
  • Added AsyncUtility.IsMainThread method.
  • Added AsyncUtility.GetAssetBundle, AsyncUtility.GetTexture, AsyncUtility.AudioClip and AsyncUtility.GetMovieTexture helper methods.
  • Added AssetBundleCreateRequest wrapper operation.
  • Added ThrowIfNonSuccess extension for IAsyncOperation.
  • Added ToEnum extension for IAsyncResult that converts an asynchronous operation (Task, AsyncResult etc) to enumerator.
  • Added IAsyncSchedulable interface - an abstraction of a schedulable entity.
  • Added AsyncLazy helper for initialization operations.

Fixed

  • Fixed compile warnings for some older Unity versions.
  • Fixed error handling for Unity operation wrappers.

Removed

  • Removed AggregateException class for net35.

v0.9.3

5 years ago

Added

  • Added push-based progress reporting support.
  • Added AsyncResult.Delay(float) overloads.
  • Added AsyncCreationOptions.SuppressCancellation option.
  • Added update sources for LateUpdate, FixedUpdate and end-of-frame updates.
  • Added SynchronizationContext for the main thread (if not set by Unity).
  • Added methods AsyncUtility.PostToMainThread, AsyncUtility.SendToMainThread as AsyncUtility.InvokeOnMainThread.
  • Added new FromAction overloads.

Changed

  • Significantly reduced number of memory allocations when adding continuations.
  • Changed signature of the IAsyncContinuation.Invoke method.
  • Changed AsyncResult.OnCancel implementation to do nothing (previously it threw NotSupportedException).

Fixed

  • Fixed exception when removing listeners while in AsyncUpdateSource.OnError / AsyncUpdateSource.OnCompleted / AsyncUpdateSource.Dispose.
  • Fixed AsyncResult.MoveNext to always return true while the operation is not completed.
  • Fixed AsyncResult construction code not working as intended when AsyncCreationOptions are specified.

Removed

  • Removed AsyncOperationCallback delegate type.