Function userProjectSetting

  • Registers a settings value with the UserProjectSettings and assigns it to the decorated field. The name of the field, together with the class name, will be used as the key to store the value. The static value of the field will be used as the default value.

    Parameters

    • type:
          | StringConstructor
          | BooleanConstructor
          | NumberConstructor
          | BigIntConstructor

      The type of the setting value. Supported types are Number, String, Boolean, and BigInt.

    • OptionalautoSaveSettings: boolean

      Automatically save the settings value when it is changed.

    Returns AttributeDecorator<Attribute>

    The target of the decorator must be a static field of type that is specified for the settings value. The field must be a primitive type, such as Number, String, Boolean, or BigInt.