Skip to content

Interfaces

Purpose

Extension points SKINT offers to the code that uses it. One, currently.

Owns

  • IPresetSerializable<T> — lets a preset type supply a save-time clone

Does NOT Own

  • Any implementation
  • Internal abstractions — SKINT's own territories talk to each other through concrete types, deliberately

Allowed Dependencies

Interfaces may depend on:

  • UnityEngine

It should depend on nothing else, and nothing in SKINT should depend on Interfaces except the one consumer below.

Notes

ThemedPresetBlock is generic over the preset type, and before writing it checks whether the value implements IPresetSerializable<T>. If it does, the block saves CloneForSave() instead of the live object — which is what a type needs when the in-memory instance holds transient state that must not reach the file.

No SKINT type implements it. SkintThemeSettings is a plain serialisable class, so for SKINT's own preset the check is always false and the live object is written. It is a live extension point with no in-package user, not dead code, and it is worth knowing which of those it is before anyone deletes it.

This territory is one file because SKINT's internal seams are concrete on purpose. A package this size does not earn an interface per boundary, and the indirection would cost more in navigation than it returns in flexibility.

Future Candidates

  • If a second extension point appears, this is where it goes. If one never does, consider whether IPresetSerializable<T> is better placed beside ThemedPresetBlock, its only consumer.