⚛️
UniFlux
  • Introduction
  • ❓Getting Started
    • What is UniFlux
    • Setup
  • 🧩Components
    • MonoFlux
    • MethodFluxAttribute
    • StateFluxAttribute
    • Extension Key
  • ⚠️Use Cases
    • Service Locator Alternative
    • Singleton Alternative
    • Messaging Alternative
    • Avoiding Prop Drilling
  • 📚Tutorials
    • How to use a custom Key?
    • How To See Subscriptions ?
    • 📽️(Video) How to Use UniFlux on Unity
  • Links and References
    • 🔗References
    • 🌍Unity Asset Store
    • 🎲Made With UniFlux
    • 📦Github
    • 😎About Me
Powered by GitBook
On this page
Edit on GitHub
  1. Getting Started

What is UniFlux

Last updated 1 year ago

UniFlux is an event and state management tool for game development in Unity. It allows developers to create simplified communication and status applications, allowing them to be accessed and updated from anywhere in the application. This can help simplify the code and make it easier to maintain.

Here some examples:

  • Manage Player Status: health, position, and score.

  • Manage game state: current score, current level, and game state (e.g. paused, running, finished).

  • Manage UI: visibility of UI elements and displayed text.

This can make it easier to access and update this information from anywhere in the game.


How it works?

Based on how Flux Architecture works we Unified "Dispatcher", "Store" and "Action Creator"

But what does this imply? that all the complexity is hidden and you simply have to subscribe and send messages

Exist many ways to propagate states or messages, here a little example when a player takes damage.

Look, in this example you don't need to communicate directly to each others in any moment, your only dependencies are UniFlux and the keys you made it (in this example i use string as Keys, but you can also made your own key type instead of strings or ints)

Note: There are many ways to communicate, the important thing is that you can have flexibility and control without having many dependencies and references.

❓
From
http://fluxxor.com/what-is-flux.html