Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.21 KB

ComponentKeyAttribute.md

File metadata and controls

23 lines (17 loc) · 1.21 KB

ComponentKeyAttribute Class

Assign a custom key used for JSON serialization for annotated IComponent and Script types.
If specified key is null The component type is not serialized.

public sealed class ComponentKeyAttribute : System.Attribute

Inheritance System.Object 🡒 System.Attribute 🡒 ComponentKeyAttribute

Remarks

The attribute is used for:

  • annotated structs implementing IComponent.
  • annotated classes extending Script.

    This enables changing a struct / class name in code without changing the JSON serialization format.
Constructors
ComponentKeyAttribute(string)