1.3.1 • Published 1 year ago

com.kingdox.uniflux v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Logo

UniFlux - Event Bus with Flux Integration for Unity

Created by Xavier Arpa (kingdox)

Provides an efficient Event Bus with Flux integration for Unity.

Unity MIT License Build status PRs Welcome

Releases UPM

GitHub all releases npm

CodeFactor

Table of Contents

Introduction

Soon

WorkFlow

Example_1

Modules

Unity Unity Unity Unity Unity Unity Unity Unity Unity

Compared methods of UniFlux | Name | Iterations | GC | Time | |-----------|--------------:|------:|-----:| | UniFlux (Dispatch int ) | 10.000 | 0B | 0ms | | UniFlux (Dispatch string ) | 10.000 | 0B | 1ms | | UniFlux (Store int ADD) | 10.000 | 1.2MB | ~3ms | | UniFlux (Store string ADD) | 10.000 | 1.2MB | ~3ms | | UniFlux (Store int REMOVE) | 10.000 | 1.2MB | ~30ms | | UniFlux (Store string REMOVE) | 10.000 | 1.2MB | ~30ms |

Examples

using Kingdox.UniFlux;
float _life;
public float Life
{
    [Flux("Get_Life")] get => _life;
    [Flux("Set_Life")] set 
    {
      _life = value;
      "OnChange_Life".Dispatch(value);
    }
}
//...
  [Flux("OnChange_Life")] private void OnChange_Life(float value)
  {
    // ...
  }
"1".Dispatch();
int _2 = "2".Dispatch<int>();
"3".Dispatch<int>(42);
int _4 = "4".Dispatch<int,int>(42);
"9".IEnumerator();
"10".Task();
// #define UNIFLUX_UNITASK_SUPPORT
"123".UniTask();

Advanced features

using Kingdox.UniFlux.Core;
//...
Flux<byte>.Dispatch(13); //byte as key
string _14 = Flux<bool,string>.Dispatch(true); //bool as key
float _16 = Flux<double,string, float>.Dispatch(Math.PI, "PI"); //double as key
"42".Store(()=>{}, true); // Anonimous Subscriptions
https://github.com/kingdox/UniFlux.git
  • You can install via openupm CLI
openupm add com.kingdox.uniflux
  • You can install via npm
npm i com.kingdox.uniflux

Special Content

DefinitionDescription
UNIFLUX_UNITASK_SUPPORTEnable Cysharp/UniTask integration

Contributing

Contributions are always welcome!

Author Info

@kingdox

For support, email arpaxavier@gmail.com

Twitter

LinkedIn

Special Thanks

@Quinowl

License

MIT

1.3.1

1 year ago

1.2.2

1 year ago

1.3.0

1 year ago

1.1.1

1 year ago