FastenUp
Search Results for

    Fasten Up

    Minimalist UI data binding framework for Unity.

    stability-experimental License: MIT Releases Unity

    💾 Installation

    You can install Fasten Up using any of the following methods:

    Unity Package Manager

    https://github.com/merlinds/fasten-up.git?path=/Assets/FastenUp#v0.1.0
    
    1. In Unity, open Window → Package Manager.
    2. Press the + button, choose "Add package from git URL..."
    3. Enter url above and press Add.

    Open Unity Package Manager

    openupm install com.merlinds.fasten-up
    

    Unity Package

    1. Download the .unitypackage from releases page.
    2. Import FastenUp.X.X.X.unitypackage

    📦 Dependencies

    • TextMeshPro - for Text components binding.

    🌱 Usage example

    Mediator class is a bridge between the game data and the UI components.

    Create a mediator class that inherits from IMediator interface, like this:

    using FastenUp.Runtime.Bindables;
    using FastenUp.Runtime.Mediators;
    using UnityEngine;
    
    public partial class MyMediator : MonoBehaviour, IMediator
    {
        public Bindable<string> Text { get; } = new();
    
        public void Awake()
        {
            Text.Value = "Hello World!";
        }
    }
    

    Note: The partial keyword must be used for the sake of the source generator.

    Add the MyMediator component to the GameObject.

    Then add the TextMeshPro component with the TextBinder component to the child GameObject.

    text_binder_example.png

    Now the TextMeshPro component will be bound to the Text property of the MyMediator class, and the text will be updated when the Text property changes.

    More examples can be found in the Samples~ folder.

    smaples screen

    samples installation

    📚 Documentation

    • Manual
    • Scripting API

    📜 License

    Fasten Up is distributed under the terms of the MIT License. A complete version of the license is available in the LICENSE file in this repository. Any contribution made to this project will be licensed under the MIT License.

    • Improve this Doc
    In This Article
    Back to top Generated by DocFX