Closed grahamboree closed 2 years ago
Done this downstream with a new attribute ConfigSourceInformation
that will auto-populate a string field/property with this info. This can be compiled out with #if
so it's not in production builds. Will upstream this soon with a PR :)
It's often useful to have a data verification step that checks the config values supplied by a designer. This might check that values are within a certain range, or are cross-referenced in another place. e.g. a "texture" field on a game object description might verified by checking for a matching texture file in the project.
Unfortunately, when this verification happens, we don't have any source file mapping for object fields. This means verification can't generate errors that contain the source of the error, so it's difficult to track down and fix issues. The ideal error message syntax would be something like
This is a feature that's super useful in development and isn't useful in production, so incurring up to a moderate performance overhead for this is likely worth the tradeoff...provided there's a way to completely disable it in production builds.
Proposed solutions: