LoxodonFramework is a lightweight MVVM (Model-View-ViewModel) framework. It is specially designed for Unity3D game development. It refers to the MVVM design of WPF and Android. It provides data binding and localization of views and view models , A simple service container, configuration file component, thread tool component, application context and player context, asynchronous thread and coroutine task components, and other basic components. It also provides a framework for UI views. All code is designed based on the idea of object-oriented and interface-oriented, and almost all functions can be customized. In addition, performance optimization has been performed in the data binding part. On the platform that supports JIT, the delegation method is used for binding. On the platforms that do not support JIT, reflection is used by default, but it can be optimized by injecting the delegate function!
This framework is developed using C # language, and also supports XLua for development. XLua plugin is an option. If the project needs hot update, as long as the XLua plugin is installed, you can use Lua to develop the game completely.
This plugin is compatible with MacOSX, Windows, Linux, UWP, IOS and Android, etc., and is completely open source.
Tested platforms:
- PC/Mac/Linux (.Net2.0 subset; .Net2.0; .Net4.x; .Net Standard 2.0; IL2CPP)
- IOS (.Net2.0 subset; .Net2.0; .Net4.x; .Net Standard 2.0; IL2CPP)
- Android (.Net2.0 subset; .Net2.0; .Net4.x; .Net Standard 2.0; IL2CPP)
- UWP(window10) (.Net4.x; .Net Standard 2.0; IL2CPP)
Key features
-
Supports multiple platforms, high scalability, and interface-oriented development;
-
Supports C # and Lua development;
-
Supports asynchronous results and asynchronous tasks of threads and coroutines, adopting Future/Promise design pattern;
-
Provides multi-threaded components, thread switching components and timed executors;
-
Provides a messaging system that supports subscription and publishing;
-
Provides encrypted configuration files, supports object access, custom type converters, and extended functions;
-
Provides localization support, similar to Android’s localization, supporting basic data types, arrays, and some value types of U3D;
-
Support global context and player context;
-
Provide a service container to support registration and deregistration services;
-
Provides universal UI controls such as AlertDialog, Loading, Toast, and supports custom appearance;
-
Provides UI view control and management functions;
-
Provide data binding function:
-
Field binding, only supports OneTime mode, as it cannot support change notification;
-
Property binding, support TwoWay two-way binding, automatic notification of value modification;
-
Common dictionary, list binding, does not support change notification;
-
Support C # event binding;
-
Support Unity3D’s EventBase event binding;
-
Support binding of static class properties and Field;
-
Support method binding (including static methods);
-
Supports command binding, which can conveniently control the effective and invalid state of the button through command binding;
-
Supports binding of observable attributes, dictionaries, and lists, supports change notifications, and changes to the view model automatically change the UI display;
-
Support expression binding;
-
Supports binding of interactive requests and interactive behaviors;
-
Support type converter, you can convert the picture name to Sprite in the atlas;
-
You can customize and extend more binding types;