代码拉取完成,页面将自动刷新
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
Array.map()
, Array.filter()
and Array.reduce()
methods that can be used with Callables.Transform2D.looking_at()
function.Basis.rotate_to_align()
function.process_list
functions.randi_range()
global scope function to return a random integer number within a range.randfn()
global scope function to return a floating-point number along a normal gaussian distribution.pingpong()
global scope function to return a floating-point number that increments then decrements in a "sawtooth" fashion.clamp()
methods.Vector3.limit_length()
method as a Vector3 counterpart to Vector2.limit_length()
(formerly Vector2.clamped()
).ConfigFile.parse(data: String)
method to load a string as if it was a ConfigFile on disk.Image.save_png_to_buffer()
method to save a PNG image to memory as a PackedByteArray (instead of saving to disk).##
are considered documentation comments.NOTIFICATION_APPLICATION_FOCUS_IN
and NOTIFICATION_APPLICATION_FOCUS_OUT
notifications for "global" project focus changes (separate from NOTIFICATION_WM_FOCUS_IN
and NOTIFICATION_WM_FOCUS_OUT
).fit_content_height
to make the label's height fit its content automatically (not always reliable).img
tag now supports an optional color
attribute to modulate the image.get_char_size()
is now exposed in Font, making it usable in DynamicFont rather than being limited to BitmapFont.DisplayServer.keyboard_get_current_layout()
and DisplayServer.keyboard_get_layout_*()
methods to get information about keyboard layouts.Input.MOUSE_MODE_CONFINED_HIDDEN
mouse mode to combine the confined and hidden mouse modes.int[2] array;
instead of int array[2]
).
int array[3]; array = {1, 2, 3}
is now valid.fma()
(fused multiply-add) built-in function to optimize shaders in a low-level way.PI
, TAU
and E
are now available in the shader language.FFT_Size
enum to FFTSize
for consistency.endian_swap
property to big_endian
for consistency with ResourceSaver and StreamPeer.get_len()
method to get_length()
.PROPERTY_USAGE_NOEDITOR
to PROPERTY_USAGE_NO_EDITOR
.Vector2.clamped()
to Vector2.limit_length()
to differentiate it from the new Vector2.clamp()
.rand_range()
to randf_range()
to avoid ambiguity with the new randi_range()
and make its return type more obvious.Node.add_child_below_node()
with Node.add_sibling()
.Directory.list_dir_begin()
's skip_navigational
and skip_hidden
arguments with show_navigational
and show_hidden
.
false
by default, which means the default behavior is now to exclude both navigational and hidden files from the returned list.translation
property to position
for consistency with Node2D.search()
method now returns a Dictionary instead of a PackedIntArray.scancode
to keycode
.get_action_list()
to get_action_events()
.disabled
property was renamed to enabled
with its behavior inverted.DEPTH_TEXTURE
now uses normalized device coordinates between 0.0
and 1.0
(inclusive) to match Vulkan behavior.
DEPTH_TEXTURE
to make them still work as expected.-1.0
and 1.0
(inclusive) to match OpenGL behavior..shader
file extension to .gdshader
.
x11
platform to linuxbsd
to prepare for Wayland support.server
platform in favor of disabling specific DisplayServers at build-time (e.g. vulkan=no
).Color.gray()
method.
Color.v()
for a better grayscale approximation instead.DisplayServer.get_latin_keyboard_variant()
method (replaced by the more flexible DisplayServer.keyboard_get_current_layout()
).allow_object_decoding
property from PacketPeer.sync
and slave
high-level multiplayer keywords.friction
and bounce
properties (replaced by PhysicsMaterial)..res
and .tres
files as runnable scene formats.
.res
or .tres
extension.Directory.get_space_left()
.OS.kill()
.scroll_to_line()
when Scroll Active is disabled.OS.execute()
now only quotes command line arguments if they contain special characters.Pi
or Tau
can now be used directly.tool
mode can now be enabled in visual scripts.tool
scripts.[img=<width>x<height>]
tag to resize an image displayed in a RichTextLabel.
<width>
or <height>
is 0, the image will be adjusted to keep its original aspect.bool
, int
, float
and String
).switch
statements in the shader language.do {...} while (...)
loops in the shader language.
while
, the expression in the do
block will always be run at least once.round()
to GLES2.SHADOW_VEC
shader parameter to alter 2D shadow computations in custom shaders.0b101010
for 42
).script_templates/
directory in the project and have an extension that matches the language (.gd
for GDScript, .cs
for C#).OS.set_min_window_size()
and OS.set_max_window_size()
.Node.process_priority
property to set or get a node's processing priority.
Node.set_process_priority()
(without an associated getter).Node.editor_description
property for documentation purposes.
Button.keep_pressed_outside
property to keep a button pressed when moving the pointer outside while pressed.Button.expand_icon
property to make a button's icon expand/shrink with the button's size.Popup.set_as_minsize()
method to shrink a popup to its minimum size.Tree.get_icon_modulate()
and Tree.set_icon_modulate()
methods to change an icon's color in a Tree.Tree.call_recursive()
method to call a method on a TreeItem and its children recursively.Light.use_gi_probe
property to exclude specific lights from GIProbe computations.get_loaded_locales()
to retrieve the list of languages with a translation loaded.FRUSTUM
3D camera mode to create tilted frustums for mirror or portal effects.CanvasItem.draw_rect()
now has width
and antialiased
properties to match draw_line()
's functionality.Engine.get_idle_frames()
and Engine.get_physics_frames()
to get the number of idle and physics frame iterations since the project started.
Engine.get_frames_drawn()
, Engine.get_idle_frames()
will be incremented even if the render loop is disabled.Engine.get_physics_interpolation_fraction()
to get the fraction through the current physics tick at the time of the current frame.
move_toward()
to retrieve a vector moved towards another by a specified number of units.direction_to()
to retrieve a normalized vector pointing from a vector to another.
(b - a).normalized()
.set_point_disabled()
and is_point_disabled()
to selectively disable points.tween_all_completed
signal when all tweens are completed.Input.get_current_cursor_shape()
to retrieve the current cursor shape.InputEventAction
now has a strength
property to simulate analog inputs.String.repeat()
method to repeat a string several times and return it.String.count()
method to count the number of occurrences of a substring in a string.String.humanize_size()
method to display a file size as an human-readable string.String.strip_escapes()
to strip non-printable escape characters from a string, including tabulations and newlines (but not spaces).String.sha1_text()
and String.sha1_buffer()
methods to return a string's SHA-1 hash.clear_points()
method to clear all points.assert()
now accepts an optional second parameter to display a custom message when the assertion fails.posmod()
built-in GDScript function that behaves like fposmod()
, but returns an integer value.smoothstep()
built-in GDScript function for smooth easing of values.lerp_angle()
built-in GDScript function to interpolate between two angles.ord()
built-in GDScript function to return the Unicode code point of an 1-character string.PoolByteArray.hex_encode()
method to get a string of hexadecimal numbers.Font.get_wordwrap_string_size()
method to return the rectangle size needed to draw a word-wrapped text.Camera.get_camera_rid()
method to retrieve a Camera's RID.Array.slice()
method to duplicate a subset of an Array and return it.selection_fill
and selection_stroke
theme items.Color.transparent
constant (equivalent to Color(1, 1, 1, 0)
).KinematicBody.get_floor_normal()
and KinematicBody2D.get_floor_normal()
to retrieve the collided floor's normal.VehicleWheel.get_rpm()
method to retrieve a vehicle wheel's rotations per minute.GeometryInstance.set_custom_aabb()
to set a custom bounding box (used for view frustum culling).FuncRef.call_funcv()
to call a FuncRef with an array containing arguments.
FuncRef.call_func()
, only a single array argument is expected.Mesh.get_aabb()
is now exposed to scripting.PhysicalBone.apply_impulse()
and PhysicalBone.apply_central_impulse()
methods to push ragdolls around.ProjectSettings.load_resource_pack()
now features an optional replace_files
argument (defaulting to true
), which controls whether the loaded resource pack can override existing files in the virtual filesystem.SpinBox.apply()
method to evaluate and apply the expression in the SpinBox's value immediately.ConfigFile.erase_section_key()
method to remove a single key from a ConfigFile.OS.execute()
now returns the process' exit code when blocking mode is enabled.OS.is_window_focused()
method that returns true
if the window is currently focused.
NOTIFICATION_WM_FOCUS_IN
and NOTIFICATION_WM_FOCUS_OUT
is no longer needed to achieve this.OS.low_processor_mode_sleep_usec
is now exposed as a property.
SceneTree.quit()
now accepts an optional argument with an exit code.
OS.exit_code
property.VisualServer.get_video_adapter_name()
and VisualServer.get_video_adapter_vendor()
methods to retrieve the user's graphics card model and vendor.VisualServer.multimesh_create()
is now exposed to scripting._to_string()
method.Script.get_script_property_list()
, Script.get_script_method_list()
, Script.get_script_signal_list()
, Script.get_script_constant_map()
and Script.get_property_default_value()
.randfn(mean, deviation)
method to generate random numbers following a normal Gaussian distribution.OS.execute()
(disabled by default).class_name
-declared classes are now highlighted with a separate color in the script editor.editor/search_in_file_extensions
in the Project Settings).2 + 2
becomes 4
).change_scene()
.centered_textures
can be used to center textures on their tile, instead of using the tile's top-left corner as position for the texture.IDENTITY
, FLIP_X
, FLIP_Y
, FLIP_Z
.frame_coords
property in Sprite and Sprite3D to set/get the coordinates of the frame to display from the sprite sheet.billboard
property in Sprite3D.direction
property in CPUParticles and ParticlesMaterial.lifetime_randomness
property in CPUParticles and ParticlesMaterial.canvas_item
vertices, which can be used in custom shaders.interface/editor/default_float_step
editor setting to configure floating-point values' default step in the Inspector.shortcut_keys_enabled
and selecting_enabled
LineEdit and TextEdit properties to disable keyboard shortcuts and selecting text.right_icon
set in scripts.nine_patch_stretch
TextureProgress property now enables stretching when using a radial fill mode.get_path()
and get_path_absolute()
are now implemented in FileAccessEncrypted..tres
files.use_lld=yes
flag to link with LLD on Linux when compiling with Clang.
use_thinlto=yes
flag to link with ThinLTO when using Clang.NetworkedMultiplayerEnet.server_relay
property to disable server relaying.
HTTPRequest.timeout
property (defaults to 0, which is disabled).HTTPRequest.download_chunk_size
property.
NOTIFICATION_APP_PAUSED
and NOTIFICATION_APP_RESUMED
notifications are now emitted when the app is paused and resumed.OS.get_model_name()
now returns a value with the device name.signtool
on Windows and osslsigncode
on other platforms.OS.set_native_icon()
method to set an .ico
or .icns
window/taskbar icon at runtime._NET_WM_PID
window attribute, so that external programs can easily access it.MONO_ENV_OPTIONS
environment variable.mono/unhandled_exception_policy
project setting to keep running after an unhandled exception.call_deferred()
).assert()
in GDScript must now always be used with parentheses.
assert(true)
is still valid, but assert true
isn't valid anymore.Camera.project_position()
now requires a second depth
argument to determine the distance of the point from the camera.
near
property value as the second argument.Skeleton.set_bone_global_pose()
was replaced by Skeleton.set_bone_global_pose_override()
.set_broadcast_enabled(true)
on the PacketPeerUDP instance./
, the whole path will be used to match the search them. Otherwise, only the last path component will be searched in.folder_icon_modulate
constant, making them easier to distinguish from files.
far
value (0..100).
Viewport.size_override_stretch
is now exposed as a property (rather than just setter/getter methods).rotation_degrees
range in various nodes to -360..360 to be easier to adjust using the slider.
#ffffff
, matching the default Label color for better consistency.2 + 2
in a SpinBox then pressing Enter will result in 4
.EditorInterface.get_current_path()
to get the full path currently displayed in the FileSystem dock in an editor plugin.Vector2(Vector2(12, 34))
, which may be useful to simplify code in some cases.weakref(null)
is now allowed in GDScript.
if my_ref.get_ref()
is now sufficient (no need for if my_ref and my_ref.get_ref()
).Image.save_exr()
to save an image in EXR format, which supports high bit depths.compatibility_mode
property can be used to restore the previous behavior.null
instead of self
.class_name
as it wasn't working properly.substr()
is now optional and defaults to -1
.#
character.custom_template
property in each export preset to store the path to the custom export template (instead of custom_package
for some platforms).trans_type
and ease_type
arguments are now optional, defaulting to TRANS_LINEAR
and EASE_IN_OUT
respectively.PCKPacker.pck_start()
and PCKPacker.flush()
's alignment
and verbose
arguments (respectively) are now optional, defaulting to 0
and false
.--export-pack
command-line argument.
platform=<platform>
is no longer required when compiling for the host platform.platform=list
can be used to list the supported target platforms.OS.set_window_postion()
now takes window decorations into account.panelf
and panelnc
styles.vec2 test2 = vec2(0.0, 1.0); vec3 test3 = test2.xxx;
now works as in GLSL.AMBIENT_LIGHT_DISABLED
and SHADOWS_DISABLED
flags now work when using the GLES2 renderer.highp
precision by default.
check_vadjust
custom constant to adjust the icon Y position as intended.class_name
that has the same name as a singleton will now display a clearer error message.script
is no longer allowed as a member variable name in GDScript, as that conflicts with the internal script
property used by Object.a[function()] += 1
will no longer evaluate function()
twice.Font.draw_char()
now draws the font outline as well (if the base font has one).low_processor_mode_sleep_usec
project setting no longer affects the editor.self
and object types can now be indexed as a dictionary again (like in Godot 3.0 and prior).to_lower()
conversion with Cyrillic characters.[
or (
.
$"
or $'
.FLIP_Y
and FLIP_Z
constants now work as expected..scn
, .tscn
or .escn
.
--foo bar
now works, not just --foo=bar
).--audio-driver
and --video-driver
command-line arguments are now validated; an error message will be printed if an invalid value is passed.--check-only
command-line argument now returns a non-zero exit code if an invalid script is passed using --script
.adb
and will debug using Wi-Fi in this case.OS.get_system_time_msec()
now returns the correct value like on other platforms.OS.get_system_dir()
now works correctly.
OS.get_real_window_size()
and OS.set_window_size()
are now handled correctly on hiDPI displays.OS.get_window_position()
now returns absolute coordinates.OS.set_window_maximized()
now gives up after 0.5 seconds.
return
statement,class_name
to register scripts as classes.server
platform is back as it was in Godot 2.1.
min()
and max()
to return the smallest and largest value respectively.get(key[, default])
where default
is returned if the key does not exist.print_tree_pretty()
to print a graphical view of the scene tree.trim_prefix()
, trim_suffix()
, lstrip()
, rstrip()
.get_system_time_msecs()
: Return the system time with milliseconds.get_audio_driver_name()
and get_audio_driver_count()
to query audio driver information.get_video_driver_count()
and get_video_driver_name()
to query renderer information.center_window()
: Center the window on the screen.move_window_to_foreground()
: Move the window to the foreground.set_no_delay()
to enable the TCP_NODELAY
option.remove_control_from_container()
.radians()
degrees()
asinh()
acosh()
atanh()
exp2()
log2()
roundEven()
--build-solutions
: Build C# solutions without starting the editor.--print-fps
: Display frames per second to standard output.--quit
: Quit the engine after the first main loop iteration..escn
scenes has been added for use with the new Blender exporter.popup_closed
signal for ColorPickerButton
.SceneTree.multiplayer_api
/SceneTree.custom_multiplayer_api
), can now be extended.Input.set_default_cursor_shape()
to change the default shape in the viewport.PopupMenu
s.TileMode
is now exposed to GDScript.OS.get_ticks_usec()
is now exposed to GDScript.SurfaceTool
.GROW_DIRECTION_BOTH
for Controls.Image.bumpmap_to_normalmap()
to convert bump maps to normal maps.File.get_path()
and File.get_path_absolute()
.editor
and standalone
feature tags to check whether the project is running from an editor or non-editor binary.android_add_asset_dir("...")
method to Android module Gradle build configuration.is
GDScript keyword can now be used to compare a value against built-in types.export(int) var a
will be initialized to 0
.enum Name { VALUE }
must now be accessed with Name.VALUE
instead of VALUE
.preload()
are no longer allowed.
load()
should be used in at least one of the scripts instead.switch
, case
and do
are no longer reserved identifiers in GDScript.OS.alert()
now uses Zenity or KDialog if available instead of xmessage.mscorlib.dll
with Godot to improve portability.move_and_slide()
now behaves differently at low velocities, which makes it function as originally intended.animation_finished
signal is now triggered at the end of the animation, instead of as soon as the last frame displays.libgcc_s
and libstdc++
are now linked statically for better Linux binary portability.force_fps
in the Project Settings is no longer applied to the editor.
code-oss
, making detection more reliable.-ffast-math
flag is no longer used when compiling Godot, resulting in increased floating-point determinism.apply_torque_impulse()
and deprecate the misspelled method.\n
and \t
are now recognized in CSV translation files.v
member now correctly sets the s
member.[Signal]
attribute)..import
directory, making distribution and versioning easier.match
keyword.$
shorthand for get_node()
.1_000_000
)..dmg
disk image if exporting from an editor running on macOS.
rcedit
(requires WINE if exporting from Linux or macOS).use_lto=yes
to the SCons command line.
.zip
archives are automatically created when compiling HTML5 export templates.engine.cfg
to project.godot
.
.godot
files.OS
singleton were moved to the new Engine
singleton.colored=yes
→ verbose=no
).opacity
and self_opacity
are replaced by modulate
and self_modulate
in all 2D nodes, allowing for full color changes in addition to opacity changes.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。