Skip to content

Saneject 0.20.0 (beta)

Pre-release
Pre-release

Choose a tag to compare

@alexanderlarsen alexanderlarsen released this 04 Dec 19:29
· 476 commits to main since this release
f234b7b

New Inspector (faster, cleaner, more reliable)

  • Replaced the old inspector API with a new data-driven system that behaves much closer to Unity's native inspectors.
  • All serialized fields are now discovered in a single structured pass, which removes a lot of brittle special-case logic.
  • Interface fields and properties now show Unity's default PropertyField UI, so attributes like Header, Tooltip and others finally work as expected.
  • Collections (arrays/lists) use Unity's built-in rendering inside a disabled scope instead of a custom drawer.
  • Nested serializable classes are drawn more consistently thanks to the unified PropertyData pipeline.
  • Result: a cleaner inspector that is easier to extend, easier to debug and more predictable.

Improved SerializeInterface code generation

  • Major refactor of the SerializeInterfaceGenerator to make the generated code cleaner and more robust.
  • User attributes on interface fields and auto-properties are now copied correctly to the generated backing fields, enabling full Unity inspector support.
  • Generator now uses fully qualified names everywhere to avoid namespace conflicts.
  • InterfaceBackingFieldAttribute has been simplified to store only the interface type, since InjectAttribute is now copied directly onto the generated field.
  • PropertyInjector now reads real Inject attributes instead of custom metadata, reducing duplication and improving accuracy.

Full support for auto-property interface fields

  • Added proper support for attributes on auto-properties using [field: SerializeInterface].
  • The generator now targets the property's compiler-generated backing field (k__BackingField), ensuring attributes behave the same as on normal fields.
  • Auto-properties now support Header, Tooltip, Inject and other attributes with no extra work from the user.

Bug fixes

  • "Show Injected Fields/Properties" user setting no longer toggles non-injected serialized interfaces.
  • Suppress missing errors via Inject-attribute now works on serialized interfaces.

Summary

This release is mostly invisible to end users but significantly improves Saneject's stability and internal consistency. Interface serialization, inspector rendering and attribute handling are now far more reliable, which also makes future features easier to build.