Add preprocessor directive to find missing/misspelled data properties more easy

Issue #65 resolved
Christian Oeing repo owner created an issue

From the forum: https://forum.unity.com/threads/released-data-bind-for-unity.298471/page-5#post-3313498

That sounds like a good idea. What I want to avoid is that the check has an influence on the performance.

But there is also another thing to consider: One might bind a field/property from an immutable object that doesn't have a data property backing field. In that case you would get a false positive warning which is also not that great. I might need a better solution, but to start with the preprocessor directive could be something like DATABIND_FIND_MISSING_BACKING_FIELDS which will report all used bindings where no backing field was found. The developer can then decide if it is a bug (in most cases) or if it is by design.

Comments (3)

  1. Christian Oeing reporter

    The preprocessor directive was added: DATABIND_REPORT_MISSING_BACKING_FIELDS

    If set, warnings are logged in the Console for missing backing fields for properties of objects. Fun fact: I already found a misspelled backing field in one of the examples thanks to this new feature :)

  2. Log in to comment