Skip to content

Attributes

Purpose

Owns lightweight reusable custom attributes used throughout Snap Studio Pro.

This territory contains editor-friendly metadata attributes that can safely be referenced by runtime-safe or shared serialized classes without depending directly on UnityEditor assemblies.

Owns

  • Custom serialized-field attributes
  • Validation-focused attributes
  • Lightweight editor-facing metadata markers
  • Runtime-safe attribute definitions

Does NOT Own

  • Custom inspector rendering
  • Editor workflow orchestration
  • Rendering implementation
  • Preview lifecycle ownership
  • Feature-domain behaviour

Allowed Dependencies

Attributes may depend on:

  • UnityEngine attribute primitives
  • Lightweight shared models/types

Attributes should avoid depending on:

  • UnityEditor APIs
  • rendering systems
  • preview systems
  • export systems
  • feature orchestration systems

Notes

Custom attributes intentionally live outside Editor folders/assemblies because they are referenced by serialized classes that may exist outside editor-only territories.

For example: - RequiredAttribute is runtime-safe and can be applied to shared serialized fields. - RequiredAttributeDrawer is editor-only and therefore lives inside the Editor/ subfolder.

This separation is important because Unity custom property drawers require: - the attribute itself to be visible to non-Editor code - the drawer implementation to remain Editor-only

The architecture intentionally follows Unityโ€™s standard: - attribute definition outside Editor - custom drawer inside Editor

to avoid assembly and compilation issues.

Future Candidates

  • Keep attributes lightweight and metadata-focused.
  • Avoid embedding workflow behaviour into attribute systems.
  • Continue separating editor drawers from runtime-safe attribute definitions.