Table of Contents

Enum PropertyHint

Namespace
Godot
Assembly
GodotSharp.dll
public enum PropertyHint : long

Fields

ArrayType = 31

Hints that a property is an Array with the stored type specified in the hint string.

ColorNoAlpha = 21

Hints that a Color property should be edited without affecting its transparency (Color.a is not editable).

Dir = 14

Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.

Enum = 2

Hints 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 :integer to the name, e.g. "Zero,One,Three:3,Four,Six:6".

EnumSuggestion = 3

Hints 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 = 4

Hints 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 = 19

Hints that a string property is an Expression.

File = 13

Hints 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 = 6

Hints 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 :integer to 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 1 and at most 2 ** 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 = 16

Hints 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 = 15

Hints 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 = 28

Hints 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 = 35

Hints that a quaternion property should disable the temporary euler editor.

IntIsObjectid = 29

Hints that an int property is an object ID.

Deprecated. This hint is not used anywhere and will be removed in the future.

IntIsPointer = 30

Hints that an int property is a pointer. Used by GDExtension.

Layers2DNavigation = 9

Hints that an int property is a bitmask using the optionally named 2D navigation layers.

Layers2DPhysics = 8

Hints that an int property is a bitmask using the optionally named 2D physics layers.

Layers2DRender = 7

Hints that an int property is a bitmask using the optionally named 2D render layers.

Layers3DNavigation = 12

Hints that an int property is a bitmask using the optionally named 3D navigation layers.

Layers3DPhysics = 11

Hints that an int property is a bitmask using the optionally named 3D physics layers.

Layers3DRender = 10

Hints that an int property is a bitmask using the optionally named 3D render layers.

LayersAvoidance = 37

Hints that an integer property is a bitmask using the optionally named avoidance layers.

Hints that a vector property should allow its components to be linked. For example, this allows Vector2.x and Vector2.y to be edited together.

LocaleId = 32

Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.

LocalizableString = 33

Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings.

Max = 38

Represents the size of the PropertyHint enum.

MultilineText = 18

Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.

NodePathToEditedNode = 24

Deprecated. This hint is not used anywhere and will be removed in the future.

NodePathValidTypes = 26

Hints that the hint string specifies valid node types for property of type NodePath.

NodeType = 34

Hints 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 = 0

The property has no hint for the editor.

ObjectId = 22

Hints 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 = 25

Hints that an object is too big to be sent via the debugger.

Password = 36

Hints that a string property is a password, and every character is replaced with the secret character.

PlaceholderText = 20

Hints 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 = 1

Hints 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 = 17

Hints 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 = 27

Hints 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 = 23

If 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_string must 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.