From ce94320a8c1426a92ea8c39081f644e2edc0ef6f Mon Sep 17 00:00:00 2001 From: Alexander Bogarsukov Date: Sun, 5 Jan 2020 23:40:02 +0200 Subject: [PATCH 1/6] Fixed npmpublish package path (cherry picked from commit 1460fc8cbc62f530b2406fe395702189bbf1e6ae) --- .github/workflows/npmpublish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 9e594dc..c32f7ed 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -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}} @@ -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}} From 87c3591d5385d84095bfe41bc8430c5b763ebbe7 Mon Sep 17 00:00:00 2001 From: Alexander Bogarsukov Date: Thu, 9 Jan 2020 12:10:29 +0200 Subject: [PATCH 2/6] Fixed IL2CPP compile error --- .../Runtime/Core/Presenters/Presenter{TController}.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Plugins/UnityFx.Mvc/Runtime/Core/Presenters/Presenter{TController}.cs b/Assets/Plugins/UnityFx.Mvc/Runtime/Core/Presenters/Presenter{TController}.cs index 171d3a7..23378ba 100644 --- a/Assets/Plugins/UnityFx.Mvc/Runtime/Core/Presenters/Presenter{TController}.cs +++ b/Assets/Plugins/UnityFx.Mvc/Runtime/Core/Presenters/Presenter{TController}.cs @@ -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(null, null, typeof(TController), PresentOptions.None, PresentArgs.Default); - new PresentResult(null, null, typeof(TController), PresentOptions.None, PresentArgs.Default); + new PresentResult(null, null); + new PresentResult(null, null); } #endif From 689195e41c25ab5fff84c6bff220206c84c4b8f8 Mon Sep 17 00:00:00 2001 From: Alexander Bogarsukov Date: Thu, 9 Jan 2020 12:15:47 +0200 Subject: [PATCH 3/6] Fixed editor window to correctly detect selection in 2-column project window layot --- .../Editor/Windows/CreateViewControllerWindow.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Plugins/UnityFx.Mvc/Editor/Windows/CreateViewControllerWindow.cs b/Assets/Plugins/UnityFx.Mvc/Editor/Windows/CreateViewControllerWindow.cs index 85680e8..1f4b809 100644 --- a/Assets/Plugins/UnityFx.Mvc/Editor/Windows/CreateViewControllerWindow.cs +++ b/Assets/Plugins/UnityFx.Mvc/Editor/Windows/CreateViewControllerWindow.cs @@ -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)) { From 0152adc3eab4416947de6f077d79cad24a64ae21 Mon Sep 17 00:00:00 2001 From: Alexander Bogarsukov Date: Thu, 9 Jan 2020 12:21:54 +0200 Subject: [PATCH 4/6] CHANGELOG update --- Assets/Plugins/UnityFx.Mvc/CHANGELOG.md | 6 ++++++ CHANGELOG.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Assets/Plugins/UnityFx.Mvc/CHANGELOG.md b/Assets/Plugins/UnityFx.Mvc/CHANGELOG.md index d0ce834..f9284c1 100644 --- a/Assets/Plugins/UnityFx.Mvc/CHANGELOG.md +++ b/Assets/Plugins/UnityFx.Mvc/CHANGELOG.md @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ce834..f9284c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 From f9e7ef21f47b4bcb0686cf6d69f1bd2309750d31 Mon Sep 17 00:00:00 2001 From: Alexander Bogarsukov Date: Thu, 9 Jan 2020 12:26:54 +0200 Subject: [PATCH 5/6] README update --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e6f5126..e075ac2 100644 --- a/README.md +++ b/README.md @@ -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" } } ``` @@ -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`. 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`. 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 @@ -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. From e9abb129e587bf48543dce0a1617462f28d05cc0 Mon Sep 17 00:00:00 2001 From: Alexander Bogarsukov Date: Thu, 9 Jan 2020 12:27:11 +0200 Subject: [PATCH 6/6] Updated package version to 0.2.1 --- Assets/Plugins/UnityFx.Mvc/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Plugins/UnityFx.Mvc/package.json b/Assets/Plugins/UnityFx.Mvc/package.json index 9fa9f6f..ef78ebc 100644 --- a/Assets/Plugins/UnityFx.Mvc/package.json +++ b/Assets/Plugins/UnityFx.Mvc/package.json @@ -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",