arvtesh / unityfx.mvc Goto Github PK
View Code? Open in Web Editor NEWMVC framework for Unity3d.
License: MIT License
MVC framework for Unity3d.
License: MIT License
Expected result: there is no error or warning related to the package.
Actual result: compile error.
Current IPresenter
implementation uses a MonoBehaviour
events. I'd like to choose update method for presenters (for example, PlayerLoop
).
Currently user data, passed to Preset
should inherit PresentArgs
. This is not convenient, need ability to pass arbitrary user types to Present
.
The IViewControllerInfo
is supposed to contain data shared between IPresentResult
and IPresentContext
and the controller present arguments. It should be usable before the controller has been instantiated (i.e. before present operation has been completed).
IViewControllerInfo
interface and its implementation(s).IPresentResult
and IPresentContext
.ICommandTarget.InvokeCommand()
should not be generic for AOT compiler. We need to support 3 command types: int
, string
, enum
. All of these can be packed into a pointer-sized non-generic structure. Also majority (like 99%) of the use-cases only need 0 or 1 argument. Thus, the 2 new structs should be designed: Command
and Variant
. ICommandTarget
should look like this:
bool InvokeCommand(Command cmd, Variant args);
.
Add MessageBoxController
, MessageBoxView
and MessageBoxArgs
as implementation of a generic message box component. MessageBoxView
should use UGUI and should allow replacing with any class that implements IView
and IConfigurable<MessageBoxArgs>
.
Assembly: UnityFx.Mvc.Extensions
Namepsace: UnityFx.Mvc.Extensions
Unity UI is a standalone package now, need to add UnityFx.Mvc.UGUI
package for UGUI-related code.
A controller can have an integer tag value associated with it. The value is assigned via ViewControllerAttribute
and can be accessed through IViewControllerInfo
interface.
IViewControllerInfo
and ViewControllerAttribute
.Currently in cases when invalid view component is attached to prefab, error is not raised when presenting the controller. Instead, an InvalidCastException is thrown on the first attempt to access the view. Need to throw corresponding error from Present.
There is a AddViewPrefab
method. It would be convenient to have something like AddViewPrefabs
accepting an array of game objects.
No more than one instance of a singleton controller can exist at any time. A controller can be marked as singleton via setting PresentOptions.Singleton
flag. If an instance of a singleton controller is already presented when a new one is about to be created, the former should be dismissed.
PresentOptions.Singleton
flag.As the title says.
Any exceptions thrown as a result of IPresenter.Present call, should cancel the present operation, dispose the controller and put the exception info into the present Task.
Add ASP.NET-like middleware support. Middleware is a delegate with a signature:
public delegate Task PresentDelegate(IPresentService presenter, IViewControllerInfo controllerInfo);
Middleware is added via PresenterBuilder
and should be invoked before controller creation in the same order as they were registered.
PresentDelegate
.PresenterBuilder
class.Presenter
implementation.Add IViewControllerBindings
interface and its default implementation.
App dialogs should share visual style, which includes:
We need to add tooling for easy creation of dialogs:
DialogController
;The mentioned interfaces should be created via dedicated builders (class names are PresenterBuilder
and UGUIViewBuilder
).
Presenter
and UGUIViewFactory
classes internal.PresenterBuilder
and UGUIViewFactoryBuilder
implementations.Bindings management appears to be quite messy if done manually. Need to add helper scriptable object with custom editor script for this. It should automate the following:
This will make sure the code is compatible with the latest Unity version.
Add LoadingController
, LoadingView
and LoadingArgs
as implementation of a loading progress component. LoadingView
should use UGUI and should be allow replacing.
Assembly: UnityFx.Mvc.Extensions
Namepsace: UnityFx.Mvc.Extensions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.