Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.unityfx.async

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.unityfx.async

UnityFx.Async introduces effective and portable asynchronous operations that can be used very much like Tasks in .NET and Promises in JS.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
increased by37.35%
Maintainers
1
Weekly downloads
 
Created
Source

UnityFx.Async

Requires Unity 2018.3 or higher.

SUMMARY

Lightweight Task-like asynchronous operations (promises) for Unity3d.

Library is designed as a lightweight Unity3d-compatible Tasks alternative. Main design goals are:

  • Minimum object size and number of allocations.
  • Extensibility. The library entities are designed to be easily extensible.
  • Thread-safe. The library classes can be safely used from different threads (unless explicitly stated otherwise).
  • Promises support. All asyncronous operations in library support promise-like programming.
  • Task-like interface and behaviour. In many cases library classes can be used much like corresponding TPL entities.
  • Unity3d-specific features and compatibility. This includes possibility to yield operations in coroutines, net35-compilance, extensions of Unity asynchronous operations etc.

The table below summarizes differences berween UnityFx.Async and other popular asynchronous operation frameworks:

StatUnityFx.AsyncC-Sharp-PromiseTPL
Thread-safe✔️-✔️
.NET 3.5 compilance✔️✔️-
Supports SynchronizationContext capturing✔️-✔️
Supports continuations✔️✔️✔️
Supports Unity coroutines️✔️--
Supports async / await✔️-✔️
Supports promise-like continuations✔️✔️-
Supports cancellation✔️-✔️
Supports progress reporting✔️✔️✔️
Supports child operations--✔️
Supports Task-like types (requires C# 7.2)✔️-✔️
Supports ExecutionContext flow--✔️
Minimum allocations per continuation~15+2+

NOTE: As the table states ExecutionContext flow is NOT supported. Please use Tasks if you need it.

USAGE

Npm package is available at npmjs.com. To use it, add the following line to dependencies section of your manifest.json. Unity should download and link the package automatically:

{
  "scopedRegistries": [
    {
      "name": "Arvtesh",
      "url": "https://registry.npmjs.org/",
      "scopes": [
        "com.unityfx"
      ]
    }
  ],
  "dependencies": {
    "com.unityfx.async": "1.1.0"
  }
}

Keywords

FAQs

Package last updated on 18 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc