Document using PropertyHint with [Export]

This commit is contained in:
Kelly Thomas
2019-10-13 01:03:03 +08:00
parent 342d2ff3a6
commit babcca5b28

View File

@@ -86,6 +86,8 @@ Export keyword
--------------
Use the ``[Export]`` attribute instead of the GDScript ``export`` keyword.
This attribute can also be provided with optional :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` and ``hintString`` parameters.
Default values can be set by assigning a value.
Example:
@@ -96,7 +98,16 @@ Example:
public class MyNode : Node
{
[Export]
NodePath _nodePath;
private NodePath _nodePath;
[Export]
private string _name = "default";
[Export(PropertyHint.Range, "0,100000,1000,or_greater")]
private int _income;
[Export(PropertyHint.File, "*.png,*.jpg")]
private string _icon;
}
Signal keyword