Metadata implementations stores custom data inside Metadata Container and can be edited as property in Database Editor. Metadata can be assigned to Database, Language Data and each key in Key Collection.
Metadata Container separates Runtime and Editor-only metadata to ensure that Editor-only metadata will not be included in build.
Built-in Metadata types
- Fallback Language. Can be added to Database or Language. Used by Manager to additionally load fallback Language Item Collections if some of the keys stored in Key Collection are not presented in Item Collections.
- Asset Type Restriction. Editor-only metadata that is used to restrict asset type for particular Asset Key.
- Comment.
Interfaces
Implementing IKnotTextFormatterMetadata and IKnotAssetFormatterMetadata allows to format key value in runtime before accessing it.
Implementing IKnotCultureSpecificMetadata allows to get Culture Info from selected language. Culture Info is provided before formatting values.
You can define your own custom Metadata class by implementing IKnotMetadata. After that you are able to add it in Database Editor.
Note
Custom class should have no constructor or at least one public constructor without arguments.
Warning
If you decide to remove, change the name, namespace or assembly of custom class you will get serialization error and possibly lose data. As a temporary solution, add [MovedFrom] attribute to your class before making those changes.