Add type hint to DataBinding about which type is expected

Issue #17 resolved
Christian Oeing repo owner created an issue

This type hint could make the handling in the inspector much easier:

  • Only show context properties that are compatible
  • Only show references that are compatible
  • Only allow providers that are compatible (this would require a hint on the data provider as well about which type it provides)

Instead of not allowing incompatible values there could be a warning as well to start with. The selection should be made smaller anyways, so in the common case the user can choose more quickly.

Comments (9)

  1. Christian Oeing reporter

    Increased priority as this is a common source of mistakes that non-programmers make when they connect the scripts on Unity side (selecting the wrong script from the dragged game object)

  2. Christian Oeing reporter

    Type hints to filter the context properties are not that high prio as there are many situations where the value can be casted. I'll create a new issue once this gets urgent with a specific use case.

  3. Christian Oeing reporter

    Use a first type hint for data providers, so only components that implement IDataProvider can be assigned.

  4. Christian Oeing reporter

    For the last idea (only allow data providers with the desired type) the new issue #71 was created.

  5. Log in to comment