Shibari is Unity3d data binding framework with strong typing support.
- Clone this repository into the
Assets/Shibari
subfolder of your project or import Asset Store package. - Set
Player Settings/Api Compatibility Level
toExperimental (.NET 4.6 Equivalent)
. - Add required dependencies to your project:
- Create a new class inherited from Shibari.Node:
using Shibari;
public class RootNode : Node
{
}
- Pick it as a root node in
Settings/Shibari
menu.
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 is available. It's the quickest way to get used to Shibari framework.
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).
BindableHandlerView which calls it's method when button is clicked.
Base abstract class for Model-to-View and both-ways connection.
Populates UnityEngine.UI.Dropdown view with contents of the second BoundValue and binds index of selected item to the first one.
Sets GameObject active or inactive depending on it's boolean BoundValue.
Sets Image.fillAmount to it's float BoundValue.
Sets Image.Sprite to it's Sprite BoundValue.
Provides two-way connection between InputField and string BoundValue.
Sets Selectable.interactable to boolean BoundValue.
Sets Selectable sprites to SelectableSprites BoundValue.
Provides two-way connection between Slider and float BoundValue.
Sets Text.text to string BoundValue.
Provides two-way connection between Toggle.isOn and boolean BoundValue.