Remove old and unused project settings, update various demos for 4.2 (#1024)

- Move all demo projects that don't require Forward+/Mobile-only features
  to the Compatibility rendering method. This improves performance significantly
  on low-end devices and ensures visuals are identical to a web export
  of the demo.
- Set deadzone on all inputs to 0.2 for better gamepad usability.
- Remove reliance on `default_env.tres` to use built-in Environment
  resources in the main scene instead (which follows the preview environment
  workflow).
- Remove notices pointing to GDNative or VisualScript, since both were
  removed in 4.0.
- Various bug fixes and usability tweaks to 10+ demos.
This commit is contained in:
Hugo Locurcio
2024-03-26 18:01:58 +01:00
committed by GitHub
parent 82913393a8
commit 31d1c0c112
266 changed files with 1619 additions and 1829 deletions

View File

@@ -16,27 +16,27 @@ func _ready():
func save_pressed():
get_node(^"SaveMaterialDialog").popup_centered()
get_node(^"SaveMaterialDialog").popup_centered_ratio()
func load_pressed():
get_node(^"LoadMaterialDialog").popup_centered()
get_node(^"LoadMaterialDialog").popup_centered_ratio()
func apply_pressed():
# Using the passed in editor interface, get the selected nodes in the editor.
var editor_selection = editor_interface.get_selection()
var selected_nodes = editor_selection.get_selected_nodes()
if selected_nodes.size() == 0:
printerr("Material Creator: Can't apply the material, because there are no nodes selected!")
if selected_nodes.is_empty():
push_error("Material Creator: Can't apply the material, because there are no nodes selected!")
var material = _silly_resource_from_values().make_material()
# Go through the selected nodes and see if they have the "set_surface_material"
# Go through the selected nodes and see if they have the "set_surface_override_material"
# function (which only MeshInstance3D has by default). If they do, then set the material
# to the silly material.
for node in selected_nodes:
if node.has_method("set_surface_material"):
node.set_surface_material(0, material)
if node.has_method("set_surface_override_material"):
node.set_surface_override_material(0, material)
func save_file_selected(path):