FAQ
Why should I use this system when I can simply set everything in code?
The Binding System uses an opt-in approach for using bound values, so no user is forced to use the system. There are some advantages in using the system however:
There are other people who are not developers and would like to link values from other objects, instead of setting those directly.
By allowing values to flow from and/or to other objects or data containers, the class designer can decouple the logic from data retrieval and manipulation.
Coupling of systems/modules can be possible without writing any line of code. Some may say it is a double-edged sword for very big teams, but for testing purposes or quick prototyping it may be worth it.
The system can be used to debug certain values.
How can I integrate BindingSystem in an existing project?
If most of your serialized fields are only read, then it is sufficient to change those from
T
toBind<T>
whereT
is the type of the field/property. The implicit conversion should help out with getting the data from those fields/properties without further code modifications. For remaining types it is enough to add.Value
to get the real value. The reserializer, if enabled, will kick in and perform value reserialization to keep your data intact during transition.Does it work with IL2CPP backend?
Yes, absolutely. For Unity 2021 LTS it may introduce some precompilation phase when building the project, and it usually increases the build time to only about 1% - 2%.
Can I modify multiple objects with bind fields?
Yes you can, although changes to Converters and Modifiers are not allowed.
Does the system support Odin Inspector?
Yes it does support it, even when using some of their attributes, such as [AssetsOnly] or [SceneOnly] which will be propagated to Source field.
Why I cannot set very long paths?
Paths are trimmed when a path loop is detected, thus limiting long repetitive paths.
Can I bind methods?
Currently binding methods is only possible through code and is not fully tested yet. This feature will be available in the next major version.
To bind a method in code, the path should define a method:
Last updated