Class SerializeFieldAttribute
Exports the annotated member as a property of the Godot Object.
Inherited Members
Namespace: Godot
Assembly: TinkerFlow-Debug.dll
Syntax
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
[Obsolete("TODO: Obsoletion trial. See if we can change all usages to Export and then remove it.")]
public class SerializeFieldAttribute : Attribute
Constructors
SerializeFieldAttribute(Type, PropertyHint, string)
Constructs a new ExportAttribute Instance.
Declaration
public SerializeFieldAttribute(Variant.Type variantType = Type.Nil, PropertyHint hint = PropertyHint.None, string hintString = "")
Parameters
| Type | Name | Description |
|---|---|---|
| Variant.Type | variantType | Variant Type |
| PropertyHint | hint | The hint for the exported property. |
| string | hintString | A string that may contain additional metadata for the hint. |
Properties
Hint
Optional hint that determines how the property should be handled by the editor.
Declaration
public PropertyHint Hint { get; }
Property Value
| Type | Description |
|---|---|
| PropertyHint |
HintString
Optional string that can contain additional metadata for the Godot.ExportAttribute.Hint.
Declaration
public string HintString { get; }
Property Value
| Type | Description |
|---|---|
| string |
VariantType
The Godot Variant type the annotated member is exported as.
Declaration
public Variant.Type VariantType { get; }
Property Value
| Type | Description |
|---|---|
| Variant.Type |
Methods
GetPropertyValue<T>(T)
Enumerates property descriptors for every non-public field and property of T
annotated with SerializeFieldAttribute.
Declaration
public static IEnumerable<Dictionary> GetPropertyValue<T>(T runtimeConfigurator)
Parameters
| Type | Name | Description |
|---|---|---|
| T | runtimeConfigurator | The runtime configurator instance whose members are inspected; not used by the implementation. |
Returns
| Type | Description |
|---|---|
| IEnumerable<Dictionary> | The property descriptors for all serialized members of |
Type Parameters
| Name | Description |
|---|---|
| T | The type whose serialized members are inspected. |
PropertyInfo(string, Type, PropertyHint, string)
Builds a Godot property descriptor dictionary describing a single exported property.
Declaration
public static Dictionary PropertyInfo(string name, Variant.Type type, PropertyHint hint, string hintStr = "")
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the property. |
| Variant.Type | type | The Variant type of the property. |
| PropertyHint | hint | The property hint controlling editor handling. |
| string | hintStr | Optional additional metadata for the hint. Defaults to an empty string. |
Returns
| Type | Description |
|---|---|
| Dictionary | A dictionary with |