Skip to content

Commit

Permalink
Merge branch 'hotfix/0.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
abogarsukov committed Jan 9, 2020
2 parents 0cb1892 + e9abb12 commit f34e5b3
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm publish Packages/UnityFx.Mvc
- run: npm publish Assets/Plugins/UnityFx.Mvc
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

Expand All @@ -26,6 +26,6 @@ jobs:
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm publish Packages/UnityFx.Mvc
- run: npm publish Assets/Plugins/UnityFx.Mvc
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
6 changes: 6 additions & 0 deletions Assets/Plugins/UnityFx.Mvc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.

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

## [0.2.1] - 2020.01.09

### Fixed
- Fixed IL2CPP compile error in `Presenter<>`.
- Fixed editor window to correctly detect selection in 2-column project window layout.

## [0.2.0] - 2020.01.05

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,11 @@ private static string GetPresentOptions(bool exclusive, bool popup, bool modal)

private static string GetSelectedPath()
{
var selection = Selection.activeObject;
var selection = Selection.assetGUIDs;

if (selection != null)
if (selection != null && selection.Length == 1)
{
var path = AssetDatabase.GetAssetPath(selection.GetInstanceID());
var path = AssetDatabase.GUIDToAssetPath(selection[0]);

if (!string.IsNullOrEmpty(path) && Directory.Exists(path))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ private static void AotCodegenHelper()
{
// NOTE: This method is needed for AOT compiler to generate code for PresentResult<,> specializations.
// It should never be executed, it's just here to mark specific type arguments as used.
new PresentResult<TController, object>(null, null, typeof(TController), PresentOptions.None, PresentArgs.Default);
new PresentResult<TController, int>(null, null, typeof(TController), PresentOptions.None, PresentArgs.Default);
new PresentResult<TController, object>(null, null);
new PresentResult<TController, int>(null, null);
}

#endif
Expand Down
2 changes: 1 addition & 1 deletion Assets/Plugins/UnityFx.Mvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.unityfx.mvc",
"version": "0.2.0",
"version": "0.2.1",
"displayName": "MVC framework for Unity.",
"description": "",
"unity": "2018.4",
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.

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

## [0.2.1] - 2020.01.09

### Fixed
- Fixed IL2CPP compile error in `Presenter<>`.
- Fixed editor window to correctly detect selection in 2-column project window layout.

## [0.2.0] - 2020.01.05

### Added
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Npm package is available at [npmjs.com](https://www.npmjs.com/package/com.unityf
}
],
"dependencies": {
"com.unityfx.mvc": "0.2.0"
"com.unityfx.mvc": "0.2.1"
}
}
```
Expand Down Expand Up @@ -87,7 +87,7 @@ Presenter uses `IServiceProvider` instance to resolve controller dependencies. I

### Controllers

Controller is any class that implements `IViewController` interface. There are several default controller implementations, like `ViewController` and `ViewController<TView>`. In most cases users should inherit new controllers from one of these. A controller constructor usually accepts at least an argument of type `IPresentContext`, which provides access to the its context (including the view).
Controller is any class that implements `IViewController` interface. There are several default controller implementations, like `ViewController` and `ViewController<TView>`. In most cases users should inherit new controllers from one of these. A controller constructor usually accepts at least an argument of type `IPresentContext`, which provides access to its context (including the view).

```csharp
public class SplashController : ViewController
Expand Down Expand Up @@ -128,7 +128,7 @@ public class MinimalView : View
```

### Dependency injection
*UnityFx.Mvc* controllers request dependencies explicitly via constructors. The framework has built-in support for dependency injection (DI). DI makes apps easier to test and maintain. Services are added as a constructor parameter, and the runtime resolves the service from the service container (via `IServiceProvider`). Services are typically defined using interfaces.
*UnityFx.Mvc* controllers request dependencies explicitly via constructors. The framework has built-in support for dependency injection (DI). DI makes apps easier to test and maintain. Services are added as a constructor parameters, and the runtime resolves specific service from the service container (via `IServiceProvider`). Services are typically defined using interfaces.

## Motivation
The project was initially created to help author with his [Unity3d](https://unity3d.com) projects. Client .NET applications in general (and Unity applications specifically) do not have a standard structure or any kind of architecturing guidelines (like ASP.NET). This is an attempt to create a small yet effective and usable application framework suitable for Unity projects.
Expand Down

0 comments on commit f34e5b3

Please sign in to comment.