Attached Macromigueldeicaza.swiftgodot 0.46.0SwiftGodot
Export(_:_:)
Exposes a property or variable to the Godot runtime
MacroDefs.swift:51@attached(peer, names: prefixed(_mproxy_get_), prefixed(_mproxy_set_), arbitrary) macro Export(_ hint: PropertyHint = .none, _ hintStr: String? = nil)
Parameters
- hint
this is of type
PropertyHint
and can be used to tell the Godot editor the kind of user interface experience to provide for this. For example, a string can be a plain string, or a multi-line property box, or it can represent a file. This hint drives the experience in the editor- hintStr
some of the hint types can use an additional configuration option as a string and this is used for this. For example the
.file
option can have a mask to select files, for example"*.png"
When this attribute is applied to a variable or a computer property in a class, the values can be surfaced to the Godot editor and can participate in Godot’s serialization process.
The attribute can only be applied to properties and variables that can be stored in a Variant.