Enum PropertyHint
- Namespace
- Godot
- Assembly
- GodotSharp.dll
public enum PropertyHint : long
Fields
ArrayType = 31Hints that a property is an Array with the stored type specified in the hint string.
ColorNoAlpha = 21Hints that a Color property should be edited without affecting its transparency (
Color.ais not editable).Dir = 14Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.
Enum = 2Hints that an int or string property is an enumerated value to pick in a list specified via a hint string.
The hint string is a comma separated list of names such as
"Hello,Something,Else". Whitespaces are not removed from either end of a name. For integer properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending:integerto the name, e.g."Zero,One,Three:3,Four,Six:6".EnumSuggestion = 3Hints that a string property can be an enumerated value to pick in a list specified via a hint string such as
"Hello,Something,Else".Unlike Enum, a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
ExpEasing = 4Hints that a float property should be edited via an exponential easing function. The hint string can include
"attenuation"to flip the curve horizontally and/or"positive_only"to exclude in/out easing and limit values to be greater than or equal to zero.Expression = 19Hints that a string property is an Expression.
File = 13Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like
"*.png,*.jpg".Flags = 6Hints that an int property is a bitmask with named bit flags.
The hint string is a comma separated list of names such as
"Bit0,Bit1,Bit2,Bit3". Whitespaces are not removed from either end of a name. The first name in the list has value 1, the next 2, then 4, 8, 16 and so on. Explicit values can also be specified by appending:integerto the name, e.g."A:4,B:8,C:16". You can also combine several flags ("A:4,B:8,AB:12,C:16").Note: A flag value must be at least
1and at most2 ** 32 - 1.Note: Unlike Enum, the previous explicit value is not taken into account. For the hint
"A:16,B,C", A is 16, B is 2, C is 4.GlobalDir = 16Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
GlobalFile = 15Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards, like
"*.png,*.jpg".GlobalSaveFile = 28Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path for the file to be saved at. The dialog has access to the entire filesystem. The hint string can be a set of filters with wildcards like
"*.png,*.jpg". See also Filters.HideQuaternionEdit = 35Hints that a quaternion property should disable the temporary euler editor.
IntIsObjectid = 29Hints that an int property is an object ID.
Deprecated. This hint is not used anywhere and will be removed in the future.
IntIsPointer = 30Hints that an int property is a pointer. Used by GDExtension.
Hints that an int property is a bitmask using the optionally named 2D navigation layers.
Layers2DPhysics = 8Hints that an int property is a bitmask using the optionally named 2D physics layers.
Layers2DRender = 7Hints that an int property is a bitmask using the optionally named 2D render layers.
Hints that an int property is a bitmask using the optionally named 3D navigation layers.
Layers3DPhysics = 11Hints that an int property is a bitmask using the optionally named 3D physics layers.
Layers3DRender = 10Hints that an int property is a bitmask using the optionally named 3D render layers.
LayersAvoidance = 37Hints that an integer property is a bitmask using the optionally named avoidance layers.
Link = 5Hints that a vector property should allow its components to be linked. For example, this allows
Vector2.xandVector2.yto be edited together.LocaleId = 32Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
LocalizableString = 33Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings.
Max = 38Represents the size of the PropertyHint enum.
MultilineText = 18Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
NodePathToEditedNode = 24Deprecated. This hint is not used anywhere and will be removed in the future.
NodePathValidTypes = 26Hints that the hint string specifies valid node types for property of type NodePath.
NodeType = 34Hints that a property is an instance of a Node-derived type, optionally specified via the hint string (e.g.
"Node2D"). Editing it will show a dialog for picking a node from the scene.None = 0The property has no hint for the editor.
ObjectId = 22Hints that the property's value is an object encoded as object ID, with its type specified in the hint string. Used by the debugger.
ObjectTooBig = 25Hints that an object is too big to be sent via the debugger.
Password = 36Hints that a string property is a password, and every character is replaced with the secret character.
PlaceholderText = 20Hints that a string property should show a placeholder text on its input field, if empty. The hint string is the placeholder text to use.
Range = 1Hints that an int or float property should be within a range specified via the hint string
"min,max"or"min,max,step". The hint string can optionally include"or_greater"and/or"or_less"to allow manual input going respectively above the max or below the min values.Example:
"-360,360,1,or_greater,or_less".Additionally, other keywords can be included:
"exp"for exponential range editing,"radians_as_degrees"for editing radian angles in degrees (the range values are also in degrees),"degrees"to hint at an angle and"hide_slider"to hide the slider.ResourceType = 17Hints that a property is an instance of a Resource-derived type, optionally specified via the hint string (e.g.
"Texture2D"). Editing it will show a popup menu of valid resource types to instantiate.SaveFile = 27Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path for the file to be saved at. The dialog has access to the project's directory. The hint string can be a set of filters with wildcards like
"*.png,*.jpg". See also Filters.TypeString = 23If a property is string, hints that the property represents a particular type (class). This allows to select a type from the create dialog. The property will store the selected type as a string.
If a property is Array, hints the editor how to show elements. The
hint_stringmust encode nested types using":"and"/".// Array of elemType. hintString = $"{elemType:D}:"; hintString = $"{elemType:}/{elemHint:D}:{elemHintString}"; // Two-dimensional array of elemType (array of arrays of elemType). hintString = $"{Variant.Type.Array:D}:{elemType:D}:"; hintString = $"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}"; // Three-dimensional array of elemType (array of arrays of arrays of elemType). hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}:"; hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";Examples:
hintString = $"{Variant.Type.Int:D}/{PropertyHint.Range:D}:1,10,1"; // Array of integers (in range from 1 to 10). hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Two"; // Array of integers (an enum). hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6"; // Array of integers (an enum). hintString = $"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png"; // Array of strings (file paths). hintString = $"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Array of textures.hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}:"; // Two-dimensional array of floats. hintString = $"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:"; // Two-dimensional array of multiline strings. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}/{PropertyHint.Range:D}:-1,1,0.1"; // Two-dimensional array of floats (in range from -1 to 1). hintString = $"{Variant.Type.Array:D}:{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Two-dimensional array of textures.
Note: The trailing colon is required for properly detecting built-in types.