Skip to content

Commit 3ceb65c

Browse files
committed
Merge branch 'release/1.1.0'
2 parents c072cde + 86624f4 commit 3ceb65c

File tree

234 files changed

+20899
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+20899
-165
lines changed

.gitmodules

-4
This file was deleted.

CHANGELOG.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,30 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/); this project adheres to [Semantic Versioning](http://semver.org/).
55

6+
-----------------------
7+
## [1.1.0] - unleleased
8+
9+
### Added
10+
- Added `Promise` helper class with promise-specific helpers.
11+
- Added `ThenSequence` extensions.
12+
- Added unhandled exception event for `Done` promise extensions.
13+
- Added `LoadSceneAsync` extension method for `AssetBundle`.
14+
- Added `AsyncUtility.LoadSceneAsync` helper.
15+
- Added `npm` support.
16+
17+
## Fixed
18+
- Fixed build issue for Unity 2018.3.
19+
620
-----------------------
721
## [1.0.2] - 2019.05.19
822

923
### Fixed
10-
- Fixed `AsyncUtility.FrameUpdate()` not scheduling callbacks as expected.
24+
- Fixed `AsyncUtility.FrameUpdate` not scheduling the callback.
1125

1226
-----------------------
1327
## [1.0.1] - 2019.04.09
1428

15-
NOTE: NuGet-only release to instead of not published v1.0.0.
29+
NOTE: NuGet-only release instead of not published v1.0.0.
1630

1731
### Changed
1832
- Deprecated all `Task`-related extension methods. They are considered out of the library scope.

README.md

+27-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
Channel | UnityFx.Async |
44
---------|---------------|
55
AppVeyor | [![Build status](https://ci.appveyor.com/api/projects/status/hfmq9vow53al7tpd/branch/master?svg=true)](https://ci.appveyor.com/project/Arvtesh/unityfx-async/branch/master) [![AppVeyor tests](https://img.shields.io/appveyor/tests/Arvtesh/unityFx-async.svg)](https://ci.appveyor.com/project/Arvtesh/unityfx-async/build/tests)
6-
NuGet | [![NuGet](https://img.shields.io/nuget/v/UnityFx.Async.svg)](https://www.nuget.org/packages/UnityFx.Async)
6+
NuGet | [![NuGet](https://img.shields.io/nuget/v/UnityFx.Async.svg)](https://www.nuget.org/packages/UnityFx.Async) ![Nuget](https://img.shields.io/nuget/dt/UnityFx.Async)
7+
Npm | [![Npm release](https://img.shields.io/npm/v/com.unityfx.async.svg)](https://www.npmjs.com/package/com.unityfx.async) ![npm](https://img.shields.io/npm/dt/com.unityfx.async)
78
Github | [![GitHub release](https://img.shields.io/github/release/Arvtesh/UnityFx.Async.svg?logo=github)](https://github.com/Arvtesh/UnityFx.Async/releases)
8-
Unity Asset Store | [![Asynchronous operations for Unity](https://img.shields.io/badge/tools-v1.0.0-green.svg)](https://assetstore.unity.com/packages/tools/asynchronous-operations-for-unity-96696)
9+
Unity Asset Store | [![Asynchronous operations for Unity](https://img.shields.io/badge/tools-v1.1.0-green.svg)](https://assetstore.unity.com/packages/tools/asynchronous-operations-for-unity-96696)
910

1011
**Requires Unity 5.4 or higher.**
1112

@@ -17,10 +18,11 @@ Unity Asset Store | [![Asynchronous operations for Unity](https://img.shields.io
1718

1819
*UnityFx.Async* introduces effective and portable asynchronous operations that can be used very much like [Tasks](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task) in .NET or [Promises](https://developers.google.com/web/fundamentals/primers/promises) in JS. [AsyncResult](https://arvtesh.github.io/UnityFx.Async/api/netstandard2.0/UnityFx.Async.AsyncResult.html) class is an implementation of a generic asynchronous operation (aka `promise` or `future`). In many aspects it mimics [Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task) (for example, it can be used with `async`/`await` operators, supports continuations and synchronization context capturing) while maintaining Unity/net35 compatibility. It is a great foundation toolset for any Unity project.
1920

20-
Library is designed as a lightweight [Unity3d](https://unity3d.com)-compatible [Tasks](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task) alternative (not a replacement though). Main design goals are:
21+
Library is designed as a lightweight [Unity3d](https://unity3d.com)-compatible [Tasks](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task) alternative. Main design goals are:
2122
- Minimum object size and number of allocations.
2223
- Extensibility. The library entities are designed to be easily extensible.
2324
- Thread-safe. The library classes can be safely used from different threads (unless explicitly stated otherwise).
25+
- [Promises](https://developers.google.com/web/fundamentals/primers/promises) support. All asyncronous operations in library support promise-like programming.
2426
- [Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)-like interface and behaviour. In many cases library classes can be used much like corresponding [TPL](https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/task-parallel-library-tpl) entities.
2527
- [Unity3d](https://unity3d.com)-specific features and compatibility. This includes possibility to <c>yield</c> operations in coroutines, `net35`-compilance, extensions of Unity asynchronous operations etc.
2628

@@ -55,11 +57,31 @@ You may need the following software installed in order to build/use the library:
5557
You can get the code by cloning the github repository using your preffered git client UI or you can do it from command line as follows:
5658
```cmd
5759
git clone https://github.com/Arvtesh/UnityFx.Async.git
58-
git submodule -q update --init
5960
```
6061
### Getting binaries
6162
The binaries are available as a [NuGet package](https://www.nuget.org/packages/UnityFx.Async). See [here](http://docs.nuget.org/docs/start-here/using-the-package-manager-console) for instructions on installing a package via nuget. One can also download them directly from [Github releases](https://github.com/Arvtesh/UnityFx.Async/releases). Unity3d users can import corresponding [Unity Asset Store package](https://assetstore.unity.com/packages/tools/asynchronous-operations-for-unity-96696) using the editor.
6263

64+
### Npm package
65+
[![NPM](https://nodei.co/npm/com.unityfx.async.png)](https://www.npmjs.com/package/com.unityfx.async)
66+
67+
Npm package is available at [npmjs.com](https://www.npmjs.com/package/com.unityfx.async). To use it, add the following line to dependencies section of your `manifest.json`. Unity should download and link the package automatically:
68+
```json
69+
{
70+
"scopedRegistries": [
71+
{
72+
"name": "Arvtesh",
73+
"url": "https://registry.npmjs.org/",
74+
"scopes": [
75+
"com.unityfx"
76+
]
77+
}
78+
],
79+
"dependencies": {
80+
"com.unityfx.async": "1.1.0"
81+
}
82+
}
83+
```
84+
6385
### Unity dependencies
6486
The library core (`UnityFx.Async.dll`) does not depend on Unity and can be used in any .NET project (via assembly or [NuGet](https://www.nuget.org/packages/UnityFx.Async) reference). All Unity-specific stuff depends on the core and is included in [Asset Store package](https://assetstore.unity.com/packages/tools/asynchronous-operations-for-unity-96696).
6587

@@ -315,7 +337,7 @@ DownloadTextAsync("http://www.google.com")
315337
.ContinueWith(op => Debug.Log("2"), AsyncContinuationOptions.NotOnCanceled)
316338
.ContinueWith(op => Debug.Log("3"), AsyncContinuationOptions.OnlyOnFaulted);
317339
```
318-
`Done()` acts like a combination of `Catch()` and `Finally()`. It should always be the last element of the chain:
340+
`Done()` acts like a combination of `Catch()` and `Finally()`. It should always be the last element of the chain. Note that `Done()` also routes unhandled exceptions to `Promise.UnhandledException` static event:
319341
```csharp
320342
DownloadTextAsync("http://www.google.com")
321343
.Then(text => ExtractFirstUrl(text))

src/CodingConventions

-1
This file was deleted.
+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Use tabs for indentation.
7+
[*]
8+
indent_style = tab
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
12+
13+
# Code files
14+
[*.{cs,csx,vb,vbx}]
15+
indent_size = 4
16+
17+
# Xml project files
18+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
19+
indent_size = 2
20+
21+
# Xml config files
22+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
23+
indent_size = 2
24+
25+
# Yml config files
26+
[*.{yml,yaml}]
27+
indent_style = space
28+
indent_size = 2
29+
30+
# JSON files
31+
[*.json]
32+
indent_size = 2
33+
34+
# Dotnet code style settings:
35+
[*.{cs,vb}]
36+
# Sort using and Import directives with System.* appearing first
37+
dotnet_sort_system_directives_first = true
38+
39+
# Avoid "this." and "Me." if not necessary
40+
dotnet_style_qualification_for_field = false:suggestion
41+
dotnet_style_qualification_for_property = false:suggestion
42+
dotnet_style_qualification_for_method = false:suggestion
43+
dotnet_style_qualification_for_event = false:suggestion
44+
45+
# Use language keywords instead of framework type names for type references
46+
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
47+
dotnet_style_predefined_type_for_member_access = true:warning
48+
49+
# Suggest more modern language features when available
50+
dotnet_style_object_initializer = true:suggestion
51+
dotnet_style_collection_initializer = true:suggestion
52+
dotnet_style_coalesce_expression = true:warning
53+
dotnet_style_null_propagation = true:warning
54+
dotnet_style_explicit_tuple_names = true:suggestion
55+
56+
# CSharp code style settings:
57+
[*.cs]
58+
# Prefer "var" everywhere
59+
csharp_style_var_for_built_in_types = true:suggestion
60+
csharp_style_var_when_type_is_apparent = true:warning
61+
csharp_style_var_elsewhere = true:warning
62+
63+
# Prefer method-like constructs to have a block body
64+
csharp_style_expression_bodied_methods = false:none
65+
csharp_style_expression_bodied_constructors = false:none
66+
csharp_style_expression_bodied_operators = false:none
67+
68+
# Prefer property-like constructs to have an expression-body
69+
csharp_style_expression_bodied_properties = true:suggestion
70+
csharp_style_expression_bodied_indexers = true:suggestion
71+
csharp_style_expression_bodied_accessors = true:none
72+
73+
# Suggest more modern language features when available
74+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
75+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
76+
csharp_style_inlined_variable_declaration = true:warning
77+
csharp_style_throw_expression = true:suggestion
78+
csharp_style_conditional_delegate_call = true:suggestion
79+
csharp_style_deconstructed_variable_declaration = true:suggestion
80+
81+
csharp_prefer_simple_default_expression = true:suggestion
82+
csharp_prefer_braces = true:warning
83+
84+
# Newline settings
85+
csharp_new_line_before_open_brace = all
86+
csharp_new_line_before_else = true
87+
csharp_new_line_before_catch = true
88+
csharp_new_line_before_finally = true
89+
csharp_new_line_before_members_in_object_initializers = true
90+
csharp_new_line_before_members_in_anonymous_types = true
91+
csharp_new_line_between_query_expression_clauses = true
92+
93+
# Formatting settings
94+
csharp_indent_case_contents = true
95+
csharp_indent_switch_labels = true
96+
csharp_indent_labels = flush_left
97+
98+
csharp_space_after_cast = false
99+
csharp_space_after_keywords_in_control_flow_statements = true
100+
csharp_space_between_method_declaration_parameter_list_parentheses = false
101+
csharp_space_between_method_call_parameter_list_parentheses = false
102+
csharp_space_between_parentheses = false
103+
104+
csharp_preserve_single_line_statements = false
105+
csharp_preserve_single_line_blocks = true
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
3+
"settings": {
4+
"documentationRules": {
5+
"documentationCulture": "en-US",
6+
"documentInternalElements": false,
7+
"xmlHeader": false,
8+
"copyrightText": "Copyright (c) 2018-2020 {companyName}.\nLicensed under the {licenseName} license. See the {licenseFile} file in the project root for more information.",
9+
"companyName": "Alexander Bogarsukov",
10+
"variables": {
11+
"licenseName": "MIT",
12+
"licenseFile": "LICENSE.md"
13+
}
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)