# 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:
  >
  > 1. There are other people who are not developers and would like to link values from other objects, instead of setting those directly.
  > 2. 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.
  > 3. 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.
  > 4. 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` to `Bind<T>` where `T` 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:

  ```csharp
  myBoundFloat = new Bind<float>(gameObject.transform, "GetSiblingIndex()");
  // or with parameters
  myBoundTransform = new Bind<Transform>(gameObject.transform, "GetChild(Int32)", 1);
  ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://postica.gitbook.io/binding-system/product/faq.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
