mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 16:00:08 +01:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user