Skip to content
/ shibari Public

Unity3d data binding framework with strong typing support.

License

Notifications You must be signed in to change notification settings

Supert/shibari

Repository files navigation

Shibari

Shibari is Unity3d data binding framework with strong typing support.

Editor view

Source code sample

Minimal setup

  1. Clone this repository into the Assets/Shibari subfolder of your project or import Asset Store package.
  2. Set Player Settings/Api Compatibility Level to Experimental (.NET 4.6 Equivalent).
  3. Add required dependencies to your project:
  4. Create a new class inherited from Shibari.Node:
using Shibari;

public class RootNode : Node
{
    
}
  1. Pick it as a root node in Settings/Shibari menu.

Examples

You can find a showcase project for my framework here. It shows everything my framework is capable of and is close enough to a project you could make in real world of game development.

Tutorial

Tutorial is available. It's the quickest way to get used to Shibari framework.

Default UI Classes

BindableHandlerView : MonoBehaviour

Base abstract class for View-to-Model connection. It binds to a method specified in Unity Editor and calls it when specified conditions are met (for example, ButtonView calls it's method when button is clicked).

ButtonView

BindableHandlerView which calls it's method when button is clicked.

BindableView : MonoBehaviour

Base abstract class for Model-to-View and both-ways connection.

DropdownView

Populates UnityEngine.UI.Dropdown view with contents of the second BoundValue and binds index of selected item to the first one.

EnabledView

Sets GameObject active or inactive depending on it's boolean BoundValue.

FillerBindableView

Sets Image.fillAmount to it's float BoundValue.

ImageBindableView

Sets Image.Sprite to it's Sprite BoundValue.

InputView

Provides two-way connection between InputField and string BoundValue.

InteractableView

Sets Selectable.interactable to boolean BoundValue.

SelectableSpritesView

Sets Selectable sprites to SelectableSprites BoundValue.

SliderView

Provides two-way connection between Slider and float BoundValue.

TextBindableView

Sets Text.text to string BoundValue.

ToggleView

Provides two-way connection between Toggle.isOn and boolean BoundValue.

About

Unity3d data binding framework with strong typing support.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages