Debian Codegraph @

doc/classes/@GlobalScope.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="@GlobalScope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Global scope constants and functions.
5 </brief_description>
6 <description>
7 A list of global scope enumerated constants and built-in functions. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.
8 Singletons are also documented here, since they can be accessed from anywhere.
9 For the entries that can only be accessed from scripts written in GDScript, see [@GDScript].
10 </description>
11 <tutorials>
12 <link title="Random number generation">$DOCS_URL/tutorials/math/random_number_generation.html</link>
13 </tutorials>
14 <methods>
15 <method name="abs">
16 <return type="Variant" />
17 <param index="0" name="x" type="Variant" />
18 <description>
19 Returns the absolute value of a [Variant] parameter [param x] (i.e. non-negative value). Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].
20 [codeblock]
21 var a = abs(-1)
22 # a is 1
23
24 var b = abs(-1.2)
25 # b is 1.2
26
27 var c = abs(Vector2(-3.5, -4))
28 # c is (3.5, 4)
29
30 var d = abs(Vector2i(-5, -6))
31 # d is (5, 6)
32
33 var e = abs(Vector3(-7, 8.5, -3.8))
34 # e is (7, 8.5, 3.8)
35
36 var f = abs(Vector3i(-7, -8, -9))
37 # f is (7, 8, 9)
38 [/codeblock]
39 [b]Note:[/b] For better type safety, use [method absf], [method absi], [method Vector2.abs], [method Vector2i.abs], [method Vector3.abs], [method Vector3i.abs], [method Vector4.abs], or [method Vector4i.abs].
40 </description>
41 </method>
42 <method name="absf">
43 <return type="float" />
44 <param index="0" name="x" type="float" />
45 <description>
46 Returns the absolute value of float parameter [param x] (i.e. positive value).
47 [codeblock]
48 # a is 1.2
49 var a = absf(-1.2)
50 [/codeblock]
51 </description>
52 </method>
53 <method name="absi">
54 <return type="int" />
55 <param index="0" name="x" type="int" />
56 <description>
57 Returns the absolute value of int parameter [param x] (i.e. positive value).
58 [codeblock]
59 # a is 1
60 var a = absi(-1)
61 [/codeblock]
62 </description>
63 </method>
64 <method name="acos">
65 <return type="float" />
66 <param index="0" name="x" type="float" />
67 <description>
68 Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] will be clamped between [code]-1.0[/code] and [code]1.0[/code] (inclusive), in order to prevent [method acos] from returning [constant @GDScript.NAN].
69 [codeblock]
70 # c is 0.523599 or 30 degrees if converted with rad_to_deg(c)
71 var c = acos(0.866025)
72 [/codeblock]
73 </description>
74 </method>
75 <method name="acosh">
76 <return type="float" />
77 <param index="0" name="x" type="float" />
78 <description>
79 Returns the hyperbolic arc (also called inverse) cosine of [param x], returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if [param x] is larger or equal to 1. For values of [param x] lower than 1, it will return 0, in order to prevent [method acosh] from returning [constant @GDScript.NAN].
80 [codeblock]
81 var a = acosh(2) # Returns 1.31695789692482
82 cosh(a) # Returns 2
83
84 var b = acosh(-1) # Returns 0
85 [/codeblock]
86 </description>
87 </method>
88 <method name="angle_difference">
89 <return type="float" />
90 <param index="0" name="from" type="float" />
91 <param index="1" name="to" type="float" />
92 <description>
93 Returns the difference between the two angles (in radians), in the range of [code][-PI, +PI][/code]. When [param from] and [param to] are opposite, returns [code]-PI[/code] if [param from] is smaller than [param to], or [code]PI[/code] otherwise.
94 </description>
95 </method>
96 <method name="asin">
97 <return type="float" />
98 <param index="0" name="x" type="float" />
99 <description>
100 Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] will be clamped between [code]-1.0[/code] and [code]1.0[/code] (inclusive), in order to prevent [method asin] from returning [constant @GDScript.NAN].
101 [codeblock]
102 # s is 0.523599 or 30 degrees if converted with rad_to_deg(s)
103 var s = asin(0.5)
104 [/codeblock]
105 </description>
106 </method>
107 <method name="asinh">
108 <return type="float" />
109 <param index="0" name="x" type="float" />
110 <description>
111 Returns the hyperbolic arc (also called inverse) sine of [param x], returning a value in radians. Use it to get the angle from an angle's sine in hyperbolic space.
112 [codeblock]
113 var a = asinh(0.9) # Returns 0.8088669356527824
114 sinh(a) # Returns 0.9
115 [/codeblock]
116 </description>
117 </method>
118 <method name="atan">
119 <return type="float" />
120 <param index="0" name="x" type="float" />
121 <description>
122 Returns the arc tangent of [param x] in radians. Use it to get the angle from an angle's tangent in trigonometry.
123 The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code skip-lint]x[/code].
124 [codeblock]
125 var a = atan(0.5) # a is 0.463648
126 [/codeblock]
127 If [param x] is between [code]-PI / 2[/code] and [code]PI / 2[/code] (inclusive), [code]atan(tan(x))[/code] is equal to [param x].
128 </description>
129 </method>
130 <method name="atan2">
131 <return type="float" />
132 <param index="0" name="y" type="float" />
133 <param index="1" name="x" type="float" />
134 <description>
135 Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
136 Important note: The Y coordinate comes first, by convention.
137 [codeblock]
138 var a = atan2(0, -1) # a is 3.141593
139 [/codeblock]
140 </description>
141 </method>
142 <method name="atanh">
143 <return type="float" />
144 <param index="0" name="x" type="float" />
145 <description>
146 Returns the hyperbolic arc (also called inverse) tangent of [param x], returning a value in radians. Use it to get the angle from an angle's tangent in hyperbolic space if [param x] is between -1 and 1 (non-inclusive).
147 In mathematics, the inverse hyperbolic tangent is only defined for -1 &lt; [param x] &lt; 1 in the real set, so values equal or lower to -1 for [param x] return negative [constant @GDScript.INF] and values equal or higher than 1 return positive [constant @GDScript.INF] in order to prevent [method atanh] from returning [constant @GDScript.NAN].
148 [codeblock]
149 var a = atanh(0.9) # Returns 1.47221948958322
150 tanh(a) # Returns 0.9
151
152 var b = atanh(-2) # Returns -inf
153 tanh(b) # Returns -1
154 [/codeblock]
155 </description>
156 </method>
157 <method name="bezier_derivative">
158 <return type="float" />
159 <param index="0" name="start" type="float" />
160 <param index="1" name="control_1" type="float" />
161 <param index="2" name="control_2" type="float" />
162 <param index="3" name="end" type="float" />
163 <param index="4" name="t" type="float" />
164 <description>
165 Returns the derivative at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
166 </description>
167 </method>
168 <method name="bezier_interpolate">
169 <return type="float" />
170 <param index="0" name="start" type="float" />
171 <param index="1" name="control_1" type="float" />
172 <param index="2" name="control_2" type="float" />
173 <param index="3" name="end" type="float" />
174 <param index="4" name="t" type="float" />
175 <description>
176 Returns the point at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
177 </description>
178 </method>
179 <method name="bytes_to_var">
180 <return type="Variant" />
181 <param index="0" name="bytes" type="PackedByteArray" />
182 <description>
183 Decodes a byte array back to a [Variant] value, without decoding objects.
184 [b]Note:[/b] If you need object deserialization, see [method bytes_to_var_with_objects].
185 </description>
186 </method>
187 <method name="bytes_to_var_with_objects">
188 <return type="Variant" />
189 <param index="0" name="bytes" type="PackedByteArray" />
190 <description>
191 Decodes a byte array back to a [Variant] value. Decoding objects is allowed.
192 [b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
193 </description>
194 </method>
195 <method name="ceil">
196 <return type="Variant" />
197 <param index="0" name="x" type="Variant" />
198 <description>
199 Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].
200 [codeblock]
201 var i = ceil(1.45) # i is 2.0
202 i = ceil(1.001) # i is 2.0
203 [/codeblock]
204 See also [method floor], [method round], and [method snapped].
205 [b]Note:[/b] For better type safety, use [method ceilf], [method ceili], [method Vector2.ceil], [method Vector3.ceil], or [method Vector4.ceil].
206 </description>
207 </method>
208 <method name="ceilf">
209 <return type="float" />
210 <param index="0" name="x" type="float" />
211 <description>
212 Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].
213 A type-safe version of [method ceil], returning a [float].
214 </description>
215 </method>
216 <method name="ceili">
217 <return type="int" />
218 <param index="0" name="x" type="float" />
219 <description>
220 Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].
221 A type-safe version of [method ceil], returning an [int].
222 </description>
223 </method>
224 <method name="clamp">
225 <return type="Variant" />
226 <param index="0" name="value" type="Variant" />
227 <param index="1" name="min" type="Variant" />
228 <param index="2" name="max" type="Variant" />
229 <description>
230 Clamps the [param value], returning a [Variant] not less than [param min] and not more than [param max]. Any values that can be compared with the less than and greater than operators will work.
231 [codeblock]
232 var a = clamp(-10, -1, 5)
233 # a is -1
234
235 var b = clamp(8.1, 0.9, 5.5)
236 # b is 5.5
237 [/codeblock]
238 [b]Note:[/b] For better type safety, use [method clampf], [method clampi], [method Vector2.clamp], [method Vector2i.clamp], [method Vector3.clamp], [method Vector3i.clamp], [method Vector4.clamp], [method Vector4i.clamp], or [method Color.clamp] (not currently supported by this method).
239 [b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise clamping, and will pick [param min] if [code]value &lt; min[/code] or [param max] if [code]value &gt; max[/code]. To perform component-wise clamping use the methods listed above.
240 </description>
241 </method>
242 <method name="clampf">
243 <return type="float" />
244 <param index="0" name="value" type="float" />
245 <param index="1" name="min" type="float" />
246 <param index="2" name="max" type="float" />
247 <description>
248 Clamps the [param value], returning a [float] not less than [param min] and not more than [param max].
249 [codeblock]
250 var speed = 42.1
251 var a = clampf(speed, 1.0, 20.5) # a is 20.5
252
253 speed = -10.0
254 var b = clampf(speed, -1.0, 1.0) # b is -1.0
255 [/codeblock]
256 </description>
257 </method>
258 <method name="clampi">
259 <return type="int" />
260 <param index="0" name="value" type="int" />
261 <param index="1" name="min" type="int" />
262 <param index="2" name="max" type="int" />
263 <description>
264 Clamps the [param value], returning an [int] not less than [param min] and not more than [param max].
265 [codeblock]
266 var speed = 42
267 var a = clampi(speed, 1, 20) # a is 20
268
269 speed = -10
270 var b = clampi(speed, -1, 1) # b is -1
271 [/codeblock]
272 </description>
273 </method>
274 <method name="cos">
275 <return type="float" />
276 <param index="0" name="angle_rad" type="float" />
277 <description>
278 Returns the cosine of angle [param angle_rad] in radians.
279 [codeblock]
280 cos(PI * 2) # Returns 1.0
281 cos(PI) # Returns -1.0
282 cos(deg_to_rad(90)) # Returns 0.0
283 [/codeblock]
284 </description>
285 </method>
286 <method name="cosh">
287 <return type="float" />
288 <param index="0" name="x" type="float" />
289 <description>
290 Returns the hyperbolic cosine of [param x] in radians.
291 [codeblock]
292 print(cosh(1)) # Prints 1.543081
293 [/codeblock]
294 </description>
295 </method>
296 <method name="cubic_interpolate">
297 <return type="float" />
298 <param index="0" name="from" type="float" />
299 <param index="1" name="to" type="float" />
300 <param index="2" name="pre" type="float" />
301 <param index="3" name="post" type="float" />
302 <param index="4" name="weight" type="float" />
303 <description>
304 Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values.
305 </description>
306 </method>
307 <method name="cubic_interpolate_angle">
308 <return type="float" />
309 <param index="0" name="from" type="float" />
310 <param index="1" name="to" type="float" />
311 <param index="2" name="pre" type="float" />
312 <param index="3" name="post" type="float" />
313 <param index="4" name="weight" type="float" />
314 <description>
315 Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle].
316 </description>
317 </method>
318 <method name="cubic_interpolate_angle_in_time">
319 <return type="float" />
320 <param index="0" name="from" type="float" />
321 <param index="1" name="to" type="float" />
322 <param index="2" name="pre" type="float" />
323 <param index="3" name="post" type="float" />
324 <param index="4" name="weight" type="float" />
325 <param index="5" name="to_t" type="float" />
326 <param index="6" name="pre_t" type="float" />
327 <param index="7" name="post_t" type="float" />
328 <description>
329 Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle].
330 It can perform smoother interpolation than [method cubic_interpolate] by the time values.
331 </description>
332 </method>
333 <method name="cubic_interpolate_in_time">
334 <return type="float" />
335 <param index="0" name="from" type="float" />
336 <param index="1" name="to" type="float" />
337 <param index="2" name="pre" type="float" />
338 <param index="3" name="post" type="float" />
339 <param index="4" name="weight" type="float" />
340 <param index="5" name="to_t" type="float" />
341 <param index="6" name="pre_t" type="float" />
342 <param index="7" name="post_t" type="float" />
343 <description>
344 Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values.
345 It can perform smoother interpolation than [method cubic_interpolate] by the time values.
346 </description>
347 </method>
348 <method name="db_to_linear">
349 <return type="float" />
350 <param index="0" name="db" type="float" />
351 <description>
352 Converts from decibels to linear energy (audio).
353 </description>
354 </method>
355 <method name="deg_to_rad">
356 <return type="float" />
357 <param index="0" name="deg" type="float" />
358 <description>
359 Converts an angle expressed in degrees to radians.
360 [codeblock]
361 var r = deg_to_rad(180) # r is 3.141593
362 [/codeblock]
363 </description>
364 </method>
365 <method name="ease" keywords="smooth">
366 <return type="float" />
367 <param index="0" name="x" type="float" />
368 <param index="1" name="curve" type="float" />
369 <description>
370 Returns an "eased" value of [param x] based on an easing function defined with [param curve]. This easing function is based on an exponent. The [param curve] can be any floating-point number, with specific values leading to the following behaviors:
371 [codeblock lang=text]
372 - Lower than -1.0 (exclusive): Ease in-out
373 - -1.0: Linear
374 - Between -1.0 and 0.0 (exclusive): Ease out-in
375 - 0.0: Constant
376 - Between 0.0 to 1.0 (exclusive): Ease out
377 - 1.0: Linear
378 - Greater than 1.0 (exclusive): Ease in
379 [/codeblock]
380 [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
381 See also [method smoothstep]. If you need to perform more advanced transitions, use [method Tween.interpolate_value].
382 </description>
383 </method>
384 <method name="error_string">
385 <return type="String" />
386 <param index="0" name="error" type="int" />
387 <description>
388 Returns a human-readable name for the given [enum Error] code.
389 [codeblock]
390 print(OK) # Prints 0
391 print(error_string(OK)) # Prints "OK"
392 print(error_string(ERR_BUSY)) # Prints "Busy"
393 print(error_string(ERR_OUT_OF_MEMORY)) # Prints "Out of memory"
394 [/codeblock]
395 </description>
396 </method>
397 <method name="exp">
398 <return type="float" />
399 <param index="0" name="x" type="float" />
400 <description>
401 The natural exponential function. It raises the mathematical constant [i]e[/i] to the power of [param x] and returns it.
402 [i]e[/i] has an approximate value of 2.71828, and can be obtained with [code]exp(1)[/code].
403 For exponents to other bases use the method [method pow].
404 [codeblock]
405 var a = exp(2) # Approximately 7.39
406 [/codeblock]
407 </description>
408 </method>
409 <method name="floor">
410 <return type="Variant" />
411 <param index="0" name="x" type="Variant" />
412 <description>
413 Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].
414 [codeblock]
415 var a = floor(2.99) # a is 2.0
416 a = floor(-2.99) # a is -3.0
417 [/codeblock]
418 See also [method ceil], [method round], and [method snapped].
419 [b]Note:[/b] For better type safety, use [method floorf], [method floori], [method Vector2.floor], [method Vector3.floor], or [method Vector4.floor].
420 </description>
421 </method>
422 <method name="floorf">
423 <return type="float" />
424 <param index="0" name="x" type="float" />
425 <description>
426 Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].
427 A type-safe version of [method floor], returning a [float].
428 </description>
429 </method>
430 <method name="floori">
431 <return type="int" />
432 <param index="0" name="x" type="float" />
433 <description>
434 Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].
435 A type-safe version of [method floor], returning an [int].
436 [b]Note:[/b] This function is [i]not[/i] the same as [code]int(x)[/code], which rounds towards 0.
437 </description>
438 </method>
439 <method name="fmod">
440 <return type="float" />
441 <param index="0" name="x" type="float" />
442 <param index="1" name="y" type="float" />
443 <description>
444 Returns the floating-point remainder of [param x] divided by [param y], keeping the sign of [param x].
445 [codeblock]
446 var remainder = fmod(7, 5.5) # remainder is 1.5
447 [/codeblock]
448 For the integer remainder operation, use the [code]%[/code] operator.
449 </description>
450 </method>
451 <method name="fposmod">
452 <return type="float" />
453 <param index="0" name="x" type="float" />
454 <param index="1" name="y" type="float" />
455 <description>
456 Returns the floating-point modulus of [param x] divided by [param y], wrapping equally in positive and negative.
457 [codeblock]
458 print(" (x) (fmod(x, 1.5)) (fposmod(x, 1.5))")
459 for i in 7:
460 var x = i * 0.5 - 1.5
461 print("%4.1f %4.1f | %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
462 [/codeblock]
463 Prints:
464 [codeblock lang=text]
465 (x) (fmod(x, 1.5)) (fposmod(x, 1.5))
466 -1.5 -0.0 | 0.0
467 -1.0 -1.0 | 0.5
468 -0.5 -0.5 | 1.0
469 0.0 0.0 | 0.0
470 0.5 0.5 | 0.5
471 1.0 1.0 | 1.0
472 1.5 0.0 | 0.0
473 [/codeblock]
474 </description>
475 </method>
476 <method name="hash">
477 <return type="int" />
478 <param index="0" name="variable" type="Variant" />
479 <description>
480 Returns the integer hash of the passed [param variable].
481 [codeblocks]
482 [gdscript]
483 print(hash("a")) # Prints 177670
484 [/gdscript]
485 [csharp]
486 GD.Print(GD.Hash("a")); // Prints 177670
487 [/csharp]
488 [/codeblocks]
489 </description>
490 </method>
491 <method name="instance_from_id">
492 <return type="Object" />
493 <param index="0" name="instance_id" type="int" />
494 <description>
495 Returns the [Object] that corresponds to [param instance_id]. All Objects have a unique instance ID. See also [method Object.get_instance_id].
496 [codeblocks]
497 [gdscript]
498 var drink = "water"
499
500 func _ready():
501 var id = get_instance_id()
502 var instance = instance_from_id(id)
503 print(instance.drink) # Prints "water"
504 [/gdscript]
505 [csharp]
506 public partial class MyNode : Node
507 {
508 public string Drink { get; set; } = "water";
509
510 public override void _Ready()
511 {
512 ulong id = GetInstanceId();
513 var instance = (MyNode)InstanceFromId(Id);
514 GD.Print(instance.Drink); // Prints "water"
515 }
516 }
517 [/csharp]
518 [/codeblocks]
519 </description>
520 </method>
521 <method name="inverse_lerp" keywords="interpolate">
522 <return type="float" />
523 <param index="0" name="from" type="float" />
524 <param index="1" name="to" type="float" />
525 <param index="2" name="weight" type="float" />
526 <description>
527 Returns an interpolation or extrapolation factor considering the range specified in [param from] and [param to], and the interpolated value specified in [param weight]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [param weight] is between [param from] and [param to] (inclusive). If [param weight] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on the result of [method inverse_lerp] if this is not desired.
528 [codeblock]
529 # The interpolation ratio in the `lerp()` call below is 0.75.
530 var middle = lerp(20, 30, 0.75)
531 # middle is now 27.5.
532
533 # Now, we pretend to have forgotten the original ratio and want to get it back.
534 var ratio = inverse_lerp(20, 30, 27.5)
535 # ratio is now 0.75.
536 [/codeblock]
537 See also [method lerp], which performs the reverse of this operation, and [method remap] to map a continuous series of values to another.
538 </description>
539 </method>
540 <method name="is_equal_approx" keywords="roughly">
541 <return type="bool" />
542 <param index="0" name="a" type="float" />
543 <param index="1" name="b" type="float" />
544 <description>
545 Returns [code]true[/code] if [param a] and [param b] are approximately equal to each other.
546 Here, "approximately equal" means that [param a] and [param b] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
547 Infinity values of the same sign are considered equal.
548 </description>
549 </method>
550 <method name="is_finite">
551 <return type="bool" />
552 <param index="0" name="x" type="float" />
553 <description>
554 Returns whether [param x] is a finite value, i.e. it is not [constant @GDScript.NAN], positive infinity, or negative infinity. See also [method is_inf] and [method is_nan].
555 </description>
556 </method>
557 <method name="is_inf">
558 <return type="bool" />
559 <param index="0" name="x" type="float" />
560 <description>
561 Returns [code]true[/code] if [param x] is either positive infinity or negative infinity. See also [method is_finite] and [method is_nan].
562 </description>
563 </method>
564 <method name="is_instance_id_valid">
565 <return type="bool" />
566 <param index="0" name="id" type="int" />
567 <description>
568 Returns [code]true[/code] if the Object that corresponds to [param id] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID.
569 </description>
570 </method>
571 <method name="is_instance_valid">
572 <return type="bool" />
573 <param index="0" name="instance" type="Variant" />
574 <description>
575 Returns [code]true[/code] if [param instance] is a valid Object (e.g. has not been deleted from memory).
576 </description>
577 </method>
578 <method name="is_nan">
579 <return type="bool" />
580 <param index="0" name="x" type="float" />
581 <description>
582 Returns [code]true[/code] if [param x] is a NaN ("Not a Number" or invalid) value. This method is needed as [constant @GDScript.NAN] is not equal to itself, which means [code]x == NAN[/code] can't be used to check whether a value is a NaN.
583 </description>
584 </method>
585 <method name="is_same">
586 <return type="bool" />
587 <param index="0" name="a" type="Variant" />
588 <param index="1" name="b" type="Variant" />
589 <description>
590 Returns [code]true[/code], for value types, if [param a] and [param b] share the same value. Returns [code]true[/code], for reference types, if the references of [param a] and [param b] are the same.
591 [codeblock]
592 # Vector2 is a value type
593 var vec2_a = Vector2(0, 0)
594 var vec2_b = Vector2(0, 0)
595 var vec2_c = Vector2(1, 1)
596 is_same(vec2_a, vec2_a) # true
597 is_same(vec2_a, vec2_b) # true
598 is_same(vec2_a, vec2_c) # false
599
600 # Array is a reference type
601 var arr_a = []
602 var arr_b = []
603 is_same(arr_a, arr_a) # true
604 is_same(arr_a, arr_b) # false
605 [/codeblock]
606 These are [Variant] value types: [code]null[/code], [bool], [int], [float], [String], [StringName], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i], [Rect2], [Rect2i], [Transform2D], [Transform3D], [Plane], [Quaternion], [AABB], [Basis], [Projection], [Color], [NodePath], [RID], [Callable] and [Signal].
607 These are [Variant] reference types: [Object], [Dictionary], [Array], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], [PackedFloat64Array], [PackedStringArray], [PackedVector2Array], [PackedVector3Array], [PackedVector4Array], and [PackedColorArray].
608 </description>
609 </method>
610 <method name="is_zero_approx">
611 <return type="bool" />
612 <param index="0" name="x" type="float" />
613 <description>
614 Returns [code]true[/code] if [param x] is zero or almost zero. The comparison is done using a tolerance calculation with a small internal epsilon.
615 This function is faster than using [method is_equal_approx] with one value as zero.
616 </description>
617 </method>
618 <method name="lerp" keywords="interpolate">
619 <return type="Variant" />
620 <param index="0" name="from" type="Variant" />
621 <param index="1" name="to" type="Variant" />
622 <param index="2" name="weight" type="Variant" />
623 <description>
624 Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clampf] to limit [param weight].
625 Both [param from] and [param to] must be the same type. Supported types: [int], [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis], [Transform2D], [Transform3D].
626 [codeblock]
627 lerp(0, 4, 0.75) # Returns 3.0
628 [/codeblock]
629 See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep]. See also [method remap] to map a continuous series of values to another.
630 [b]Note:[/b] For better type safety, use [method lerpf], [method Vector2.lerp], [method Vector3.lerp], [method Vector4.lerp], [method Color.lerp], [method Quaternion.slerp], [method Basis.slerp], [method Transform2D.interpolate_with], or [method Transform3D.interpolate_with].
631 </description>
632 </method>
633 <method name="lerp_angle" keywords="interpolate">
634 <return type="float" />
635 <param index="0" name="from" type="float" />
636 <param index="1" name="to" type="float" />
637 <param index="2" name="weight" type="float" />
638 <description>
639 Linearly interpolates between two angles (in radians) by a [param weight] value between 0.0 and 1.0.
640 Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU]. To perform eased interpolation with [method lerp_angle], combine it with [method ease] or [method smoothstep].
641 [codeblock]
642 extends Sprite
643 var elapsed = 0.0
644 func _process(delta):
645 var min_angle = deg_to_rad(0.0)
646 var max_angle = deg_to_rad(90.0)
647 rotation = lerp_angle(min_angle, max_angle, elapsed)
648 elapsed += delta
649 [/codeblock]
650 [b]Note:[/b] This function lerps through the shortest path between [param from] and [param to]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise.
651 </description>
652 </method>
653 <method name="lerpf">
654 <return type="float" />
655 <param index="0" name="from" type="float" />
656 <param index="1" name="to" type="float" />
657 <param index="2" name="weight" type="float" />
658 <description>
659 Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clampf] on the result of this function.
660 [codeblock]
661 lerpf(0, 4, 0.75) # Returns 3.0
662 [/codeblock]
663 See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep].
664 </description>
665 </method>
666 <method name="linear_to_db">
667 <return type="float" />
668 <param index="0" name="lin" type="float" />
669 <description>
670 Converts from linear energy to decibels (audio). Since volume is not normally linear, this can be used to implement volume sliders that behave as expected.
671 [b]Example:[/b] Change the Master bus's volume through a [Slider] node, which ranges from [code]0.0[/code] to [code]1.0[/code]:
672 [codeblock]
673 AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db($Slider.value))
674 [/codeblock]
675 </description>
676 </method>
677 <method name="log">
678 <return type="float" />
679 <param index="0" name="x" type="float" />
680 <description>
681 Returns the [url=https://en.wikipedia.org/wiki/Natural_logarithm]natural logarithm[/url] of [param x] (base [url=https://en.wikipedia.org/wiki/E_(mathematical_constant)][i]e[/i][/url], with [i]e[/i] being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth.
682 [b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. To use base 10 logarithm, use [code]log(x) / log(10)[/code].
683 [codeblock]
684 log(10) # Returns 2.302585
685 [/codeblock]
686 [b]Note:[/b] The logarithm of [code]0[/code] returns [code]-inf[/code], while negative values return [code]-nan[/code].
687 </description>
688 </method>
689 <method name="max" qualifiers="vararg">
690 <return type="Variant" />
691 <description>
692 Returns the maximum of the given numeric values. This function can take any number of arguments.
693 [codeblock]
694 max(1, 7, 3, -6, 5) # Returns 7
695 [/codeblock]
696 [b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise maximum, and will pick the largest value when compared using [code]x &lt; y[/code]. To perform component-wise maximum, use [method Vector2.max], [method Vector2i.max], [method Vector3.max], [method Vector3i.max], [method Vector4.max], and [method Vector4i.max].
697 </description>
698 </method>
699 <method name="maxf">
700 <return type="float" />
701 <param index="0" name="a" type="float" />
702 <param index="1" name="b" type="float" />
703 <description>
704 Returns the maximum of two [float] values.
705 [codeblock]
706 maxf(3.6, 24) # Returns 24.0
707 maxf(-3.99, -4) # Returns -3.99
708 [/codeblock]
709 </description>
710 </method>
711 <method name="maxi">
712 <return type="int" />
713 <param index="0" name="a" type="int" />
714 <param index="1" name="b" type="int" />
715 <description>
716 Returns the maximum of two [int] values.
717 [codeblock]
718 maxi(1, 2) # Returns 2
719 maxi(-3, -4) # Returns -3
720 [/codeblock]
721 </description>
722 </method>
723 <method name="min" qualifiers="vararg">
724 <return type="Variant" />
725 <description>
726 Returns the minimum of the given numeric values. This function can take any number of arguments.
727 [codeblock]
728 min(1, 7, 3, -6, 5) # Returns -6
729 [/codeblock]
730 [b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise minimum, and will pick the smallest value when compared using [code]x &lt; y[/code]. To perform component-wise minimum, use [method Vector2.min], [method Vector2i.min], [method Vector3.min], [method Vector3i.min], [method Vector4.min], and [method Vector4i.min].
731 </description>
732 </method>
733 <method name="minf">
734 <return type="float" />
735 <param index="0" name="a" type="float" />
736 <param index="1" name="b" type="float" />
737 <description>
738 Returns the minimum of two [float] values.
739 [codeblock]
740 minf(3.6, 24) # Returns 3.6
741 minf(-3.99, -4) # Returns -4.0
742 [/codeblock]
743 </description>
744 </method>
745 <method name="mini">
746 <return type="int" />
747 <param index="0" name="a" type="int" />
748 <param index="1" name="b" type="int" />
749 <description>
750 Returns the minimum of two [int] values.
751 [codeblock]
752 mini(1, 2) # Returns 1
753 mini(-3, -4) # Returns -4
754 [/codeblock]
755 </description>
756 </method>
757 <method name="move_toward">
758 <return type="float" />
759 <param index="0" name="from" type="float" />
760 <param index="1" name="to" type="float" />
761 <param index="2" name="delta" type="float" />
762 <description>
763 Moves [param from] toward [param to] by the [param delta] amount. Will not go past [param to].
764 Use a negative [param delta] value to move away.
765 [codeblock]
766 move_toward(5, 10, 4) # Returns 9
767 move_toward(10, 5, 4) # Returns 6
768 move_toward(5, 10, 9) # Returns 10
769 move_toward(10, 5, -1.5) # Returns 11.5
770 [/codeblock]
771 </description>
772 </method>
773 <method name="nearest_po2">
774 <return type="int" />
775 <param index="0" name="value" type="int" />
776 <description>
777 Returns the smallest integer power of 2 that is greater than or equal to [param value].
778 [codeblock]
779 nearest_po2(3) # Returns 4
780 nearest_po2(4) # Returns 4
781 nearest_po2(5) # Returns 8
782
783 nearest_po2(0) # Returns 0 (this may not be expected)
784 nearest_po2(-1) # Returns 0 (this may not be expected)
785 [/codeblock]
786 [b]Warning:[/b] Due to its implementation, this method returns [code]0[/code] rather than [code]1[/code] for values less than or equal to [code]0[/code], with an exception for [param value] being the smallest negative 64-bit integer ([code]-9223372036854775808[/code]) in which case the [param value] is returned unchanged.
787 </description>
788 </method>
789 <method name="pingpong">
790 <return type="float" />
791 <param index="0" name="value" type="float" />
792 <param index="1" name="length" type="float" />
793 <description>
794 Wraps [param value] between [code]0[/code] and the [param length]. If the limit is reached, the next value the function returns is decreased to the [code]0[/code] side or increased to the [param length] side (like a triangle wave). If [param length] is less than zero, it becomes positive.
795 [codeblock]
796 pingpong(-3.0, 3.0) # Returns 3.0
797 pingpong(-2.0, 3.0) # Returns 2.0
798 pingpong(-1.0, 3.0) # Returns 1.0
799 pingpong(0.0, 3.0) # Returns 0.0
800 pingpong(1.0, 3.0) # Returns 1.0
801 pingpong(2.0, 3.0) # Returns 2.0
802 pingpong(3.0, 3.0) # Returns 3.0
803 pingpong(4.0, 3.0) # Returns 2.0
804 pingpong(5.0, 3.0) # Returns 1.0
805 pingpong(6.0, 3.0) # Returns 0.0
806 [/codeblock]
807 </description>
808 </method>
809 <method name="posmod">
810 <return type="int" />
811 <param index="0" name="x" type="int" />
812 <param index="1" name="y" type="int" />
813 <description>
814 Returns the integer modulus of [param x] divided by [param y] that wraps equally in positive and negative.
815 [codeblock]
816 print("#(i) (i % 3) (posmod(i, 3))")
817 for i in range(-3, 4):
818 print("%2d %2d | %2d" % [i, i % 3, posmod(i, 3)])
819 [/codeblock]
820 Prints:
821 [codeblock lang=text]
822 (i) (i % 3) (posmod(i, 3))
823 -3 0 | 0
824 -2 -2 | 1
825 -1 -1 | 2
826 0 0 | 0
827 1 1 | 1
828 2 2 | 2
829 3 0 | 0
830 [/codeblock]
831 </description>
832 </method>
833 <method name="pow">
834 <return type="float" />
835 <param index="0" name="base" type="float" />
836 <param index="1" name="exp" type="float" />
837 <description>
838 Returns the result of [param base] raised to the power of [param exp].
839 In GDScript, this is the equivalent of the [code]**[/code] operator.
840 [codeblock]
841 pow(2, 5) # Returns 32.0
842 pow(4, 1.5) # Returns 8.0
843 [/codeblock]
844 </description>
845 </method>
846 <method name="print" qualifiers="vararg">
847 <return type="void" />
848 <description>
849 Converts one or more arguments of any type to string in the best way possible and prints them to the console.
850 [codeblocks]
851 [gdscript]
852 var a = [1, 2, 3]
853 print("a", "b", a) # Prints "ab[1, 2, 3]"
854 [/gdscript]
855 [csharp]
856 Godot.Collections.Array a = [1, 2, 3];
857 GD.Print("a", "b", a); // Prints "ab[1, 2, 3]"
858 [/csharp]
859 [/codeblocks]
860 [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also [member Engine.print_to_stdout] and [member ProjectSettings.application/run/disable_stdout].
861 </description>
862 </method>
863 <method name="print_rich" qualifiers="vararg">
864 <return type="void" />
865 <description>
866 Converts one or more arguments of any type to string in the best way possible and prints them to the console.
867 The following BBCode tags are supported: [code]b[/code], [code]i[/code], [code]u[/code], [code]s[/code], [code]indent[/code], [code]code[/code], [code]url[/code], [code]center[/code], [code]right[/code], [code]color[/code], [code]bgcolor[/code], [code]fgcolor[/code].
868 URL tags only support URLs wrapped by a URL tag, not URLs with a different title.
869 When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Support for ANSI escape codes varies across terminal emulators, especially for italic and strikethrough. In standard output, [code]code[/code] is represented with faint text but without any font change. Unsupported tags are left as-is in standard output.
870 [codeblocks]
871 [gdscript skip-lint]
872 print_rich("[color=green][b]Hello world![/b][/color]") # Prints "Hello world!", in green with a bold font.
873 [/gdscript]
874 [csharp skip-lint]
875 GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints "Hello world!", in green with a bold font.
876 [/csharp]
877 [/codeblocks]
878 [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
879 [b]Note:[/b] Output displayed in the editor supports clickable [code skip-lint][url=address]text[/url][/code] tags. The [code skip-lint][url][/code] tag's [code]address[/code] value is handled by [method OS.shell_open] when clicked.
880 </description>
881 </method>
882 <method name="print_verbose" qualifiers="vararg">
883 <return type="void" />
884 <description>
885 If verbose mode is enabled ([method OS.is_stdout_verbose] returning [code]true[/code]), converts one or more arguments of any type to string in the best way possible and prints them to the console.
886 </description>
887 </method>
888 <method name="printerr" qualifiers="vararg">
889 <return type="void" />
890 <description>
891 Prints one or more arguments to strings in the best way possible to standard error line.
892 [codeblocks]
893 [gdscript]
894 printerr("prints to stderr")
895 [/gdscript]
896 [csharp]
897 GD.PrintErr("prints to stderr");
898 [/csharp]
899 [/codeblocks]
900 </description>
901 </method>
902 <method name="printraw" qualifiers="vararg">
903 <return type="void" />
904 <description>
905 Prints one or more arguments to strings in the best way possible to the OS terminal. Unlike [method print], no newline is automatically added at the end.
906 [b]Note:[/b] The OS terminal is [i]not[/i] the same as the editor's Output dock. The output sent to the OS terminal can be seen when running Godot from a terminal. On Windows, this requires using the [code]console.exe[/code] executable.
907 [codeblocks]
908 [gdscript]
909 # Prints "ABC" to terminal.
910 printraw("A")
911 printraw("B")
912 printraw("C")
913 [/gdscript]
914 [csharp]
915 // Prints "ABC" to terminal.
916 GD.PrintRaw("A");
917 GD.PrintRaw("B");
918 GD.PrintRaw("C");
919 [/csharp]
920 [/codeblocks]
921 </description>
922 </method>
923 <method name="prints" qualifiers="vararg">
924 <return type="void" />
925 <description>
926 Prints one or more arguments to the console with a space between each argument.
927 [codeblocks]
928 [gdscript]
929 prints("A", "B", "C") # Prints "A B C"
930 [/gdscript]
931 [csharp]
932 GD.PrintS("A", "B", "C"); // Prints "A B C"
933 [/csharp]
934 [/codeblocks]
935 </description>
936 </method>
937 <method name="printt" qualifiers="vararg">
938 <return type="void" />
939 <description>
940 Prints one or more arguments to the console with a tab between each argument.
941 [codeblocks]
942 [gdscript]
943 printt("A", "B", "C") # Prints "A B C"
944 [/gdscript]
945 [csharp]
946 GD.PrintT("A", "B", "C"); // Prints "A B C"
947 [/csharp]
948 [/codeblocks]
949 </description>
950 </method>
951 <method name="push_error" qualifiers="vararg">
952 <return type="void" />
953 <description>
954 Pushes an error message to Godot's built-in debugger and to the OS terminal.
955 [codeblocks]
956 [gdscript]
957 push_error("test error") # Prints "test error" to debugger and terminal as an error.
958 [/gdscript]
959 [csharp]
960 GD.PushError("test error"); // Prints "test error" to debugger and terminal as an error.
961 [/csharp]
962 [/codeblocks]
963 [b]Note:[/b] This function does not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, "test error")[/code] instead.
964 </description>
965 </method>
966 <method name="push_warning" qualifiers="vararg">
967 <return type="void" />
968 <description>
969 Pushes a warning message to Godot's built-in debugger and to the OS terminal.
970 [codeblocks]
971 [gdscript]
972 push_warning("test warning") # Prints "test warning" to debugger and terminal as a warning.
973 [/gdscript]
974 [csharp]
975 GD.PushWarning("test warning"); // Prints "test warning" to debugger and terminal as a warning.
976 [/csharp]
977 [/codeblocks]
978 </description>
979 </method>
980 <method name="rad_to_deg">
981 <return type="float" />
982 <param index="0" name="rad" type="float" />
983 <description>
984 Converts an angle expressed in radians to degrees.
985 [codeblock]
986 rad_to_deg(0.523599) # Returns 30
987 rad_to_deg(PI) # Returns 180
988 rad_to_deg(PI * 2) # Returns 360
989 [/codeblock]
990 </description>
991 </method>
992 <method name="rand_from_seed">
993 <return type="PackedInt64Array" />
994 <param index="0" name="seed" type="int" />
995 <description>
996 Given a [param seed], returns a [PackedInt64Array] of size [code]2[/code], where its first element is the randomized [int] value, and the second element is the same as [param seed]. Passing the same [param seed] consistently returns the same array.
997 [b]Note:[/b] "Seed" here refers to the internal state of the pseudo random number generator, currently implemented as a 64 bit integer.
998 [codeblock]
999 var a = rand_from_seed(4)
1000
1001 print(a[0]) # Prints 2879024997
1002 print(a[1]) # Prints 4
1003 [/codeblock]
1004 </description>
1005 </method>
1006 <method name="randf">
1007 <return type="float" />
1008 <description>
1009 Returns a random floating-point value between [code]0.0[/code] and [code]1.0[/code] (inclusive).
1010 [codeblocks]
1011 [gdscript]
1012 randf() # Returns e.g. 0.375671
1013 [/gdscript]
1014 [csharp]
1015 GD.Randf(); // Returns e.g. 0.375671
1016 [/csharp]
1017 [/codeblocks]
1018 </description>
1019 </method>
1020 <method name="randf_range">
1021 <return type="float" />
1022 <param index="0" name="from" type="float" />
1023 <param index="1" name="to" type="float" />
1024 <description>
1025 Returns a random floating-point value between [param from] and [param to] (inclusive).
1026 [codeblocks]
1027 [gdscript]
1028 randf_range(0, 20.5) # Returns e.g. 7.45315
1029 randf_range(-10, 10) # Returns e.g. -3.844535
1030 [/gdscript]
1031 [csharp]
1032 GD.RandRange(0.0, 20.5); // Returns e.g. 7.45315
1033 GD.RandRange(-10.0, 10.0); // Returns e.g. -3.844535
1034 [/csharp]
1035 [/codeblocks]
1036 </description>
1037 </method>
1038 <method name="randfn">
1039 <return type="float" />
1040 <param index="0" name="mean" type="float" />
1041 <param index="1" name="deviation" type="float" />
1042 <description>
1043 Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url], pseudo-random floating-point value from the specified [param mean] and a standard [param deviation]. This is also known as a Gaussian distribution.
1044 [b]Note:[/b] This method uses the [url=https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform]Box-Muller transform[/url] algorithm.
1045 </description>
1046 </method>
1047 <method name="randi">
1048 <return type="int" />
1049 <description>
1050 Returns a random unsigned 32-bit integer. Use remainder to obtain a random value in the interval [code][0, N - 1][/code] (where N is smaller than 2^32).
1051 [codeblocks]
1052 [gdscript]
1053 randi() # Returns random integer between 0 and 2^32 - 1
1054 randi() % 20 # Returns random integer between 0 and 19
1055 randi() % 100 # Returns random integer between 0 and 99
1056 randi() % 100 + 1 # Returns random integer between 1 and 100
1057 [/gdscript]
1058 [csharp]
1059 GD.Randi(); // Returns random integer between 0 and 2^32 - 1
1060 GD.Randi() % 20; // Returns random integer between 0 and 19
1061 GD.Randi() % 100; // Returns random integer between 0 and 99
1062 GD.Randi() % 100 + 1; // Returns random integer between 1 and 100
1063 [/csharp]
1064 [/codeblocks]
1065 </description>
1066 </method>
1067 <method name="randi_range">
1068 <return type="int" />
1069 <param index="0" name="from" type="int" />
1070 <param index="1" name="to" type="int" />
1071 <description>
1072 Returns a random signed 32-bit integer between [param from] and [param to] (inclusive). If [param to] is lesser than [param from], they are swapped.
1073 [codeblocks]
1074 [gdscript]
1075 randi_range(0, 1) # Returns either 0 or 1
1076 randi_range(-10, 1000) # Returns random integer between -10 and 1000
1077 [/gdscript]
1078 [csharp]
1079 GD.RandRange(0, 1); // Returns either 0 or 1
1080 GD.RandRange(-10, 1000); // Returns random integer between -10 and 1000
1081 [/csharp]
1082 [/codeblocks]
1083 </description>
1084 </method>
1085 <method name="randomize">
1086 <return type="void" />
1087 <description>
1088 Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time.
1089 [b]Note:[/b] This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use [method seed] to initialize the random number generator.
1090 </description>
1091 </method>
1092 <method name="remap" keywords="range, lerp, interpolate">
1093 <return type="float" />
1094 <param index="0" name="value" type="float" />
1095 <param index="1" name="istart" type="float" />
1096 <param index="2" name="istop" type="float" />
1097 <param index="3" name="ostart" type="float" />
1098 <param index="4" name="ostop" type="float" />
1099 <description>
1100 Maps a [param value] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [param value] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. If this is not desired, use [method clamp] on the result of this function.
1101 [codeblock]
1102 remap(75, 0, 100, -1, 1) # Returns 0.5
1103 [/codeblock]
1104 For complex use cases where multiple ranges are needed, consider using [Curve] or [Gradient] instead.
1105 [b]Note:[/b] If [code]istart == istop[/code], the return value is undefined (most likely NaN, INF, or -INF).
1106 </description>
1107 </method>
1108 <method name="rid_allocate_id">
1109 <return type="int" />
1110 <description>
1111 Allocates a unique ID which can be used by the implementation to construct an RID. This is used mainly from native extensions to implement servers.
1112 </description>
1113 </method>
1114 <method name="rid_from_int64">
1115 <return type="RID" />
1116 <param index="0" name="base" type="int" />
1117 <description>
1118 Creates an RID from a [param base]. This is used mainly from native extensions to build servers.
1119 </description>
1120 </method>
1121 <method name="rotate_toward">
1122 <return type="float" />
1123 <param index="0" name="from" type="float" />
1124 <param index="1" name="to" type="float" />
1125 <param index="2" name="delta" type="float" />
1126 <description>
1127 Rotates [param from] toward [param to] by the [param delta] amount. Will not go past [param to].
1128 Similar to [method move_toward], but interpolates correctly when the angles wrap around [constant @GDScript.TAU].
1129 If [param delta] is negative, this function will rotate away from [param to], toward the opposite angle, and will not go past the opposite angle.
1130 </description>
1131 </method>
1132 <method name="round">
1133 <return type="Variant" />
1134 <param index="0" name="x" type="Variant" />
1135 <description>
1136 Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].
1137 [codeblock]
1138 round(2.4) # Returns 2
1139 round(2.5) # Returns 3
1140 round(2.6) # Returns 3
1141 [/codeblock]
1142 See also [method floor], [method ceil], and [method snapped].
1143 [b]Note:[/b] For better type safety, use [method roundf], [method roundi], [method Vector2.round], [method Vector3.round], or [method Vector4.round].
1144 </description>
1145 </method>
1146 <method name="roundf">
1147 <return type="float" />
1148 <param index="0" name="x" type="float" />
1149 <description>
1150 Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0.
1151 A type-safe version of [method round], returning a [float].
1152 </description>
1153 </method>
1154 <method name="roundi">
1155 <return type="int" />
1156 <param index="0" name="x" type="float" />
1157 <description>
1158 Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0.
1159 A type-safe version of [method round], returning an [int].
1160 </description>
1161 </method>
1162 <method name="seed">
1163 <return type="void" />
1164 <param index="0" name="base" type="int" />
1165 <description>
1166 Sets the seed for the random number generator to [param base]. Setting the seed manually can ensure consistent, repeatable results for most random functions.
1167 [codeblocks]
1168 [gdscript]
1169 var my_seed = "Godot Rocks".hash()
1170 seed(my_seed)
1171 var a = randf() + randi()
1172 seed(my_seed)
1173 var b = randf() + randi()
1174 # a and b are now identical
1175 [/gdscript]
1176 [csharp]
1177 ulong mySeed = (ulong)GD.Hash("Godot Rocks");
1178 GD.Seed(mySeed);
1179 var a = GD.Randf() + GD.Randi();
1180 GD.Seed(mySeed);
1181 var b = GD.Randf() + GD.Randi();
1182 // a and b are now identical
1183 [/csharp]
1184 [/codeblocks]
1185 </description>
1186 </method>
1187 <method name="sign">
1188 <return type="Variant" />
1189 <param index="0" name="x" type="Variant" />
1190 <description>
1191 Returns the same type of [Variant] as [param x], with [code]-1[/code] for negative values, [code]1[/code] for positive values, and [code]0[/code] for zeros. For [code]nan[/code] values it returns 0.
1192 Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].
1193 [codeblock]
1194 sign(-6.0) # Returns -1
1195 sign(0.0) # Returns 0
1196 sign(6.0) # Returns 1
1197 sign(NAN) # Returns 0
1198
1199 sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1)
1200 [/codeblock]
1201 [b]Note:[/b] For better type safety, use [method signf], [method signi], [method Vector2.sign], [method Vector2i.sign], [method Vector3.sign], [method Vector3i.sign], [method Vector4.sign], or [method Vector4i.sign].
1202 </description>
1203 </method>
1204 <method name="signf">
1205 <return type="float" />
1206 <param index="0" name="x" type="float" />
1207 <description>
1208 Returns [code]-1.0[/code] if [param x] is negative, [code]1.0[/code] if [param x] is positive, and [code]0.0[/code] if [param x] is zero. For [code]nan[/code] values of [param x] it returns 0.0.
1209 [codeblock]
1210 signf(-6.5) # Returns -1.0
1211 signf(0.0) # Returns 0.0
1212 signf(6.5) # Returns 1.0
1213 signf(NAN) # Returns 0.0
1214 [/codeblock]
1215 </description>
1216 </method>
1217 <method name="signi">
1218 <return type="int" />
1219 <param index="0" name="x" type="int" />
1220 <description>
1221 Returns [code]-1[/code] if [param x] is negative, [code]1[/code] if [param x] is positive, and [code]0[/code] if [param x] is zero.
1222 [codeblock]
1223 signi(-6) # Returns -1
1224 signi(0) # Returns 0
1225 signi(6) # Returns 1
1226 [/codeblock]
1227 </description>
1228 </method>
1229 <method name="sin">
1230 <return type="float" />
1231 <param index="0" name="angle_rad" type="float" />
1232 <description>
1233 Returns the sine of angle [param angle_rad] in radians.
1234 [codeblock]
1235 sin(0.523599) # Returns 0.5
1236 sin(deg_to_rad(90)) # Returns 1.0
1237 [/codeblock]
1238 </description>
1239 </method>
1240 <method name="sinh">
1241 <return type="float" />
1242 <param index="0" name="x" type="float" />
1243 <description>
1244 Returns the hyperbolic sine of [param x].
1245 [codeblock]
1246 var a = log(2.0) # Returns 0.693147
1247 sinh(a) # Returns 0.75
1248 [/codeblock]
1249 </description>
1250 </method>
1251 <method name="smoothstep">
1252 <return type="float" />
1253 <param index="0" name="from" type="float" />
1254 <param index="1" name="to" type="float" />
1255 <param index="2" name="x" type="float" />
1256 <description>
1257 Returns a smooth cubic Hermite interpolation between [code]0[/code] and [code]1[/code].
1258 For positive ranges (when [code]from &lt;= to[/code]) the return value is [code]0[/code] when [code]x &lt;= from[/code], and [code]1[/code] when [code]x &gt;= to[/code]. If [param x] lies between [param from] and [param to], the return value follows an S-shaped curve that smoothly transitions from [code]0[/code] to [code]1[/code].
1259 For negative ranges (when [code]from &gt; to[/code]) the function is mirrored and returns [code]1[/code] when [code]x &lt;= to[/code] and [code]0[/code] when [code]x &gt;= from[/code].
1260 This S-shaped curve is the cubic Hermite interpolator, given by [code]f(y) = 3*y^2 - 2*y^3[/code] where [code]y = (x-from) / (to-from)[/code].
1261 [codeblock]
1262 smoothstep(0, 2, -5.0) # Returns 0.0
1263 smoothstep(0, 2, 0.5) # Returns 0.15625
1264 smoothstep(0, 2, 1.0) # Returns 0.5
1265 smoothstep(0, 2, 2.0) # Returns 1.0
1266 [/codeblock]
1267 Compared to [method ease] with a curve value of [code]-1.6521[/code], [method smoothstep] returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer].
1268 [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png]Comparison between smoothstep() and ease(x, -1.6521) return values[/url]
1269 [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_range.webp]Smoothstep() return values with positive, zero, and negative ranges[/url]
1270 </description>
1271 </method>
1272 <method name="snapped">
1273 <return type="Variant" />
1274 <param index="0" name="x" type="Variant" />
1275 <param index="1" name="step" type="Variant" />
1276 <description>
1277 Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating-point number to an arbitrary number of decimals.
1278 The returned value is the same type of [Variant] as [param step]. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].
1279 [codeblock]
1280 snapped(100, 32) # Returns 96
1281 snapped(3.14159, 0.01) # Returns 3.14
1282
1283 snapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72)
1284 [/codeblock]
1285 See also [method ceil], [method floor], and [method round].
1286 [b]Note:[/b] For better type safety, use [method snappedf], [method snappedi], [method Vector2.snapped], [method Vector2i.snapped], [method Vector3.snapped], [method Vector3i.snapped], [method Vector4.snapped], or [method Vector4i.snapped].
1287 </description>
1288 </method>
1289 <method name="snappedf">
1290 <return type="float" />
1291 <param index="0" name="x" type="float" />
1292 <param index="1" name="step" type="float" />
1293 <description>
1294 Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating-point number to an arbitrary number of decimals.
1295 A type-safe version of [method snapped], returning a [float].
1296 [codeblock]
1297 snappedf(32.0, 2.5) # Returns 32.5
1298 snappedf(3.14159, 0.01) # Returns 3.14
1299 [/codeblock]
1300 </description>
1301 </method>
1302 <method name="snappedi">
1303 <return type="int" />
1304 <param index="0" name="x" type="float" />
1305 <param index="1" name="step" type="int" />
1306 <description>
1307 Returns the multiple of [param step] that is the closest to [param x].
1308 A type-safe version of [method snapped], returning an [int].
1309 [codeblock]
1310 snappedi(53, 16) # Returns 48
1311 snappedi(4096, 100) # Returns 4100
1312 [/codeblock]
1313 </description>
1314 </method>
1315 <method name="sqrt">
1316 <return type="float" />
1317 <param index="0" name="x" type="float" />
1318 <description>
1319 Returns the square root of [param x], where [param x] is a non-negative number.
1320 [codeblock]
1321 sqrt(9) # Returns 3
1322 sqrt(10.24) # Returns 3.2
1323 sqrt(-1) # Returns NaN
1324 [/codeblock]
1325 [b]Note:[/b] Negative values of [param x] return NaN ("Not a Number"). In C#, if you need negative inputs, use [code]System.Numerics.Complex[/code].
1326 </description>
1327 </method>
1328 <method name="step_decimals">
1329 <return type="int" />
1330 <param index="0" name="x" type="float" />
1331 <description>
1332 Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.
1333 [codeblock]
1334 var n = step_decimals(5) # n is 0
1335 n = step_decimals(1.0005) # n is 4
1336 n = step_decimals(0.000000005) # n is 9
1337 [/codeblock]
1338 </description>
1339 </method>
1340 <method name="str" qualifiers="vararg">
1341 <return type="String" />
1342 <description>
1343 Converts one or more arguments of any [Variant] type to a [String] in the best way possible.
1344 [codeblock]
1345 var a = [10, 20, 30]
1346 var b = str(a)
1347 print(len(a)) # Prints 3 (the number of elements in the array).
1348 print(len(b)) # Prints 12 (the length of the string "[10, 20, 30]").
1349 [/codeblock]
1350 </description>
1351 </method>
1352 <method name="str_to_var">
1353 <return type="Variant" />
1354 <param index="0" name="string" type="String" />
1355 <description>
1356 Converts a formatted [param string] that was returned by [method var_to_str] to the original [Variant].
1357 [codeblocks]
1358 [gdscript]
1359 var data = '{ "a": 1, "b": 2 }' # data is a String
1360 var dict = str_to_var(data) # dict is a Dictionary
1361 print(dict["a"]) # Prints 1
1362 [/gdscript]
1363 [csharp]
1364 string data = "{ \"a\": 1, \"b\": 2 }"; // data is a string
1365 var dict = GD.StrToVar(data).AsGodotDictionary(); // dict is a Dictionary
1366 GD.Print(dict["a"]); // Prints 1
1367 [/csharp]
1368 [/codeblocks]
1369 </description>
1370 </method>
1371 <method name="tan">
1372 <return type="float" />
1373 <param index="0" name="angle_rad" type="float" />
1374 <description>
1375 Returns the tangent of angle [param angle_rad] in radians.
1376 [codeblock]
1377 tan(deg_to_rad(45)) # Returns 1
1378 [/codeblock]
1379 </description>
1380 </method>
1381 <method name="tanh">
1382 <return type="float" />
1383 <param index="0" name="x" type="float" />
1384 <description>
1385 Returns the hyperbolic tangent of [param x].
1386 [codeblock]
1387 var a = log(2.0) # Returns 0.693147
1388 tanh(a) # Returns 0.6
1389 [/codeblock]
1390 </description>
1391 </method>
1392 <method name="type_convert">
1393 <return type="Variant" />
1394 <param index="0" name="variant" type="Variant" />
1395 <param index="1" name="type" type="int" />
1396 <description>
1397 Converts the given [param variant] to the given [param type], using the [enum Variant.Type] values. This method is generous with how it handles types, it can automatically convert between array types, convert numeric [String]s to [int], and converting most things to [String].
1398 If the type conversion cannot be done, this method will return the default value for that type, for example converting [Rect2] to [Vector2] will always return [constant Vector2.ZERO]. This method will never show error messages as long as [param type] is a valid Variant type.
1399 The returned value is a [Variant], but the data inside and its type will be the same as the requested type.
1400 [codeblock]
1401 type_convert("Hi!", TYPE_INT) # Returns 0
1402 type_convert("123", TYPE_INT) # Returns 123
1403 type_convert(123.4, TYPE_INT) # Returns 123
1404 type_convert(5, TYPE_VECTOR2) # Returns (0, 0)
1405 type_convert("Hi!", TYPE_NIL) # Returns null
1406 [/codeblock]
1407 </description>
1408 </method>
1409 <method name="type_string">
1410 <return type="String" />
1411 <param index="0" name="type" type="int" />
1412 <description>
1413 Returns a human-readable name of the given [param type], using the [enum Variant.Type] values.
1414 [codeblock]
1415 print(TYPE_INT) # Prints 2
1416 print(type_string(TYPE_INT)) # Prints "int"
1417 print(type_string(TYPE_STRING)) # Prints "String"
1418 [/codeblock]
1419 See also [method typeof].
1420 </description>
1421 </method>
1422 <method name="typeof">
1423 <return type="int" />
1424 <param index="0" name="variable" type="Variant" />
1425 <description>
1426 Returns the internal type of the given [param variable], using the [enum Variant.Type] values.
1427 [codeblock]
1428 var json = JSON.new()
1429 json.parse('["a", "b", "c"]')
1430 var result = json.get_data()
1431 if typeof(result) == TYPE_ARRAY:
1432 print(result[0]) # Prints "a"
1433 else:
1434 print("Unexpected result!")
1435 [/codeblock]
1436 See also [method type_string].
1437 </description>
1438 </method>
1439 <method name="var_to_bytes">
1440 <return type="PackedByteArray" />
1441 <param index="0" name="variable" type="Variant" />
1442 <description>
1443 Encodes a [Variant] value to a byte array, without encoding objects. Deserialization can be done with [method bytes_to_var].
1444 [b]Note:[/b] If you need object serialization, see [method var_to_bytes_with_objects].
1445 [b]Note:[/b] Encoding [Callable] is not supported and will result in an empty value, regardless of the data.
1446 </description>
1447 </method>
1448 <method name="var_to_bytes_with_objects">
1449 <return type="PackedByteArray" />
1450 <param index="0" name="variable" type="Variant" />
1451 <description>
1452 Encodes a [Variant] value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with [method bytes_to_var_with_objects].
1453 [b]Note:[/b] Encoding [Callable] is not supported and will result in an empty value, regardless of the data.
1454 </description>
1455 </method>
1456 <method name="var_to_str">
1457 <return type="String" />
1458 <param index="0" name="variable" type="Variant" />
1459 <description>
1460 Converts a [Variant] [param variable] to a formatted [String] that can then be parsed using [method str_to_var].
1461 [codeblocks]
1462 [gdscript]
1463 var a = { "a": 1, "b": 2 }
1464 print(var_to_str(a))
1465 [/gdscript]
1466 [csharp]
1467 var a = new Godot.Collections.Dictionary { ["a"] = 1, ["b"] = 2 };
1468 GD.Print(GD.VarToStr(a));
1469 [/csharp]
1470 [/codeblocks]
1471 Prints:
1472 [codeblock lang=text]
1473 {
1474 "a": 1,
1475 "b": 2
1476 }
1477 [/codeblock]
1478 [b]Note:[/b] Converting [Signal] or [Callable] is not supported and will result in an empty value for these types, regardless of their data.
1479 </description>
1480 </method>
1481 <method name="weakref">
1482 <return type="Variant" />
1483 <param index="0" name="obj" type="Variant" />
1484 <description>
1485 Returns a [WeakRef] instance holding a weak reference to [param obj]. Returns an empty [WeakRef] instance if [param obj] is [code]null[/code]. Prints an error and returns [code]null[/code] if [param obj] is neither [Object]-derived nor [code]null[/code].
1486 A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
1487 </description>
1488 </method>
1489 <method name="wrap">
1490 <return type="Variant" />
1491 <param index="0" name="value" type="Variant" />
1492 <param index="1" name="min" type="Variant" />
1493 <param index="2" name="max" type="Variant" />
1494 <description>
1495 Wraps the [Variant] [param value] between [param min] and [param max]. [param min] is [i]inclusive[/i] while [param max] is [i]exclusive[/i]. This can be used for creating loop-like behavior or infinite surfaces.
1496 Variant types [int] and [float] are supported. If any of the arguments is [float], this function returns a [float], otherwise it returns an [int].
1497 [codeblock]
1498 var a = wrap(4, 5, 10)
1499 # a is 9 (int)
1500
1501 var a = wrap(7, 5, 10)
1502 # a is 7 (int)
1503
1504 var a = wrap(10.5, 5, 10)
1505 # a is 5.5 (float)
1506 [/codeblock]
1507 </description>
1508 </method>
1509 <method name="wrapf">
1510 <return type="float" />
1511 <param index="0" name="value" type="float" />
1512 <param index="1" name="min" type="float" />
1513 <param index="2" name="max" type="float" />
1514 <description>
1515 Wraps the float [param value] between [param min] and [param max]. [param min] is [i]inclusive[/i] while [param max] is [i]exclusive[/i]. This can be used for creating loop-like behavior or infinite surfaces.
1516 [codeblock]
1517 # Infinite loop between 5.0 and 9.9
1518 value = wrapf(value + 0.1, 5.0, 10.0)
1519 [/codeblock]
1520 [codeblock]
1521 # Infinite rotation (in radians)
1522 angle = wrapf(angle + 0.1, 0.0, TAU)
1523 [/codeblock]
1524 [codeblock]
1525 # Infinite rotation (in radians)
1526 angle = wrapf(angle + 0.1, -PI, PI)
1527 [/codeblock]
1528 [b]Note:[/b] If [param min] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead. [method wrapf] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value.
1529 </description>
1530 </method>
1531 <method name="wrapi">
1532 <return type="int" />
1533 <param index="0" name="value" type="int" />
1534 <param index="1" name="min" type="int" />
1535 <param index="2" name="max" type="int" />
1536 <description>
1537 Wraps the integer [param value] between [param min] and [param max]. [param min] is [i]inclusive[/i] while [param max] is [i]exclusive[/i]. This can be used for creating loop-like behavior or infinite surfaces.
1538 [codeblock]
1539 # Infinite loop between 5 and 9
1540 frame = wrapi(frame + 1, 5, 10)
1541 [/codeblock]
1542 [codeblock]
1543 # result is -2
1544 var result = wrapi(-6, -5, -1)
1545 [/codeblock]
1546 </description>
1547 </method>
1548 </methods>
1549 <members>
1550 <member name="AudioServer" type="AudioServer" setter="" getter="">
1551 The [AudioServer] singleton.
1552 </member>
1553 <member name="CameraServer" type="CameraServer" setter="" getter="">
1554 The [CameraServer] singleton.
1555 </member>
1556 <member name="ClassDB" type="ClassDB" setter="" getter="">
1557 The [ClassDB] singleton.
1558 </member>
1559 <member name="DisplayServer" type="DisplayServer" setter="" getter="">
1560 The [DisplayServer] singleton.
1561 </member>
1562 <member name="EditorInterface" type="EditorInterface" setter="" getter="">
1563 The [EditorInterface] singleton.
1564 [b]Note:[/b] Only available in editor builds.
1565 </member>
1566 <member name="Engine" type="Engine" setter="" getter="">
1567 The [Engine] singleton.
1568 </member>
1569 <member name="EngineDebugger" type="EngineDebugger" setter="" getter="">
1570 The [EngineDebugger] singleton.
1571 </member>
1572 <member name="GDExtensionManager" type="GDExtensionManager" setter="" getter="">
1573 The [GDExtensionManager] singleton.
1574 </member>
1575 <member name="Geometry2D" type="Geometry2D" setter="" getter="">
1576 The [Geometry2D] singleton.
1577 </member>
1578 <member name="Geometry3D" type="Geometry3D" setter="" getter="">
1579 The [Geometry3D] singleton.
1580 </member>
1581 <member name="IP" type="IP" setter="" getter="">
1582 The [IP] singleton.
1583 </member>
1584 <member name="Input" type="Input" setter="" getter="">
1585 The [Input] singleton.
1586 </member>
1587 <member name="InputMap" type="InputMap" setter="" getter="">
1588 The [InputMap] singleton.
1589 </member>
1590 <member name="JavaClassWrapper" type="JavaClassWrapper" setter="" getter="">
1591 The [JavaClassWrapper] singleton.
1592 [b]Note:[/b] Only implemented on Android.
1593 </member>
1594 <member name="JavaScriptBridge" type="JavaScriptBridge" setter="" getter="">
1595 The [JavaScriptBridge] singleton.
1596 [b]Note:[/b] Only implemented on the Web platform.
1597 </member>
1598 <member name="Marshalls" type="Marshalls" setter="" getter="">
1599 The [Marshalls] singleton.
1600 </member>
1601 <member name="NativeMenu" type="NativeMenu" setter="" getter="">
1602 The [NativeMenu] singleton.
1603 [b]Note:[/b] Only implemented on macOS.
1604 </member>
1605 <member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter="">
1606 The [NavigationMeshGenerator] singleton.
1607 </member>
1608 <member name="NavigationServer2D" type="NavigationServer2D" setter="" getter="">
1609 The [NavigationServer2D] singleton.
1610 </member>
1611 <member name="NavigationServer2DManager" type="NavigationServer2DManager" setter="" getter="">
1612 The [NavigationServer2DManager] singleton.
1613 </member>
1614 <member name="NavigationServer3D" type="NavigationServer3D" setter="" getter="">
1615 The [NavigationServer3D] singleton.
1616 </member>
1617 <member name="NavigationServer3DManager" type="NavigationServer3DManager" setter="" getter="">
1618 The [NavigationServer3DManager] singleton.
1619 </member>
1620 <member name="OS" type="OS" setter="" getter="">
1621 The [OS] singleton.
1622 </member>
1623 <member name="Performance" type="Performance" setter="" getter="">
1624 The [Performance] singleton.
1625 </member>
1626 <member name="PhysicsServer2D" type="PhysicsServer2D" setter="" getter="">
1627 The [PhysicsServer2D] singleton.
1628 </member>
1629 <member name="PhysicsServer2DManager" type="PhysicsServer2DManager" setter="" getter="">
1630 The [PhysicsServer2DManager] singleton.
1631 </member>
1632 <member name="PhysicsServer3D" type="PhysicsServer3D" setter="" getter="">
1633 The [PhysicsServer3D] singleton.
1634 </member>
1635 <member name="PhysicsServer3DManager" type="PhysicsServer3DManager" setter="" getter="">
1636 The [PhysicsServer3DManager] singleton.
1637 </member>
1638 <member name="ProjectSettings" type="ProjectSettings" setter="" getter="">
1639 The [ProjectSettings] singleton.
1640 </member>
1641 <member name="RenderingServer" type="RenderingServer" setter="" getter="">
1642 The [RenderingServer] singleton.
1643 </member>
1644 <member name="ResourceLoader" type="ResourceLoader" setter="" getter="">
1645 The [ResourceLoader] singleton.
1646 </member>
1647 <member name="ResourceSaver" type="ResourceSaver" setter="" getter="">
1648 The [ResourceSaver] singleton.
1649 </member>
1650 <member name="ResourceUID" type="ResourceUID" setter="" getter="">
1651 The [ResourceUID] singleton.
1652 </member>
1653 <member name="TextServerManager" type="TextServerManager" setter="" getter="">
1654 The [TextServerManager] singleton.
1655 </member>
1656 <member name="ThemeDB" type="ThemeDB" setter="" getter="">
1657 The [ThemeDB] singleton.
1658 </member>
1659 <member name="Time" type="Time" setter="" getter="">
1660 The [Time] singleton.
1661 </member>
1662 <member name="TranslationServer" type="TranslationServer" setter="" getter="">
1663 The [TranslationServer] singleton.
1664 </member>
1665 <member name="WorkerThreadPool" type="WorkerThreadPool" setter="" getter="">
1666 The [WorkerThreadPool] singleton.
1667 </member>
1668 <member name="XRServer" type="XRServer" setter="" getter="">
1669 The [XRServer] singleton.
1670 </member>
1671 </members>
1672 <constants>
1673 <constant name="SIDE_LEFT" value="0" enum="Side">
1674 Left side, usually used for [Control] or [StyleBox]-derived classes.
1675 </constant>
1676 <constant name="SIDE_TOP" value="1" enum="Side">
1677 Top side, usually used for [Control] or [StyleBox]-derived classes.
1678 </constant>
1679 <constant name="SIDE_RIGHT" value="2" enum="Side">
1680 Right side, usually used for [Control] or [StyleBox]-derived classes.
1681 </constant>
1682 <constant name="SIDE_BOTTOM" value="3" enum="Side">
1683 Bottom side, usually used for [Control] or [StyleBox]-derived classes.
1684 </constant>
1685 <constant name="CORNER_TOP_LEFT" value="0" enum="Corner">
1686 Top-left corner.
1687 </constant>
1688 <constant name="CORNER_TOP_RIGHT" value="1" enum="Corner">
1689 Top-right corner.
1690 </constant>
1691 <constant name="CORNER_BOTTOM_RIGHT" value="2" enum="Corner">
1692 Bottom-right corner.
1693 </constant>
1694 <constant name="CORNER_BOTTOM_LEFT" value="3" enum="Corner">
1695 Bottom-left corner.
1696 </constant>
1697 <constant name="VERTICAL" value="1" enum="Orientation">
1698 General vertical alignment, usually used for [Separator], [ScrollBar], [Slider], etc.
1699 </constant>
1700 <constant name="HORIZONTAL" value="0" enum="Orientation">
1701 General horizontal alignment, usually used for [Separator], [ScrollBar], [Slider], etc.
1702 </constant>
1703 <constant name="CLOCKWISE" value="0" enum="ClockDirection">
1704 Clockwise rotation. Used by some methods (e.g. [method Image.rotate_90]).
1705 </constant>
1706 <constant name="COUNTERCLOCKWISE" value="1" enum="ClockDirection">
1707 Counter-clockwise rotation. Used by some methods (e.g. [method Image.rotate_90]).
1708 </constant>
1709 <constant name="HORIZONTAL_ALIGNMENT_LEFT" value="0" enum="HorizontalAlignment">
1710 Horizontal left alignment, usually for text-derived classes.
1711 </constant>
1712 <constant name="HORIZONTAL_ALIGNMENT_CENTER" value="1" enum="HorizontalAlignment">
1713 Horizontal center alignment, usually for text-derived classes.
1714 </constant>
1715 <constant name="HORIZONTAL_ALIGNMENT_RIGHT" value="2" enum="HorizontalAlignment">
1716 Horizontal right alignment, usually for text-derived classes.
1717 </constant>
1718 <constant name="HORIZONTAL_ALIGNMENT_FILL" value="3" enum="HorizontalAlignment">
1719 Expand row to fit width, usually for text-derived classes.
1720 </constant>
1721 <constant name="VERTICAL_ALIGNMENT_TOP" value="0" enum="VerticalAlignment">
1722 Vertical top alignment, usually for text-derived classes.
1723 </constant>
1724 <constant name="VERTICAL_ALIGNMENT_CENTER" value="1" enum="VerticalAlignment">
1725 Vertical center alignment, usually for text-derived classes.
1726 </constant>
1727 <constant name="VERTICAL_ALIGNMENT_BOTTOM" value="2" enum="VerticalAlignment">
1728 Vertical bottom alignment, usually for text-derived classes.
1729 </constant>
1730 <constant name="VERTICAL_ALIGNMENT_FILL" value="3" enum="VerticalAlignment">
1731 Expand rows to fit height, usually for text-derived classes.
1732 </constant>
1733 <constant name="INLINE_ALIGNMENT_TOP_TO" value="0" enum="InlineAlignment">
1734 Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
1735 </constant>
1736 <constant name="INLINE_ALIGNMENT_CENTER_TO" value="1" enum="InlineAlignment">
1737 Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
1738 </constant>
1739 <constant name="INLINE_ALIGNMENT_BASELINE_TO" value="3" enum="InlineAlignment">
1740 Aligns the baseline (user defined) of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
1741 </constant>
1742 <constant name="INLINE_ALIGNMENT_BOTTOM_TO" value="2" enum="InlineAlignment">
1743 Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
1744 </constant>
1745 <constant name="INLINE_ALIGNMENT_TO_TOP" value="0" enum="InlineAlignment">
1746 Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the top of the text.
1747 </constant>
1748 <constant name="INLINE_ALIGNMENT_TO_CENTER" value="4" enum="InlineAlignment">
1749 Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the center of the text.
1750 </constant>
1751 <constant name="INLINE_ALIGNMENT_TO_BASELINE" value="8" enum="InlineAlignment">
1752 Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the baseline of the text.
1753 </constant>
1754 <constant name="INLINE_ALIGNMENT_TO_BOTTOM" value="12" enum="InlineAlignment">
1755 Aligns inline object (e.g. image, table) to the bottom of the text.
1756 </constant>
1757 <constant name="INLINE_ALIGNMENT_TOP" value="0" enum="InlineAlignment">
1758 Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to [code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code].
1759 </constant>
1760 <constant name="INLINE_ALIGNMENT_CENTER" value="5" enum="InlineAlignment">
1761 Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to [code]INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER[/code].
1762 </constant>
1763 <constant name="INLINE_ALIGNMENT_BOTTOM" value="14" enum="InlineAlignment">
1764 Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code].
1765 </constant>
1766 <constant name="INLINE_ALIGNMENT_IMAGE_MASK" value="3" enum="InlineAlignment">
1767 A bit mask for [code]INLINE_ALIGNMENT_*_TO[/code] alignment constants.
1768 </constant>
1769 <constant name="INLINE_ALIGNMENT_TEXT_MASK" value="12" enum="InlineAlignment">
1770 A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants.
1771 </constant>
1772 <constant name="EULER_ORDER_XYZ" value="0" enum="EulerOrder">
1773 Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last.
1774 </constant>
1775 <constant name="EULER_ORDER_XZY" value="1" enum="EulerOrder">
1776 Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last.
1777 </constant>
1778 <constant name="EULER_ORDER_YXZ" value="2" enum="EulerOrder">
1779 Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last.
1780 </constant>
1781 <constant name="EULER_ORDER_YZX" value="3" enum="EulerOrder">
1782 Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last.
1783 </constant>
1784 <constant name="EULER_ORDER_ZXY" value="4" enum="EulerOrder">
1785 Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last.
1786 </constant>
1787 <constant name="EULER_ORDER_ZYX" value="5" enum="EulerOrder">
1788 Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last.
1789 </constant>
1790 <constant name="KEY_NONE" value="0" enum="Key">
1791 Enum value which doesn't correspond to any key. This is used to initialize [enum Key] properties with a generic state.
1792 </constant>
1793 <constant name="KEY_SPECIAL" value="4194304" enum="Key">
1794 Keycodes with this bit applied are non-printable.
1795 </constant>
1796 <constant name="KEY_ESCAPE" value="4194305" enum="Key">
1797 Escape key.
1798 </constant>
1799 <constant name="KEY_TAB" value="4194306" enum="Key">
1800 Tab key.
1801 </constant>
1802 <constant name="KEY_BACKTAB" value="4194307" enum="Key">
1803 Shift + Tab key.
1804 </constant>
1805 <constant name="KEY_BACKSPACE" value="4194308" enum="Key">
1806 Backspace key.
1807 </constant>
1808 <constant name="KEY_ENTER" value="4194309" enum="Key">
1809 Return key (on the main keyboard).
1810 </constant>
1811 <constant name="KEY_KP_ENTER" value="4194310" enum="Key">
1812 Enter key on the numeric keypad.
1813 </constant>
1814 <constant name="KEY_INSERT" value="4194311" enum="Key">
1815 Insert key.
1816 </constant>
1817 <constant name="KEY_DELETE" value="4194312" enum="Key">
1818 Delete key.
1819 </constant>
1820 <constant name="KEY_PAUSE" value="4194313" enum="Key">
1821 Pause key.
1822 </constant>
1823 <constant name="KEY_PRINT" value="4194314" enum="Key">
1824 Print Screen key.
1825 </constant>
1826 <constant name="KEY_SYSREQ" value="4194315" enum="Key">
1827 System Request key.
1828 </constant>
1829 <constant name="KEY_CLEAR" value="4194316" enum="Key">
1830 Clear key.
1831 </constant>
1832 <constant name="KEY_HOME" value="4194317" enum="Key">
1833 Home key.
1834 </constant>
1835 <constant name="KEY_END" value="4194318" enum="Key">
1836 End key.
1837 </constant>
1838 <constant name="KEY_LEFT" value="4194319" enum="Key">
1839 Left arrow key.
1840 </constant>
1841 <constant name="KEY_UP" value="4194320" enum="Key">
1842 Up arrow key.
1843 </constant>
1844 <constant name="KEY_RIGHT" value="4194321" enum="Key">
1845 Right arrow key.
1846 </constant>
1847 <constant name="KEY_DOWN" value="4194322" enum="Key">
1848 Down arrow key.
1849 </constant>
1850 <constant name="KEY_PAGEUP" value="4194323" enum="Key">
1851 Page Up key.
1852 </constant>
1853 <constant name="KEY_PAGEDOWN" value="4194324" enum="Key">
1854 Page Down key.
1855 </constant>
1856 <constant name="KEY_SHIFT" value="4194325" enum="Key">
1857 Shift key.
1858 </constant>
1859 <constant name="KEY_CTRL" value="4194326" enum="Key">
1860 Control key.
1861 </constant>
1862 <constant name="KEY_META" value="4194327" enum="Key">
1863 Meta key.
1864 </constant>
1865 <constant name="KEY_ALT" value="4194328" enum="Key">
1866 Alt key.
1867 </constant>
1868 <constant name="KEY_CAPSLOCK" value="4194329" enum="Key">
1869 Caps Lock key.
1870 </constant>
1871 <constant name="KEY_NUMLOCK" value="4194330" enum="Key">
1872 Num Lock key.
1873 </constant>
1874 <constant name="KEY_SCROLLLOCK" value="4194331" enum="Key">
1875 Scroll Lock key.
1876 </constant>
1877 <constant name="KEY_F1" value="4194332" enum="Key">
1878 F1 key.
1879 </constant>
1880 <constant name="KEY_F2" value="4194333" enum="Key">
1881 F2 key.
1882 </constant>
1883 <constant name="KEY_F3" value="4194334" enum="Key">
1884 F3 key.
1885 </constant>
1886 <constant name="KEY_F4" value="4194335" enum="Key">
1887 F4 key.
1888 </constant>
1889 <constant name="KEY_F5" value="4194336" enum="Key">
1890 F5 key.
1891 </constant>
1892 <constant name="KEY_F6" value="4194337" enum="Key">
1893 F6 key.
1894 </constant>
1895 <constant name="KEY_F7" value="4194338" enum="Key">
1896 F7 key.
1897 </constant>
1898 <constant name="KEY_F8" value="4194339" enum="Key">
1899 F8 key.
1900 </constant>
1901 <constant name="KEY_F9" value="4194340" enum="Key">
1902 F9 key.
1903 </constant>
1904 <constant name="KEY_F10" value="4194341" enum="Key">
1905 F10 key.
1906 </constant>
1907 <constant name="KEY_F11" value="4194342" enum="Key">
1908 F11 key.
1909 </constant>
1910 <constant name="KEY_F12" value="4194343" enum="Key">
1911 F12 key.
1912 </constant>
1913 <constant name="KEY_F13" value="4194344" enum="Key">
1914 F13 key.
1915 </constant>
1916 <constant name="KEY_F14" value="4194345" enum="Key">
1917 F14 key.
1918 </constant>
1919 <constant name="KEY_F15" value="4194346" enum="Key">
1920 F15 key.
1921 </constant>
1922 <constant name="KEY_F16" value="4194347" enum="Key">
1923 F16 key.
1924 </constant>
1925 <constant name="KEY_F17" value="4194348" enum="Key">
1926 F17 key.
1927 </constant>
1928 <constant name="KEY_F18" value="4194349" enum="Key">
1929 F18 key.
1930 </constant>
1931 <constant name="KEY_F19" value="4194350" enum="Key">
1932 F19 key.
1933 </constant>
1934 <constant name="KEY_F20" value="4194351" enum="Key">
1935 F20 key.
1936 </constant>
1937 <constant name="KEY_F21" value="4194352" enum="Key">
1938 F21 key.
1939 </constant>
1940 <constant name="KEY_F22" value="4194353" enum="Key">
1941 F22 key.
1942 </constant>
1943 <constant name="KEY_F23" value="4194354" enum="Key">
1944 F23 key.
1945 </constant>
1946 <constant name="KEY_F24" value="4194355" enum="Key">
1947 F24 key.
1948 </constant>
1949 <constant name="KEY_F25" value="4194356" enum="Key">
1950 F25 key. Only supported on macOS and Linux due to a Windows limitation.
1951 </constant>
1952 <constant name="KEY_F26" value="4194357" enum="Key">
1953 F26 key. Only supported on macOS and Linux due to a Windows limitation.
1954 </constant>
1955 <constant name="KEY_F27" value="4194358" enum="Key">
1956 F27 key. Only supported on macOS and Linux due to a Windows limitation.
1957 </constant>
1958 <constant name="KEY_F28" value="4194359" enum="Key">
1959 F28 key. Only supported on macOS and Linux due to a Windows limitation.
1960 </constant>
1961 <constant name="KEY_F29" value="4194360" enum="Key">
1962 F29 key. Only supported on macOS and Linux due to a Windows limitation.
1963 </constant>
1964 <constant name="KEY_F30" value="4194361" enum="Key">
1965 F30 key. Only supported on macOS and Linux due to a Windows limitation.
1966 </constant>
1967 <constant name="KEY_F31" value="4194362" enum="Key">
1968 F31 key. Only supported on macOS and Linux due to a Windows limitation.
1969 </constant>
1970 <constant name="KEY_F32" value="4194363" enum="Key">
1971 F32 key. Only supported on macOS and Linux due to a Windows limitation.
1972 </constant>
1973 <constant name="KEY_F33" value="4194364" enum="Key">
1974 F33 key. Only supported on macOS and Linux due to a Windows limitation.
1975 </constant>
1976 <constant name="KEY_F34" value="4194365" enum="Key">
1977 F34 key. Only supported on macOS and Linux due to a Windows limitation.
1978 </constant>
1979 <constant name="KEY_F35" value="4194366" enum="Key">
1980 F35 key. Only supported on macOS and Linux due to a Windows limitation.
1981 </constant>
1982 <constant name="KEY_KP_MULTIPLY" value="4194433" enum="Key">
1983 Multiply (*) key on the numeric keypad.
1984 </constant>
1985 <constant name="KEY_KP_DIVIDE" value="4194434" enum="Key">
1986 Divide (/) key on the numeric keypad.
1987 </constant>
1988 <constant name="KEY_KP_SUBTRACT" value="4194435" enum="Key">
1989 Subtract (-) key on the numeric keypad.
1990 </constant>
1991 <constant name="KEY_KP_PERIOD" value="4194436" enum="Key">
1992 Period (.) key on the numeric keypad.
1993 </constant>
1994 <constant name="KEY_KP_ADD" value="4194437" enum="Key">
1995 Add (+) key on the numeric keypad.
1996 </constant>
1997 <constant name="KEY_KP_0" value="4194438" enum="Key">
1998 Number 0 on the numeric keypad.
1999 </constant>
2000 <constant name="KEY_KP_1" value="4194439" enum="Key">
2001 Number 1 on the numeric keypad.
2002 </constant>
2003 <constant name="KEY_KP_2" value="4194440" enum="Key">
2004 Number 2 on the numeric keypad.
2005 </constant>
2006 <constant name="KEY_KP_3" value="4194441" enum="Key">
2007 Number 3 on the numeric keypad.
2008 </constant>
2009 <constant name="KEY_KP_4" value="4194442" enum="Key">
2010 Number 4 on the numeric keypad.
2011 </constant>
2012 <constant name="KEY_KP_5" value="4194443" enum="Key">
2013 Number 5 on the numeric keypad.
2014 </constant>
2015 <constant name="KEY_KP_6" value="4194444" enum="Key">
2016 Number 6 on the numeric keypad.
2017 </constant>
2018 <constant name="KEY_KP_7" value="4194445" enum="Key">
2019 Number 7 on the numeric keypad.
2020 </constant>
2021 <constant name="KEY_KP_8" value="4194446" enum="Key">
2022 Number 8 on the numeric keypad.
2023 </constant>
2024 <constant name="KEY_KP_9" value="4194447" enum="Key">
2025 Number 9 on the numeric keypad.
2026 </constant>
2027 <constant name="KEY_MENU" value="4194370" enum="Key">
2028 Context menu key.
2029 </constant>
2030 <constant name="KEY_HYPER" value="4194371" enum="Key">
2031 Hyper key. (On Linux/X11 only).
2032 </constant>
2033 <constant name="KEY_HELP" value="4194373" enum="Key">
2034 Help key.
2035 </constant>
2036 <constant name="KEY_BACK" value="4194376" enum="Key">
2037 Back key.
2038 </constant>
2039 <constant name="KEY_FORWARD" value="4194377" enum="Key">
2040 Forward key.
2041 </constant>
2042 <constant name="KEY_STOP" value="4194378" enum="Key">
2043 Media stop key.
2044 </constant>
2045 <constant name="KEY_REFRESH" value="4194379" enum="Key">
2046 Refresh key.
2047 </constant>
2048 <constant name="KEY_VOLUMEDOWN" value="4194380" enum="Key">
2049 Volume down key.
2050 </constant>
2051 <constant name="KEY_VOLUMEMUTE" value="4194381" enum="Key">
2052 Mute volume key.
2053 </constant>
2054 <constant name="KEY_VOLUMEUP" value="4194382" enum="Key">
2055 Volume up key.
2056 </constant>
2057 <constant name="KEY_MEDIAPLAY" value="4194388" enum="Key">
2058 Media play key.
2059 </constant>
2060 <constant name="KEY_MEDIASTOP" value="4194389" enum="Key">
2061 Media stop key.
2062 </constant>
2063 <constant name="KEY_MEDIAPREVIOUS" value="4194390" enum="Key">
2064 Previous song key.
2065 </constant>
2066 <constant name="KEY_MEDIANEXT" value="4194391" enum="Key">
2067 Next song key.
2068 </constant>
2069 <constant name="KEY_MEDIARECORD" value="4194392" enum="Key">
2070 Media record key.
2071 </constant>
2072 <constant name="KEY_HOMEPAGE" value="4194393" enum="Key">
2073 Home page key.
2074 </constant>
2075 <constant name="KEY_FAVORITES" value="4194394" enum="Key">
2076 Favorites key.
2077 </constant>
2078 <constant name="KEY_SEARCH" value="4194395" enum="Key">
2079 Search key.
2080 </constant>
2081 <constant name="KEY_STANDBY" value="4194396" enum="Key">
2082 Standby key.
2083 </constant>
2084 <constant name="KEY_OPENURL" value="4194397" enum="Key">
2085 Open URL / Launch Browser key.
2086 </constant>
2087 <constant name="KEY_LAUNCHMAIL" value="4194398" enum="Key">
2088 Launch Mail key.
2089 </constant>
2090 <constant name="KEY_LAUNCHMEDIA" value="4194399" enum="Key">
2091 Launch Media key.
2092 </constant>
2093 <constant name="KEY_LAUNCH0" value="4194400" enum="Key">
2094 Launch Shortcut 0 key.
2095 </constant>
2096 <constant name="KEY_LAUNCH1" value="4194401" enum="Key">
2097 Launch Shortcut 1 key.
2098 </constant>
2099 <constant name="KEY_LAUNCH2" value="4194402" enum="Key">
2100 Launch Shortcut 2 key.
2101 </constant>
2102 <constant name="KEY_LAUNCH3" value="4194403" enum="Key">
2103 Launch Shortcut 3 key.
2104 </constant>
2105 <constant name="KEY_LAUNCH4" value="4194404" enum="Key">
2106 Launch Shortcut 4 key.
2107 </constant>
2108 <constant name="KEY_LAUNCH5" value="4194405" enum="Key">
2109 Launch Shortcut 5 key.
2110 </constant>
2111 <constant name="KEY_LAUNCH6" value="4194406" enum="Key">
2112 Launch Shortcut 6 key.
2113 </constant>
2114 <constant name="KEY_LAUNCH7" value="4194407" enum="Key">
2115 Launch Shortcut 7 key.
2116 </constant>
2117 <constant name="KEY_LAUNCH8" value="4194408" enum="Key">
2118 Launch Shortcut 8 key.
2119 </constant>
2120 <constant name="KEY_LAUNCH9" value="4194409" enum="Key">
2121 Launch Shortcut 9 key.
2122 </constant>
2123 <constant name="KEY_LAUNCHA" value="4194410" enum="Key">
2124 Launch Shortcut A key.
2125 </constant>
2126 <constant name="KEY_LAUNCHB" value="4194411" enum="Key">
2127 Launch Shortcut B key.
2128 </constant>
2129 <constant name="KEY_LAUNCHC" value="4194412" enum="Key">
2130 Launch Shortcut C key.
2131 </constant>
2132 <constant name="KEY_LAUNCHD" value="4194413" enum="Key">
2133 Launch Shortcut D key.
2134 </constant>
2135 <constant name="KEY_LAUNCHE" value="4194414" enum="Key">
2136 Launch Shortcut E key.
2137 </constant>
2138 <constant name="KEY_LAUNCHF" value="4194415" enum="Key">
2139 Launch Shortcut F key.
2140 </constant>
2141 <constant name="KEY_GLOBE" value="4194416" enum="Key">
2142 "Globe" key on Mac / iPad keyboard.
2143 </constant>
2144 <constant name="KEY_KEYBOARD" value="4194417" enum="Key">
2145 "On-screen keyboard" key on iPad keyboard.
2146 </constant>
2147 <constant name="KEY_JIS_EISU" value="4194418" enum="Key">
2148 英数 key on Mac keyboard.
2149 </constant>
2150 <constant name="KEY_JIS_KANA" value="4194419" enum="Key">
2151 かな key on Mac keyboard.
2152 </constant>
2153 <constant name="KEY_UNKNOWN" value="8388607" enum="Key">
2154 Unknown key.
2155 </constant>
2156 <constant name="KEY_SPACE" value="32" enum="Key">
2157 Space key.
2158 </constant>
2159 <constant name="KEY_EXCLAM" value="33" enum="Key">
2160 Exclamation mark ([code]![/code]) key.
2161 </constant>
2162 <constant name="KEY_QUOTEDBL" value="34" enum="Key">
2163 Double quotation mark ([code]"[/code]) key.
2164 </constant>
2165 <constant name="KEY_NUMBERSIGN" value="35" enum="Key" keywords="pound, hash">
2166 Number sign or [i]hash[/i] ([code]#[/code]) key.
2167 </constant>
2168 <constant name="KEY_DOLLAR" value="36" enum="Key">
2169 Dollar sign ([code]$[/code]) key.
2170 </constant>
2171 <constant name="KEY_PERCENT" value="37" enum="Key">
2172 Percent sign ([code]%[/code]) key.
2173 </constant>
2174 <constant name="KEY_AMPERSAND" value="38" enum="Key">
2175 Ampersand ([code]&amp;[/code]) key.
2176 </constant>
2177 <constant name="KEY_APOSTROPHE" value="39" enum="Key">
2178 Apostrophe ([code]'[/code]) key.
2179 </constant>
2180 <constant name="KEY_PARENLEFT" value="40" enum="Key" keywords="open round bracket">
2181 Left parenthesis ([code]([/code]) key.
2182 </constant>
2183 <constant name="KEY_PARENRIGHT" value="41" enum="Key" keywords="close round bracket">
2184 Right parenthesis ([code])[/code]) key.
2185 </constant>
2186 <constant name="KEY_ASTERISK" value="42" enum="Key">
2187 Asterisk ([code]*[/code]) key.
2188 </constant>
2189 <constant name="KEY_PLUS" value="43" enum="Key">
2190 Plus ([code]+[/code]) key.
2191 </constant>
2192 <constant name="KEY_COMMA" value="44" enum="Key">
2193 Comma ([code],[/code]) key.
2194 </constant>
2195 <constant name="KEY_MINUS" value="45" enum="Key" keywords="hyphen">
2196 Minus ([code]-[/code]) key.
2197 </constant>
2198 <constant name="KEY_PERIOD" value="46" enum="Key" keywords="dot">
2199 Period ([code].[/code]) key.
2200 </constant>
2201 <constant name="KEY_SLASH" value="47" enum="Key">
2202 Slash ([code]/[/code]) key.
2203 </constant>
2204 <constant name="KEY_0" value="48" enum="Key">
2205 Number 0 key.
2206 </constant>
2207 <constant name="KEY_1" value="49" enum="Key">
2208 Number 1 key.
2209 </constant>
2210 <constant name="KEY_2" value="50" enum="Key">
2211 Number 2 key.
2212 </constant>
2213 <constant name="KEY_3" value="51" enum="Key">
2214 Number 3 key.
2215 </constant>
2216 <constant name="KEY_4" value="52" enum="Key">
2217 Number 4 key.
2218 </constant>
2219 <constant name="KEY_5" value="53" enum="Key">
2220 Number 5 key.
2221 </constant>
2222 <constant name="KEY_6" value="54" enum="Key">
2223 Number 6 key.
2224 </constant>
2225 <constant name="KEY_7" value="55" enum="Key">
2226 Number 7 key.
2227 </constant>
2228 <constant name="KEY_8" value="56" enum="Key">
2229 Number 8 key.
2230 </constant>
2231 <constant name="KEY_9" value="57" enum="Key">
2232 Number 9 key.
2233 </constant>
2234 <constant name="KEY_COLON" value="58" enum="Key">
2235 Colon ([code]:[/code]) key.
2236 </constant>
2237 <constant name="KEY_SEMICOLON" value="59" enum="Key">
2238 Semicolon ([code];[/code]) key.
2239 </constant>
2240 <constant name="KEY_LESS" value="60" enum="Key">
2241 Less-than sign ([code]&lt;[/code]) key.
2242 </constant>
2243 <constant name="KEY_EQUAL" value="61" enum="Key">
2244 Equal sign ([code]=[/code]) key.
2245 </constant>
2246 <constant name="KEY_GREATER" value="62" enum="Key">
2247 Greater-than sign ([code]&gt;[/code]) key.
2248 </constant>
2249 <constant name="KEY_QUESTION" value="63" enum="Key">
2250 Question mark ([code]?[/code]) key.
2251 </constant>
2252 <constant name="KEY_AT" value="64" enum="Key" keywords="commercial at">
2253 At sign ([code]@[/code]) key.
2254 </constant>
2255 <constant name="KEY_A" value="65" enum="Key">
2256 A key.
2257 </constant>
2258 <constant name="KEY_B" value="66" enum="Key">
2259 B key.
2260 </constant>
2261 <constant name="KEY_C" value="67" enum="Key">
2262 C key.
2263 </constant>
2264 <constant name="KEY_D" value="68" enum="Key">
2265 D key.
2266 </constant>
2267 <constant name="KEY_E" value="69" enum="Key">
2268 E key.
2269 </constant>
2270 <constant name="KEY_F" value="70" enum="Key">
2271 F key.
2272 </constant>
2273 <constant name="KEY_G" value="71" enum="Key">
2274 G key.
2275 </constant>
2276 <constant name="KEY_H" value="72" enum="Key">
2277 H key.
2278 </constant>
2279 <constant name="KEY_I" value="73" enum="Key">
2280 I key.
2281 </constant>
2282 <constant name="KEY_J" value="74" enum="Key">
2283 J key.
2284 </constant>
2285 <constant name="KEY_K" value="75" enum="Key">
2286 K key.
2287 </constant>
2288 <constant name="KEY_L" value="76" enum="Key">
2289 L key.
2290 </constant>
2291 <constant name="KEY_M" value="77" enum="Key">
2292 M key.
2293 </constant>
2294 <constant name="KEY_N" value="78" enum="Key">
2295 N key.
2296 </constant>
2297 <constant name="KEY_O" value="79" enum="Key">
2298 O key.
2299 </constant>
2300 <constant name="KEY_P" value="80" enum="Key">
2301 P key.
2302 </constant>
2303 <constant name="KEY_Q" value="81" enum="Key">
2304 Q key.
2305 </constant>
2306 <constant name="KEY_R" value="82" enum="Key">
2307 R key.
2308 </constant>
2309 <constant name="KEY_S" value="83" enum="Key">
2310 S key.
2311 </constant>
2312 <constant name="KEY_T" value="84" enum="Key">
2313 T key.
2314 </constant>
2315 <constant name="KEY_U" value="85" enum="Key">
2316 U key.
2317 </constant>
2318 <constant name="KEY_V" value="86" enum="Key">
2319 V key.
2320 </constant>
2321 <constant name="KEY_W" value="87" enum="Key">
2322 W key.
2323 </constant>
2324 <constant name="KEY_X" value="88" enum="Key">
2325 X key.
2326 </constant>
2327 <constant name="KEY_Y" value="89" enum="Key">
2328 Y key.
2329 </constant>
2330 <constant name="KEY_Z" value="90" enum="Key">
2331 Z key.
2332 </constant>
2333 <constant name="KEY_BRACKETLEFT" value="91" enum="Key" keywords="open square bracket">
2334 Left bracket ([code][lb][/code]) key.
2335 </constant>
2336 <constant name="KEY_BACKSLASH" value="92" enum="Key">
2337 Backslash ([code]\[/code]) key.
2338 </constant>
2339 <constant name="KEY_BRACKETRIGHT" value="93" enum="Key" keywords="close square bracket">
2340 Right bracket ([code][rb][/code]) key.
2341 </constant>
2342 <constant name="KEY_ASCIICIRCUM" value="94" enum="Key" keywords="caret">
2343 Caret ([code]^[/code]) key.
2344 </constant>
2345 <constant name="KEY_UNDERSCORE" value="95" enum="Key" keywords="underline">
2346 Underscore ([code]_[/code]) key.
2347 </constant>
2348 <constant name="KEY_QUOTELEFT" value="96" enum="Key" keywords="backtick, backquote">
2349 Backtick ([code]`[/code]) key.
2350 </constant>
2351 <constant name="KEY_BRACELEFT" value="123" enum="Key" keywords="open curly bracket">
2352 Left brace ([code]{[/code]) key.
2353 </constant>
2354 <constant name="KEY_BAR" value="124" enum="Key" keywords="pipe">
2355 Vertical bar or [i]pipe[/i] ([code]|[/code]) key.
2356 </constant>
2357 <constant name="KEY_BRACERIGHT" value="125" enum="Key" keywords="close curly bracket">
2358 Right brace ([code]}[/code]) key.
2359 </constant>
2360 <constant name="KEY_ASCIITILDE" value="126" enum="Key">
2361 Tilde ([code]~[/code]) key.
2362 </constant>
2363 <constant name="KEY_YEN" value="165" enum="Key">
2364 Yen symbol ([code]¥[/code]) key.
2365 </constant>
2366 <constant name="KEY_SECTION" value="167" enum="Key" keywords="silcrow">
2367 Section sign ([code]§[/code]) key.
2368 </constant>
2369 <constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask" is_bitfield="true">
2370 Key Code mask.
2371 </constant>
2372 <constant name="KEY_MODIFIER_MASK" value="2130706432" enum="KeyModifierMask" is_bitfield="true">
2373 Modifier key mask.
2374 </constant>
2375 <constant name="KEY_MASK_CMD_OR_CTRL" value="16777216" enum="KeyModifierMask" is_bitfield="true">
2376 Automatically remapped to [constant KEY_META] on macOS and [constant KEY_CTRL] on other platforms, this mask is never set in the actual events, and should be used for key mapping only.
2377 </constant>
2378 <constant name="KEY_MASK_SHIFT" value="33554432" enum="KeyModifierMask" is_bitfield="true">
2379 Shift key mask.
2380 </constant>
2381 <constant name="KEY_MASK_ALT" value="67108864" enum="KeyModifierMask" is_bitfield="true">
2382 Alt or Option (on macOS) key mask.
2383 </constant>
2384 <constant name="KEY_MASK_META" value="134217728" enum="KeyModifierMask" is_bitfield="true">
2385 Command (on macOS) or Meta/Windows key mask.
2386 </constant>
2387 <constant name="KEY_MASK_CTRL" value="268435456" enum="KeyModifierMask" is_bitfield="true">
2388 Control key mask.
2389 </constant>
2390 <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask" is_bitfield="true">
2391 Keypad key mask.
2392 </constant>
2393 <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask" is_bitfield="true">
2394 Group Switch key mask.
2395 </constant>
2396 <constant name="KEY_LOCATION_UNSPECIFIED" value="0" enum="KeyLocation">
2397 Used for keys which only appear once, or when a comparison doesn't need to differentiate the [code]LEFT[/code] and [code]RIGHT[/code] versions.
2398 For example, when using [method InputEvent.is_match], an event which has [constant KEY_LOCATION_UNSPECIFIED] will match any [enum KeyLocation] on the passed event.
2399 </constant>
2400 <constant name="KEY_LOCATION_LEFT" value="1" enum="KeyLocation">
2401 A key which is to the left of its twin.
2402 </constant>
2403 <constant name="KEY_LOCATION_RIGHT" value="2" enum="KeyLocation">
2404 A key which is to the right of its twin.
2405 </constant>
2406 <constant name="MOUSE_BUTTON_NONE" value="0" enum="MouseButton">
2407 Enum value which doesn't correspond to any mouse button. This is used to initialize [enum MouseButton] properties with a generic state.
2408 </constant>
2409 <constant name="MOUSE_BUTTON_LEFT" value="1" enum="MouseButton">
2410 Primary mouse button, usually assigned to the left button.
2411 </constant>
2412 <constant name="MOUSE_BUTTON_RIGHT" value="2" enum="MouseButton">
2413 Secondary mouse button, usually assigned to the right button.
2414 </constant>
2415 <constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="MouseButton">
2416 Middle mouse button.
2417 </constant>
2418 <constant name="MOUSE_BUTTON_WHEEL_UP" value="4" enum="MouseButton">
2419 Mouse wheel scrolling up.
2420 </constant>
2421 <constant name="MOUSE_BUTTON_WHEEL_DOWN" value="5" enum="MouseButton">
2422 Mouse wheel scrolling down.
2423 </constant>
2424 <constant name="MOUSE_BUTTON_WHEEL_LEFT" value="6" enum="MouseButton">
2425 Mouse wheel left button (only present on some mice).
2426 </constant>
2427 <constant name="MOUSE_BUTTON_WHEEL_RIGHT" value="7" enum="MouseButton">
2428 Mouse wheel right button (only present on some mice).
2429 </constant>
2430 <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton">
2431 Extra mouse button 1. This is sometimes present, usually to the sides of the mouse.
2432 </constant>
2433 <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton">
2434 Extra mouse button 2. This is sometimes present, usually to the sides of the mouse.
2435 </constant>
2436 <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButtonMask" is_bitfield="true">
2437 Primary mouse button mask, usually for the left button.
2438 </constant>
2439 <constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="MouseButtonMask" is_bitfield="true">
2440 Secondary mouse button mask, usually for the right button.
2441 </constant>
2442 <constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="MouseButtonMask" is_bitfield="true">
2443 Middle mouse button mask.
2444 </constant>
2445 <constant name="MOUSE_BUTTON_MASK_MB_XBUTTON1" value="128" enum="MouseButtonMask" is_bitfield="true">
2446 Extra mouse button 1 mask.
2447 </constant>
2448 <constant name="MOUSE_BUTTON_MASK_MB_XBUTTON2" value="256" enum="MouseButtonMask" is_bitfield="true">
2449 Extra mouse button 2 mask.
2450 </constant>
2451 <constant name="JOY_BUTTON_INVALID" value="-1" enum="JoyButton">
2452 An invalid game controller button.
2453 </constant>
2454 <constant name="JOY_BUTTON_A" value="0" enum="JoyButton">
2455 Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B.
2456 </constant>
2457 <constant name="JOY_BUTTON_B" value="1" enum="JoyButton">
2458 Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A.
2459 </constant>
2460 <constant name="JOY_BUTTON_X" value="2" enum="JoyButton">
2461 Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y.
2462 </constant>
2463 <constant name="JOY_BUTTON_Y" value="3" enum="JoyButton">
2464 Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X.
2465 </constant>
2466 <constant name="JOY_BUTTON_BACK" value="4" enum="JoyButton">
2467 Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button.
2468 </constant>
2469 <constant name="JOY_BUTTON_GUIDE" value="5" enum="JoyButton">
2470 Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button.
2471 </constant>
2472 <constant name="JOY_BUTTON_START" value="6" enum="JoyButton">
2473 Game controller SDL start button. Corresponds to the Sony Options, Xbox Menu, Nintendo + button.
2474 </constant>
2475 <constant name="JOY_BUTTON_LEFT_STICK" value="7" enum="JoyButton">
2476 Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button.
2477 </constant>
2478 <constant name="JOY_BUTTON_RIGHT_STICK" value="8" enum="JoyButton">
2479 Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button.
2480 </constant>
2481 <constant name="JOY_BUTTON_LEFT_SHOULDER" value="9" enum="JoyButton">
2482 Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button.
2483 </constant>
2484 <constant name="JOY_BUTTON_RIGHT_SHOULDER" value="10" enum="JoyButton">
2485 Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button.
2486 </constant>
2487 <constant name="JOY_BUTTON_DPAD_UP" value="11" enum="JoyButton">
2488 Game controller D-pad up button.
2489 </constant>
2490 <constant name="JOY_BUTTON_DPAD_DOWN" value="12" enum="JoyButton">
2491 Game controller D-pad down button.
2492 </constant>
2493 <constant name="JOY_BUTTON_DPAD_LEFT" value="13" enum="JoyButton">
2494 Game controller D-pad left button.
2495 </constant>
2496 <constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButton">
2497 Game controller D-pad right button.
2498 </constant>
2499 <constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButton">
2500 Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo Switch capture button.
2501 </constant>
2502 <constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButton">
2503 Game controller SDL paddle 1 button.
2504 </constant>
2505 <constant name="JOY_BUTTON_PADDLE2" value="17" enum="JoyButton">
2506 Game controller SDL paddle 2 button.
2507 </constant>
2508 <constant name="JOY_BUTTON_PADDLE3" value="18" enum="JoyButton">
2509 Game controller SDL paddle 3 button.
2510 </constant>
2511 <constant name="JOY_BUTTON_PADDLE4" value="19" enum="JoyButton">
2512 Game controller SDL paddle 4 button.
2513 </constant>
2514 <constant name="JOY_BUTTON_TOUCHPAD" value="20" enum="JoyButton">
2515 Game controller SDL touchpad button.
2516 </constant>
2517 <constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButton">
2518 The number of SDL game controller buttons.
2519 </constant>
2520 <constant name="JOY_BUTTON_MAX" value="128" enum="JoyButton">
2521 The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:
2522 - [b]Android:[/b] Up to 36 buttons.
2523 - [b]Linux:[/b] Up to 80 buttons.
2524 - [b]Windows[/b] and [b]macOS:[/b] Up to 128 buttons.
2525 </constant>
2526 <constant name="JOY_AXIS_INVALID" value="-1" enum="JoyAxis">
2527 An invalid game controller axis.
2528 </constant>
2529 <constant name="JOY_AXIS_LEFT_X" value="0" enum="JoyAxis">
2530 Game controller left joystick x-axis.
2531 </constant>
2532 <constant name="JOY_AXIS_LEFT_Y" value="1" enum="JoyAxis">
2533 Game controller left joystick y-axis.
2534 </constant>
2535 <constant name="JOY_AXIS_RIGHT_X" value="2" enum="JoyAxis">
2536 Game controller right joystick x-axis.
2537 </constant>
2538 <constant name="JOY_AXIS_RIGHT_Y" value="3" enum="JoyAxis">
2539 Game controller right joystick y-axis.
2540 </constant>
2541 <constant name="JOY_AXIS_TRIGGER_LEFT" value="4" enum="JoyAxis">
2542 Game controller left trigger axis.
2543 </constant>
2544 <constant name="JOY_AXIS_TRIGGER_RIGHT" value="5" enum="JoyAxis">
2545 Game controller right trigger axis.
2546 </constant>
2547 <constant name="JOY_AXIS_SDL_MAX" value="6" enum="JoyAxis">
2548 The number of SDL game controller axes.
2549 </constant>
2550 <constant name="JOY_AXIS_MAX" value="10" enum="JoyAxis">
2551 The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.
2552 </constant>
2553 <constant name="MIDI_MESSAGE_NONE" value="0" enum="MIDIMessage">
2554 Does not correspond to any MIDI message. This is the default value of [member InputEventMIDI.message].
2555 </constant>
2556 <constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage">
2557 MIDI message sent when a note is released.
2558 [b]Note:[/b] Not all MIDI devices send this message; some may send [constant MIDI_MESSAGE_NOTE_ON] with [member InputEventMIDI.velocity] set to [code]0[/code].
2559 </constant>
2560 <constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage">
2561 MIDI message sent when a note is pressed.
2562 </constant>
2563 <constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MIDIMessage">
2564 MIDI message sent to indicate a change in pressure while a note is being pressed down, also called aftertouch.
2565 </constant>
2566 <constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MIDIMessage">
2567 MIDI message sent when a controller value changes. In a MIDI device, a controller is any input that doesn't play notes. These may include sliders for volume, balance, and panning, as well as switches and pedals. See the [url=https://en.wikipedia.org/wiki/General_MIDI#Controller_events]General MIDI specification[/url] for a small list.
2568 </constant>
2569 <constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MIDIMessage">
2570 MIDI message sent when the MIDI device changes its current instrument (also called [i]program[/i] or [i]preset[/i]).
2571 </constant>
2572 <constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MIDIMessage">
2573 MIDI message sent to indicate a change in pressure for the whole channel. Some MIDI devices may send this instead of [constant MIDI_MESSAGE_AFTERTOUCH].
2574 </constant>
2575 <constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MIDIMessage">
2576 MIDI message sent when the value of the pitch bender changes, usually a wheel on the MIDI device.
2577 </constant>
2578 <constant name="MIDI_MESSAGE_SYSTEM_EXCLUSIVE" value="240" enum="MIDIMessage">
2579 MIDI system exclusive (SysEx) message. This type of message is not standardized and it's highly dependent on the MIDI device sending it.
2580 [b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
2581 </constant>
2582 <constant name="MIDI_MESSAGE_QUARTER_FRAME" value="241" enum="MIDIMessage">
2583 MIDI message sent every quarter frame to keep connected MIDI devices synchronized. Related to [constant MIDI_MESSAGE_TIMING_CLOCK].
2584 [b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
2585 </constant>
2586 <constant name="MIDI_MESSAGE_SONG_POSITION_POINTER" value="242" enum="MIDIMessage">
2587 MIDI message sent to jump onto a new position in the current sequence or song.
2588 [b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
2589 </constant>
2590 <constant name="MIDI_MESSAGE_SONG_SELECT" value="243" enum="MIDIMessage">
2591 MIDI message sent to select a sequence or song to play.
2592 [b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
2593 </constant>
2594 <constant name="MIDI_MESSAGE_TUNE_REQUEST" value="246" enum="MIDIMessage">
2595 MIDI message sent to request a tuning calibration. Used on analog synthesizers. Most modern MIDI devices do not need this message.
2596 </constant>
2597 <constant name="MIDI_MESSAGE_TIMING_CLOCK" value="248" enum="MIDIMessage">
2598 MIDI message sent 24 times after [constant MIDI_MESSAGE_QUARTER_FRAME], to keep connected MIDI devices synchronized.
2599 </constant>
2600 <constant name="MIDI_MESSAGE_START" value="250" enum="MIDIMessage">
2601 MIDI message sent to start the current sequence or song from the beginning.
2602 </constant>
2603 <constant name="MIDI_MESSAGE_CONTINUE" value="251" enum="MIDIMessage">
2604 MIDI message sent to resume from the point the current sequence or song was paused.
2605 </constant>
2606 <constant name="MIDI_MESSAGE_STOP" value="252" enum="MIDIMessage">
2607 MIDI message sent to pause the current sequence or song.
2608 </constant>
2609 <constant name="MIDI_MESSAGE_ACTIVE_SENSING" value="254" enum="MIDIMessage">
2610 MIDI message sent repeatedly while the MIDI device is idle, to tell the receiver that the connection is alive. Most MIDI devices do not send this message.
2611 </constant>
2612 <constant name="MIDI_MESSAGE_SYSTEM_RESET" value="255" enum="MIDIMessage">
2613 MIDI message sent to reset a MIDI device to its default state, as if it was just turned on. It should not be sent when the MIDI device is being turned on.
2614 </constant>
2615 <constant name="OK" value="0" enum="Error">
2616 Methods that return [enum Error] return [constant OK] when no error occurred.
2617 Since [constant OK] has value [code]0[/code], and all other error constants are positive integers, it can also be used in boolean checks.
2618 [codeblock]
2619 var error = method_that_returns_error()
2620 if error != OK:
2621 printerr("Failure!")
2622
2623 # Or, alternatively:
2624 if error:
2625 printerr("Still failing!")
2626 [/codeblock]
2627 [b]Note:[/b] Many functions do not return an error code, but will print error messages to standard output.
2628 </constant>
2629 <constant name="FAILED" value="1" enum="Error">
2630 Generic error.
2631 </constant>
2632 <constant name="ERR_UNAVAILABLE" value="2" enum="Error">
2633 Unavailable error.
2634 </constant>
2635 <constant name="ERR_UNCONFIGURED" value="3" enum="Error">
2636 Unconfigured error.
2637 </constant>
2638 <constant name="ERR_UNAUTHORIZED" value="4" enum="Error">
2639 Unauthorized error.
2640 </constant>
2641 <constant name="ERR_PARAMETER_RANGE_ERROR" value="5" enum="Error">
2642 Parameter range error.
2643 </constant>
2644 <constant name="ERR_OUT_OF_MEMORY" value="6" enum="Error">
2645 Out of memory (OOM) error.
2646 </constant>
2647 <constant name="ERR_FILE_NOT_FOUND" value="7" enum="Error">
2648 File: Not found error.
2649 </constant>
2650 <constant name="ERR_FILE_BAD_DRIVE" value="8" enum="Error">
2651 File: Bad drive error.
2652 </constant>
2653 <constant name="ERR_FILE_BAD_PATH" value="9" enum="Error">
2654 File: Bad path error.
2655 </constant>
2656 <constant name="ERR_FILE_NO_PERMISSION" value="10" enum="Error">
2657 File: No permission error.
2658 </constant>
2659 <constant name="ERR_FILE_ALREADY_IN_USE" value="11" enum="Error">
2660 File: Already in use error.
2661 </constant>
2662 <constant name="ERR_FILE_CANT_OPEN" value="12" enum="Error">
2663 File: Can't open error.
2664 </constant>
2665 <constant name="ERR_FILE_CANT_WRITE" value="13" enum="Error">
2666 File: Can't write error.
2667 </constant>
2668 <constant name="ERR_FILE_CANT_READ" value="14" enum="Error">
2669 File: Can't read error.
2670 </constant>
2671 <constant name="ERR_FILE_UNRECOGNIZED" value="15" enum="Error">
2672 File: Unrecognized error.
2673 </constant>
2674 <constant name="ERR_FILE_CORRUPT" value="16" enum="Error">
2675 File: Corrupt error.
2676 </constant>
2677 <constant name="ERR_FILE_MISSING_DEPENDENCIES" value="17" enum="Error">
2678 File: Missing dependencies error.
2679 </constant>
2680 <constant name="ERR_FILE_EOF" value="18" enum="Error">
2681 File: End of file (EOF) error.
2682 </constant>
2683 <constant name="ERR_CANT_OPEN" value="19" enum="Error">
2684 Can't open error.
2685 </constant>
2686 <constant name="ERR_CANT_CREATE" value="20" enum="Error">
2687 Can't create error.
2688 </constant>
2689 <constant name="ERR_QUERY_FAILED" value="21" enum="Error">
2690 Query failed error.
2691 </constant>
2692 <constant name="ERR_ALREADY_IN_USE" value="22" enum="Error">
2693 Already in use error.
2694 </constant>
2695 <constant name="ERR_LOCKED" value="23" enum="Error">
2696 Locked error.
2697 </constant>
2698 <constant name="ERR_TIMEOUT" value="24" enum="Error">
2699 Timeout error.
2700 </constant>
2701 <constant name="ERR_CANT_CONNECT" value="25" enum="Error">
2702 Can't connect error.
2703 </constant>
2704 <constant name="ERR_CANT_RESOLVE" value="26" enum="Error">
2705 Can't resolve error.
2706 </constant>
2707 <constant name="ERR_CONNECTION_ERROR" value="27" enum="Error">
2708 Connection error.
2709 </constant>
2710 <constant name="ERR_CANT_ACQUIRE_RESOURCE" value="28" enum="Error">
2711 Can't acquire resource error.
2712 </constant>
2713 <constant name="ERR_CANT_FORK" value="29" enum="Error">
2714 Can't fork process error.
2715 </constant>
2716 <constant name="ERR_INVALID_DATA" value="30" enum="Error">
2717 Invalid data error.
2718 </constant>
2719 <constant name="ERR_INVALID_PARAMETER" value="31" enum="Error">
2720 Invalid parameter error.
2721 </constant>
2722 <constant name="ERR_ALREADY_EXISTS" value="32" enum="Error">
2723 Already exists error.
2724 </constant>
2725 <constant name="ERR_DOES_NOT_EXIST" value="33" enum="Error">
2726 Does not exist error.
2727 </constant>
2728 <constant name="ERR_DATABASE_CANT_READ" value="34" enum="Error">
2729 Database: Read error.
2730 </constant>
2731 <constant name="ERR_DATABASE_CANT_WRITE" value="35" enum="Error">
2732 Database: Write error.
2733 </constant>
2734 <constant name="ERR_COMPILATION_FAILED" value="36" enum="Error">
2735 Compilation failed error.
2736 </constant>
2737 <constant name="ERR_METHOD_NOT_FOUND" value="37" enum="Error">
2738 Method not found error.
2739 </constant>
2740 <constant name="ERR_LINK_FAILED" value="38" enum="Error">
2741 Linking failed error.
2742 </constant>
2743 <constant name="ERR_SCRIPT_FAILED" value="39" enum="Error">
2744 Script failed error.
2745 </constant>
2746 <constant name="ERR_CYCLIC_LINK" value="40" enum="Error">
2747 Cycling link (import cycle) error.
2748 </constant>
2749 <constant name="ERR_INVALID_DECLARATION" value="41" enum="Error">
2750 Invalid declaration error.
2751 </constant>
2752 <constant name="ERR_DUPLICATE_SYMBOL" value="42" enum="Error">
2753 Duplicate symbol error.
2754 </constant>
2755 <constant name="ERR_PARSE_ERROR" value="43" enum="Error">
2756 Parse error.
2757 </constant>
2758 <constant name="ERR_BUSY" value="44" enum="Error">
2759 Busy error.
2760 </constant>
2761 <constant name="ERR_SKIP" value="45" enum="Error">
2762 Skip error.
2763 </constant>
2764 <constant name="ERR_HELP" value="46" enum="Error">
2765 Help error. Used internally when passing [code]--version[/code] or [code]--help[/code] as executable options.
2766 </constant>
2767 <constant name="ERR_BUG" value="47" enum="Error">
2768 Bug error, caused by an implementation issue in the method.
2769 [b]Note:[/b] If a built-in method returns this code, please open an issue on [url=https://github.com/godotengine/godot/issues]the GitHub Issue Tracker[/url].
2770 </constant>
2771 <constant name="ERR_PRINTER_ON_FIRE" value="48" enum="Error">
2772 Printer on fire error (This is an easter egg, no built-in methods return this error code).
2773 </constant>
2774 <constant name="PROPERTY_HINT_NONE" value="0" enum="PropertyHint">
2775 The property has no hint for the editor.
2776 </constant>
2777 <constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
2778 Hints that an [int] or [float] property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_less"[/code] to allow manual input going respectively above the max or below the min values.
2779 [b]Example:[/b] [code]"-360,360,1,or_greater,or_less"[/code].
2780 Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians_as_degrees"[/code] for editing radian angles in degrees (the range values are also in degrees), [code]"degrees"[/code] to hint at an angle, [code]"prefer_slider"[/code] to show the slider for integers, [code]"hide_control"[/code] to hide the slider or up-down arrows, and [code]"suffix:px/s"[/code] to display a suffix indicating the value's unit (e.g. [code]px/s[/code] for pixels per second).
2781 </constant>
2782 <constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint">
2783 Hints that an [int], [String], or [StringName] property is an enumerated value to pick in a list specified via a hint string.
2784 The hint string is a comma separated list of names such as [code]"Hello,Something,Else"[/code]. Whitespace is [b]not[/b] 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 [code]:integer[/code] to the name, e.g. [code]"Zero,One,Three:3,Four,Six:6"[/code].
2785 </constant>
2786 <constant name="PROPERTY_HINT_ENUM_SUGGESTION" value="3" enum="PropertyHint">
2787 Hints that a [String] or [StringName] property can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code]. See [constant PROPERTY_HINT_ENUM] for details.
2788 Unlike [constant PROPERTY_HINT_ENUM], a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
2789 </constant>
2790 <constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint">
2791 Hints that a [float] property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"positive_only"[/code] to exclude in/out easing and limit values to be greater than or equal to zero.
2792 </constant>
2793 <constant name="PROPERTY_HINT_LINK" value="5" enum="PropertyHint">
2794 Hints that a vector property should allow its components to be linked. For example, this allows [member Vector2.x] and [member Vector2.y] to be edited together.
2795 </constant>
2796 <constant name="PROPERTY_HINT_FLAGS" value="6" enum="PropertyHint">
2797 Hints that an [int] property is a bitmask with named bit flags.
2798 The hint string is a comma separated list of names such as [code]"Bit0,Bit1,Bit2,Bit3"[/code]. Whitespace is [b]not[/b] 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 [code]:integer[/code] to the name, e.g. [code]"A:4,B:8,C:16"[/code]. You can also combine several flags ([code]"A:4,B:8,AB:12,C:16"[/code]).
2799 [b]Note:[/b] A flag value must be at least [code]1[/code] and at most [code]2 ** 32 - 1[/code].
2800 [b]Note:[/b] Unlike [constant PROPERTY_HINT_ENUM], the previous explicit value is not taken into account. For the hint [code]"A:16,B,C"[/code], A is 16, B is 2, C is 4.
2801 </constant>
2802 <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="7" enum="PropertyHint">
2803 Hints that an [int] property is a bitmask using the optionally named 2D render layers.
2804 </constant>
2805 <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="8" enum="PropertyHint">
2806 Hints that an [int] property is a bitmask using the optionally named 2D physics layers.
2807 </constant>
2808 <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="9" enum="PropertyHint">
2809 Hints that an [int] property is a bitmask using the optionally named 2D navigation layers.
2810 </constant>
2811 <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="10" enum="PropertyHint">
2812 Hints that an [int] property is a bitmask using the optionally named 3D render layers.
2813 </constant>
2814 <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="11" enum="PropertyHint">
2815 Hints that an [int] property is a bitmask using the optionally named 3D physics layers.
2816 </constant>
2817 <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="12" enum="PropertyHint">
2818 Hints that an [int] property is a bitmask using the optionally named 3D navigation layers.
2819 </constant>
2820 <constant name="PROPERTY_HINT_LAYERS_AVOIDANCE" value="37" enum="PropertyHint">
2821 Hints that an integer property is a bitmask using the optionally named avoidance layers.
2822 </constant>
2823 <constant name="PROPERTY_HINT_FILE" value="13" enum="PropertyHint">
2824 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 [code]"*.png,*.jpg"[/code]. By default the file will be stored as UID whenever available. You can use [ResourceUID] methods to convert it back to path. For storing a raw path, use [constant PROPERTY_HINT_FILE_PATH].
2825 </constant>
2826 <constant name="PROPERTY_HINT_DIR" value="14" enum="PropertyHint">
2827 Hints that a [String] property is a path to a directory. Editing it will show a file dialog for picking the path.
2828 </constant>
2829 <constant name="PROPERTY_HINT_GLOBAL_FILE" value="15" enum="PropertyHint">
2830 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 [code]"*.png,*.jpg"[/code].
2831 </constant>
2832 <constant name="PROPERTY_HINT_GLOBAL_DIR" value="16" enum="PropertyHint">
2833 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.
2834 </constant>
2835 <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint">
2836 Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
2837 </constant>
2838 <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint">
2839 Hints that a [String] property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
2840 The hint string can be set to [code]"monospace"[/code] to force the input field to use a monospaced font.
2841 If the hint string [code]"no_wrap"[/code] is set, the input field will not wrap lines at boundaries, instead resorting to making the area scrollable.
2842 </constant>
2843 <constant name="PROPERTY_HINT_EXPRESSION" value="19" enum="PropertyHint">
2844 Hints that a [String] property is an [Expression].
2845 </constant>
2846 <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="20" enum="PropertyHint">
2847 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.
2848 </constant>
2849 <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="21" enum="PropertyHint">
2850 Hints that a [Color] property should be edited without affecting its transparency ([member Color.a] is not editable).
2851 </constant>
2852 <constant name="PROPERTY_HINT_OBJECT_ID" value="22" enum="PropertyHint">
2853 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.
2854 </constant>
2855 <constant name="PROPERTY_HINT_TYPE_STRING" value="23" enum="PropertyHint">
2856 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.
2857 If a property is [Array], hints the editor how to show elements. The [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code].
2858 If a property is [Dictionary], hints the editor how to show elements. The [code]hint_string[/code] is the same as [Array], with a [code]";"[/code] separating the key and value.
2859 [codeblocks]
2860 [gdscript]
2861 # Array of elem_type.
2862 hint_string = "%d:" % [elem_type]
2863 hint_string = "%d/%d:%s" % [elem_type, elem_hint, elem_hint_string]
2864 # Two-dimensional array of elem_type (array of arrays of elem_type).
2865 hint_string = "%d:%d:" % [TYPE_ARRAY, elem_type]
2866 hint_string = "%d:%d/%d:%s" % [TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
2867 # Three-dimensional array of elem_type (array of arrays of arrays of elem_type).
2868 hint_string = "%d:%d:%d:" % [TYPE_ARRAY, TYPE_ARRAY, elem_type]
2869 hint_string = "%d:%d:%d/%d:%s" % [TYPE_ARRAY, TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
2870 [/gdscript]
2871 [csharp]
2872 // Array of elemType.
2873 hintString = $"{elemType:D}:";
2874 hintString = $"{elemType:}/{elemHint:D}:{elemHintString}";
2875 // Two-dimensional array of elemType (array of arrays of elemType).
2876 hintString = $"{Variant.Type.Array:D}:{elemType:D}:";
2877 hintString = $"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
2878 // Three-dimensional array of elemType (array of arrays of arrays of elemType).
2879 hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}:";
2880 hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
2881 [/csharp]
2882 [/codeblocks]
2883 [b]Examples:[/b]
2884 [codeblocks]
2885 [gdscript]
2886 hint_string = "%d:" % [TYPE_INT] # Array of integers.
2887 hint_string = "%d/%d:1,10,1" % [TYPE_INT, PROPERTY_HINT_RANGE] # Array of integers (in range from 1 to 10).
2888 hint_string = "%d/%d:Zero,One,Two" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
2889 hint_string = "%d/%d:Zero,One,Three:3,Six:6" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
2890 hint_string = "%d/%d:*.png" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of strings (file paths).
2891 hint_string = "%d/%d:Texture2D" % [TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Array of textures.
2892
2893 hint_string = "%d:%d:" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array of floats.
2894 hint_string = "%d:%d/%d:" % [TYPE_ARRAY, TYPE_STRING, PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings.
2895 hint_string = "%d:%d/%d:-1,1,0.1" % [TYPE_ARRAY, TYPE_FLOAT, PROPERTY_HINT_RANGE] # Two-dimensional array of floats (in range from -1 to 1).
2896 hint_string = "%d:%d/%d:Texture2D" % [TYPE_ARRAY, TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Two-dimensional array of textures.
2897 [/gdscript]
2898 [csharp]
2899 hintString = $"{Variant.Type.Int:D}/{PropertyHint.Range:D}:1,10,1"; // Array of integers (in range from 1 to 10).
2900 hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Two"; // Array of integers (an enum).
2901 hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6"; // Array of integers (an enum).
2902 hintString = $"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png"; // Array of strings (file paths).
2903 hintString = $"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Array of textures.
2904
2905 hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}:"; // Two-dimensional array of floats.
2906 hintString = $"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:"; // Two-dimensional array of multiline strings.
2907 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).
2908 hintString = $"{Variant.Type.Array:D}:{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Two-dimensional array of textures.
2909 [/csharp]
2910 [/codeblocks]
2911 [b]Note:[/b] The trailing colon is required for properly detecting built-in types.
2912 </constant>
2913 <constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="24" enum="PropertyHint" deprecated="This hint is not used by the engine.">
2914 </constant>
2915 <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="25" enum="PropertyHint">
2916 Hints that an object is too big to be sent via the debugger.
2917 </constant>
2918 <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="26" enum="PropertyHint">
2919 Hints that the hint string specifies valid node types for property of type [NodePath].
2920 </constant>
2921 <constant name="PROPERTY_HINT_SAVE_FILE" value="27" enum="PropertyHint">
2922 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 [code]"*.png,*.jpg"[/code]. See also [member FileDialog.filters].
2923 </constant>
2924 <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="28" enum="PropertyHint">
2925 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 [code]"*.png,*.jpg"[/code]. See also [member FileDialog.filters].
2926 </constant>
2927 <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="29" enum="PropertyHint" deprecated="This hint is not used by the engine.">
2928 </constant>
2929 <constant name="PROPERTY_HINT_INT_IS_POINTER" value="30" enum="PropertyHint">
2930 Hints that an [int] property is a pointer. Used by GDExtension.
2931 </constant>
2932 <constant name="PROPERTY_HINT_ARRAY_TYPE" value="31" enum="PropertyHint">
2933 Hints that a property is an [Array] with the stored type specified in the hint string. The hint string contains the type of the array (e.g. [code]"String"[/code]).
2934 Use the hint string format from [constant PROPERTY_HINT_TYPE_STRING] for more control over the stored type.
2935 </constant>
2936 <constant name="PROPERTY_HINT_DICTIONARY_TYPE" value="38" enum="PropertyHint">
2937 Hints that a property is a [Dictionary] with the stored types specified in the hint string. The hint string contains the key and value types separated by a semicolon (e.g. [code]"int;String"[/code]).
2938 Use the hint string format from [constant PROPERTY_HINT_TYPE_STRING] for more control over the stored types.
2939 </constant>
2940 <constant name="PROPERTY_HINT_LOCALE_ID" value="32" enum="PropertyHint">
2941 Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
2942 </constant>
2943 <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="33" enum="PropertyHint">
2944 Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings.
2945 </constant>
2946 <constant name="PROPERTY_HINT_NODE_TYPE" value="34" enum="PropertyHint">
2947 Hints that a property is an instance of a [Node]-derived type, optionally specified via the hint string (e.g. [code]"Node2D"[/code]). Editing it will show a dialog for picking a node from the scene.
2948 </constant>
2949 <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="35" enum="PropertyHint">
2950 Hints that a quaternion property should disable the temporary euler editor.
2951 </constant>
2952 <constant name="PROPERTY_HINT_PASSWORD" value="36" enum="PropertyHint">
2953 Hints that a string property is a password, and every character is replaced with the secret character.
2954 </constant>
2955 <constant name="PROPERTY_HINT_TOOL_BUTTON" value="39" enum="PropertyHint">
2956 Hints that a [Callable] property should be displayed as a clickable button. When the button is pressed, the callable is called. The hint string specifies the button text and optionally an icon from the [code]"EditorIcons"[/code] theme type.
2957 [codeblock lang=text]
2958 "Click me!" - A button with the text "Click me!" and the default "Callable" icon.
2959 "Click me!,ColorRect" - A button with the text "Click me!" and the "ColorRect" icon.
2960 [/codeblock]
2961 [b]Note:[/b] A [Callable] cannot be properly serialized and stored in a file, so it is recommended to use [constant PROPERTY_USAGE_EDITOR] instead of [constant PROPERTY_USAGE_DEFAULT].
2962 </constant>
2963 <constant name="PROPERTY_HINT_ONESHOT" value="40" enum="PropertyHint">
2964 Hints that a property will be changed on its own after setting, such as [member AudioStreamPlayer.playing] or [member GPUParticles3D.emitting].
2965 </constant>
2966 <constant name="PROPERTY_HINT_GROUP_ENABLE" value="42" enum="PropertyHint">
2967 Hints that a boolean property will enable the feature associated with the group that it occurs in. The property will be displayed as a checkbox on the group header. Only works within a group or subgroup.
2968 By default, disabling the property hides all properties in the group. Use the optional hint string [code]"checkbox_only"[/code] to disable this behavior.
2969 </constant>
2970 <constant name="PROPERTY_HINT_INPUT_NAME" value="43" enum="PropertyHint">
2971 Hints that a [String] or [StringName] property is the name of an input action. This allows the selection of any action name from the Input Map in the Project Settings. The hint string may contain two options separated by commas:
2972 - If it contains [code]"show_builtin"[/code], built-in input actions are included in the selection.
2973 - If it contains [code]"loose_mode"[/code], loose mode is enabled. This allows inserting any action name even if it's not present in the input map.
2974 </constant>
2975 <constant name="PROPERTY_HINT_FILE_PATH" value="44" enum="PropertyHint">
2976 Like [constant PROPERTY_HINT_FILE], but the property is stored as a raw path, not UID. That means the reference will be broken if you move the file. Consider using [constant PROPERTY_HINT_FILE] when possible.
2977 </constant>
2978 <constant name="PROPERTY_HINT_MAX" value="45" enum="PropertyHint">
2979 Represents the size of the [enum PropertyHint] enum.
2980 </constant>
2981 <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags" is_bitfield="true">
2982 The property is not stored, and does not display in the editor. This is the default for non-exported properties.
2983 </constant>
2984 <constant name="PROPERTY_USAGE_STORAGE" value="2" enum="PropertyUsageFlags" is_bitfield="true">
2985 The property is serialized and saved in the scene file (default for exported properties).
2986 </constant>
2987 <constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags" is_bitfield="true">
2988 The property is shown in the [EditorInspector] (default for exported properties).
2989 </constant>
2990 <constant name="PROPERTY_USAGE_INTERNAL" value="8" enum="PropertyUsageFlags" is_bitfield="true">
2991 The property is excluded from the class reference.
2992 </constant>
2993 <constant name="PROPERTY_USAGE_CHECKABLE" value="16" enum="PropertyUsageFlags" is_bitfield="true">
2994 The property can be checked in the [EditorInspector].
2995 </constant>
2996 <constant name="PROPERTY_USAGE_CHECKED" value="32" enum="PropertyUsageFlags" is_bitfield="true">
2997 The property is checked in the [EditorInspector].
2998 </constant>
2999 <constant name="PROPERTY_USAGE_GROUP" value="64" enum="PropertyUsageFlags" is_bitfield="true">
3000 Used to group properties together in the editor. See [EditorInspector].
3001 </constant>
3002 <constant name="PROPERTY_USAGE_CATEGORY" value="128" enum="PropertyUsageFlags" is_bitfield="true">
3003 Used to categorize properties together in the editor.
3004 </constant>
3005 <constant name="PROPERTY_USAGE_SUBGROUP" value="256" enum="PropertyUsageFlags" is_bitfield="true">
3006 Used to group properties together in the editor in a subgroup (under a group). See [EditorInspector].
3007 </constant>
3008 <constant name="PROPERTY_USAGE_CLASS_IS_BITFIELD" value="512" enum="PropertyUsageFlags" is_bitfield="true">
3009 The property is a bitfield, i.e. it contains multiple flags represented as bits.
3010 </constant>
3011 <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="1024" enum="PropertyUsageFlags" is_bitfield="true">
3012 The property does not save its state in [PackedScene].
3013 </constant>
3014 <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="2048" enum="PropertyUsageFlags" is_bitfield="true">
3015 Editing the property prompts the user for restarting the editor.
3016 </constant>
3017 <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="4096" enum="PropertyUsageFlags" is_bitfield="true">
3018 The property is a script variable. [constant PROPERTY_USAGE_SCRIPT_VARIABLE] can be used to distinguish between exported script variables from built-in variables (which don't have this usage flag). By default, [constant PROPERTY_USAGE_SCRIPT_VARIABLE] is [b]not[/b] applied to variables that are created by overriding [method Object._get_property_list] in a script.
3019 </constant>
3020 <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="8192" enum="PropertyUsageFlags" is_bitfield="true">
3021 The property value of type [Object] will be stored even if its value is [code]null[/code].
3022 </constant>
3023 <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="16384" enum="PropertyUsageFlags" is_bitfield="true">
3024 If this property is modified, all inspector fields will be refreshed.
3025 </constant>
3026 <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="32768" enum="PropertyUsageFlags" is_bitfield="true" deprecated="This flag is not used by the engine.">
3027 </constant>
3028 <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="65536" enum="PropertyUsageFlags" is_bitfield="true">
3029 The property is a variable of enum type, i.e. it only takes named integer constants from its associated enumeration.
3030 </constant>
3031 <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="131072" enum="PropertyUsageFlags" is_bitfield="true">
3032 If property has [code]nil[/code] as default value, its type will be [Variant].
3033 </constant>
3034 <constant name="PROPERTY_USAGE_ARRAY" value="262144" enum="PropertyUsageFlags" is_bitfield="true">
3035 The property is the element count of a property array, i.e. a list of groups of related properties. Properties defined with this usage also need a specific [code]class_name[/code] field in the form of [code]label,prefix[/code]. The field may also include additional comma-separated options:
3036 - [code]page_size=N[/code]: Overrides [member EditorSettings.interface/inspector/max_array_dictionary_items_per_page] for this array.
3037 - [code]add_button_text=text[/code]: The text displayed by the "Add Element" button.
3038 - [code]static[/code]: The elements can't be re-arranged.
3039 - [code]const[/code]: New elements can't be added.
3040 - [code]numbered[/code]: An index will appear next to each element.
3041 - [code]unfoldable[/code]: The array can't be folded.
3042 - [code]swap_method=method_name[/code]: The method that will be called when two elements switch places. The method should take 2 [int] parameters, which will be indices of the elements being swapped.
3043 Note that making a full-fledged property array requires boilerplate code involving [method Object._get_property_list].
3044 </constant>
3045 <constant name="PROPERTY_USAGE_ALWAYS_DUPLICATE" value="524288" enum="PropertyUsageFlags" is_bitfield="true">
3046 When duplicating a resource with [method Resource.duplicate], and this flag is set on a property of that resource, the property should always be duplicated, regardless of the [code]subresources[/code] bool parameter.
3047 </constant>
3048 <constant name="PROPERTY_USAGE_NEVER_DUPLICATE" value="1048576" enum="PropertyUsageFlags" is_bitfield="true">
3049 When duplicating a resource with [method Resource.duplicate], and this flag is set on a property of that resource, the property should never be duplicated, regardless of the [code]subresources[/code] bool parameter.
3050 </constant>
3051 <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="2097152" enum="PropertyUsageFlags" is_bitfield="true">
3052 The property is only shown in the editor if modern renderers are supported (the Compatibility rendering method is excluded).
3053 </constant>
3054 <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="4194304" enum="PropertyUsageFlags" is_bitfield="true">
3055 The [NodePath] property will always be relative to the scene's root. Mostly useful for local resources.
3056 </constant>
3057 <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="8388608" enum="PropertyUsageFlags" is_bitfield="true">
3058 Use when a resource is created on the fly, i.e. the getter will always return a different instance. [ResourceSaver] needs this information to properly save such resources.
3059 </constant>
3060 <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="16777216" enum="PropertyUsageFlags" is_bitfield="true">
3061 Inserting an animation key frame of this property will automatically increment the value, allowing to easily keyframe multiple values in a row.
3062 </constant>
3063 <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="33554432" enum="PropertyUsageFlags" is_bitfield="true" deprecated="This flag is not used by the engine.">
3064 </constant>
3065 <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="67108864" enum="PropertyUsageFlags" is_bitfield="true">
3066 When this property is a [Resource] and base object is a [Node], a resource instance will be automatically created whenever the node is created in the editor.
3067 </constant>
3068 <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="134217728" enum="PropertyUsageFlags" is_bitfield="true">
3069 The property is considered a basic setting and will appear even when advanced mode is disabled. Used for project settings.
3070 </constant>
3071 <constant name="PROPERTY_USAGE_READ_ONLY" value="268435456" enum="PropertyUsageFlags" is_bitfield="true">
3072 The property is read-only in the [EditorInspector].
3073 </constant>
3074 <constant name="PROPERTY_USAGE_SECRET" value="536870912" enum="PropertyUsageFlags" is_bitfield="true">
3075 An export preset property with this flag contains confidential information and is stored separately from the rest of the export preset configuration.
3076 </constant>
3077 <constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags" is_bitfield="true">
3078 Default usage (storage and editor).
3079 </constant>
3080 <constant name="PROPERTY_USAGE_NO_EDITOR" value="2" enum="PropertyUsageFlags" is_bitfield="true">
3081 Default usage but without showing the property in the editor (storage).
3082 </constant>
3083 <constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags" is_bitfield="true">
3084 Flag for a normal method.
3085 </constant>
3086 <constant name="METHOD_FLAG_EDITOR" value="2" enum="MethodFlags" is_bitfield="true">
3087 Flag for an editor method.
3088 </constant>
3089 <constant name="METHOD_FLAG_CONST" value="4" enum="MethodFlags" is_bitfield="true">
3090 Flag for a constant method.
3091 </constant>
3092 <constant name="METHOD_FLAG_VIRTUAL" value="8" enum="MethodFlags" is_bitfield="true">
3093 Flag for a virtual method.
3094 </constant>
3095 <constant name="METHOD_FLAG_VARARG" value="16" enum="MethodFlags" is_bitfield="true">
3096 Flag for a method with a variable number of arguments.
3097 </constant>
3098 <constant name="METHOD_FLAG_STATIC" value="32" enum="MethodFlags" is_bitfield="true">
3099 Flag for a static method.
3100 </constant>
3101 <constant name="METHOD_FLAG_OBJECT_CORE" value="64" enum="MethodFlags" is_bitfield="true">
3102 Used internally. Allows to not dump core virtual methods (such as [method Object._notification]) to the JSON API.
3103 </constant>
3104 <constant name="METHOD_FLAG_VIRTUAL_REQUIRED" value="128" enum="MethodFlags" is_bitfield="true">
3105 Flag for a virtual method that is required. In GDScript, this flag is set for abstract functions.
3106 </constant>
3107 <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags" is_bitfield="true">
3108 Default method flags (normal).
3109 </constant>
3110 <constant name="TYPE_NIL" value="0" enum="Variant.Type">
3111 Variable is [code]null[/code].
3112 </constant>
3113 <constant name="TYPE_BOOL" value="1" enum="Variant.Type">
3114 Variable is of type [bool].
3115 </constant>
3116 <constant name="TYPE_INT" value="2" enum="Variant.Type">
3117 Variable is of type [int].
3118 </constant>
3119 <constant name="TYPE_FLOAT" value="3" enum="Variant.Type">
3120 Variable is of type [float].
3121 </constant>
3122 <constant name="TYPE_STRING" value="4" enum="Variant.Type">
3123 Variable is of type [String].
3124 </constant>
3125 <constant name="TYPE_VECTOR2" value="5" enum="Variant.Type">
3126 Variable is of type [Vector2].
3127 </constant>
3128 <constant name="TYPE_VECTOR2I" value="6" enum="Variant.Type">
3129 Variable is of type [Vector2i].
3130 </constant>
3131 <constant name="TYPE_RECT2" value="7" enum="Variant.Type">
3132 Variable is of type [Rect2].
3133 </constant>
3134 <constant name="TYPE_RECT2I" value="8" enum="Variant.Type">
3135 Variable is of type [Rect2i].
3136 </constant>
3137 <constant name="TYPE_VECTOR3" value="9" enum="Variant.Type">
3138 Variable is of type [Vector3].
3139 </constant>
3140 <constant name="TYPE_VECTOR3I" value="10" enum="Variant.Type">
3141 Variable is of type [Vector3i].
3142 </constant>
3143 <constant name="TYPE_TRANSFORM2D" value="11" enum="Variant.Type">
3144 Variable is of type [Transform2D].
3145 </constant>
3146 <constant name="TYPE_VECTOR4" value="12" enum="Variant.Type">
3147 Variable is of type [Vector4].
3148 </constant>
3149 <constant name="TYPE_VECTOR4I" value="13" enum="Variant.Type">
3150 Variable is of type [Vector4i].
3151 </constant>
3152 <constant name="TYPE_PLANE" value="14" enum="Variant.Type">
3153 Variable is of type [Plane].
3154 </constant>
3155 <constant name="TYPE_QUATERNION" value="15" enum="Variant.Type">
3156 Variable is of type [Quaternion].
3157 </constant>
3158 <constant name="TYPE_AABB" value="16" enum="Variant.Type">
3159 Variable is of type [AABB].
3160 </constant>
3161 <constant name="TYPE_BASIS" value="17" enum="Variant.Type">
3162 Variable is of type [Basis].
3163 </constant>
3164 <constant name="TYPE_TRANSFORM3D" value="18" enum="Variant.Type">
3165 Variable is of type [Transform3D].
3166 </constant>
3167 <constant name="TYPE_PROJECTION" value="19" enum="Variant.Type">
3168 Variable is of type [Projection].
3169 </constant>
3170 <constant name="TYPE_COLOR" value="20" enum="Variant.Type">
3171 Variable is of type [Color].
3172 </constant>
3173 <constant name="TYPE_STRING_NAME" value="21" enum="Variant.Type">
3174 Variable is of type [StringName].
3175 </constant>
3176 <constant name="TYPE_NODE_PATH" value="22" enum="Variant.Type">
3177 Variable is of type [NodePath].
3178 </constant>
3179 <constant name="TYPE_RID" value="23" enum="Variant.Type">
3180 Variable is of type [RID].
3181 </constant>
3182 <constant name="TYPE_OBJECT" value="24" enum="Variant.Type">
3183 Variable is of type [Object].
3184 </constant>
3185 <constant name="TYPE_CALLABLE" value="25" enum="Variant.Type">
3186 Variable is of type [Callable].
3187 </constant>
3188 <constant name="TYPE_SIGNAL" value="26" enum="Variant.Type">
3189 Variable is of type [Signal].
3190 </constant>
3191 <constant name="TYPE_DICTIONARY" value="27" enum="Variant.Type">
3192 Variable is of type [Dictionary].
3193 </constant>
3194 <constant name="TYPE_ARRAY" value="28" enum="Variant.Type">
3195 Variable is of type [Array].
3196 </constant>
3197 <constant name="TYPE_PACKED_BYTE_ARRAY" value="29" enum="Variant.Type">
3198 Variable is of type [PackedByteArray].
3199 </constant>
3200 <constant name="TYPE_PACKED_INT32_ARRAY" value="30" enum="Variant.Type">
3201 Variable is of type [PackedInt32Array].
3202 </constant>
3203 <constant name="TYPE_PACKED_INT64_ARRAY" value="31" enum="Variant.Type">
3204 Variable is of type [PackedInt64Array].
3205 </constant>
3206 <constant name="TYPE_PACKED_FLOAT32_ARRAY" value="32" enum="Variant.Type">
3207 Variable is of type [PackedFloat32Array].
3208 </constant>
3209 <constant name="TYPE_PACKED_FLOAT64_ARRAY" value="33" enum="Variant.Type">
3210 Variable is of type [PackedFloat64Array].
3211 </constant>
3212 <constant name="TYPE_PACKED_STRING_ARRAY" value="34" enum="Variant.Type">
3213 Variable is of type [PackedStringArray].
3214 </constant>
3215 <constant name="TYPE_PACKED_VECTOR2_ARRAY" value="35" enum="Variant.Type">
3216 Variable is of type [PackedVector2Array].
3217 </constant>
3218 <constant name="TYPE_PACKED_VECTOR3_ARRAY" value="36" enum="Variant.Type">
3219 Variable is of type [PackedVector3Array].
3220 </constant>
3221 <constant name="TYPE_PACKED_COLOR_ARRAY" value="37" enum="Variant.Type">
3222 Variable is of type [PackedColorArray].
3223 </constant>
3224 <constant name="TYPE_PACKED_VECTOR4_ARRAY" value="38" enum="Variant.Type">
3225 Variable is of type [PackedVector4Array].
3226 </constant>
3227 <constant name="TYPE_MAX" value="39" enum="Variant.Type">
3228 Represents the size of the [enum Variant.Type] enum.
3229 </constant>
3230 <constant name="OP_EQUAL" value="0" enum="Variant.Operator">
3231 Equality operator ([code]==[/code]).
3232 </constant>
3233 <constant name="OP_NOT_EQUAL" value="1" enum="Variant.Operator">
3234 Inequality operator ([code]!=[/code]).
3235 </constant>
3236 <constant name="OP_LESS" value="2" enum="Variant.Operator">
3237 Less than operator ([code]&lt;[/code]).
3238 </constant>
3239 <constant name="OP_LESS_EQUAL" value="3" enum="Variant.Operator">
3240 Less than or equal operator ([code]&lt;=[/code]).
3241 </constant>
3242 <constant name="OP_GREATER" value="4" enum="Variant.Operator">
3243 Greater than operator ([code]&gt;[/code]).
3244 </constant>
3245 <constant name="OP_GREATER_EQUAL" value="5" enum="Variant.Operator">
3246 Greater than or equal operator ([code]&gt;=[/code]).
3247 </constant>
3248 <constant name="OP_ADD" value="6" enum="Variant.Operator">
3249 Addition operator ([code]+[/code]).
3250 </constant>
3251 <constant name="OP_SUBTRACT" value="7" enum="Variant.Operator">
3252 Subtraction operator ([code]-[/code]).
3253 </constant>
3254 <constant name="OP_MULTIPLY" value="8" enum="Variant.Operator">
3255 Multiplication operator ([code]*[/code]).
3256 </constant>
3257 <constant name="OP_DIVIDE" value="9" enum="Variant.Operator">
3258 Division operator ([code]/[/code]).
3259 </constant>
3260 <constant name="OP_NEGATE" value="10" enum="Variant.Operator">
3261 Unary negation operator ([code]-[/code]).
3262 </constant>
3263 <constant name="OP_POSITIVE" value="11" enum="Variant.Operator">
3264 Unary plus operator ([code]+[/code]).
3265 </constant>
3266 <constant name="OP_MODULE" value="12" enum="Variant.Operator">
3267 Remainder/modulo operator ([code]%[/code]).
3268 </constant>
3269 <constant name="OP_POWER" value="13" enum="Variant.Operator">
3270 Power operator ([code]**[/code]).
3271 </constant>
3272 <constant name="OP_SHIFT_LEFT" value="14" enum="Variant.Operator">
3273 Left shift operator ([code]&lt;&lt;[/code]).
3274 </constant>
3275 <constant name="OP_SHIFT_RIGHT" value="15" enum="Variant.Operator">
3276 Right shift operator ([code]&gt;&gt;[/code]).
3277 </constant>
3278 <constant name="OP_BIT_AND" value="16" enum="Variant.Operator">
3279 Bitwise AND operator ([code]&amp;[/code]).
3280 </constant>
3281 <constant name="OP_BIT_OR" value="17" enum="Variant.Operator">
3282 Bitwise OR operator ([code]|[/code]).
3283 </constant>
3284 <constant name="OP_BIT_XOR" value="18" enum="Variant.Operator">
3285 Bitwise XOR operator ([code]^[/code]).
3286 </constant>
3287 <constant name="OP_BIT_NEGATE" value="19" enum="Variant.Operator">
3288 Bitwise NOT operator ([code]~[/code]).
3289 </constant>
3290 <constant name="OP_AND" value="20" enum="Variant.Operator">
3291 Logical AND operator ([code]and[/code] or [code]&amp;&amp;[/code]).
3292 </constant>
3293 <constant name="OP_OR" value="21" enum="Variant.Operator">
3294 Logical OR operator ([code]or[/code] or [code]||[/code]).
3295 </constant>
3296 <constant name="OP_XOR" value="22" enum="Variant.Operator">
3297 Logical XOR operator (not implemented in GDScript).
3298 </constant>
3299 <constant name="OP_NOT" value="23" enum="Variant.Operator">
3300 Logical NOT operator ([code]not[/code] or [code]![/code]).
3301 </constant>
3302 <constant name="OP_IN" value="24" enum="Variant.Operator">
3303 Logical IN operator ([code]in[/code]).
3304 </constant>
3305 <constant name="OP_MAX" value="25" enum="Variant.Operator">
3306 Represents the size of the [enum Variant.Operator] enum.
3307 </constant>
3308 </constants>
3309 </class>