From 525b5e0e16372923a571f4c024f53398798c2e95 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Thu, 16 Jun 2022 17:21:47 +0200 Subject: Fix EditorScenePostImport templates for C# --- .../script_templates/EditorScenePostImport/basic_import_script.gd | 4 +--- .../script_templates/EditorScenePostImport/basic_import_script.cs | 8 +++----- .../editor/script_templates/EditorScenePostImport/no_comments.cs | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/modules/gdscript/editor/script_templates/EditorScenePostImport/basic_import_script.gd b/modules/gdscript/editor/script_templates/EditorScenePostImport/basic_import_script.gd index b4b2305b8c..556afe994b 100644 --- a/modules/gdscript/editor/script_templates/EditorScenePostImport/basic_import_script.gd +++ b/modules/gdscript/editor/script_templates/EditorScenePostImport/basic_import_script.gd @@ -5,7 +5,5 @@ extends EditorScenePostImport # Called by the editor when a scene has this script set as the import script in the import tab. func _post_import(scene: Node) -> Object: - # Modify the contents of the scene upon import. For example, setting up LODs: -# (scene.get_node(^"HighPolyMesh") as MeshInstance3D).draw_distance_end = 5.0 -# (scene.get_node(^"LowPolyMesh") as MeshInstance3D).draw_distance_begin = 5.0 + # Modify the contents of the scene upon import. return scene # Return the modified root node when you're done. diff --git a/modules/mono/editor/script_templates/EditorScenePostImport/basic_import_script.cs b/modules/mono/editor/script_templates/EditorScenePostImport/basic_import_script.cs index 0690205d01..9e1b7ef580 100644 --- a/modules/mono/editor/script_templates/EditorScenePostImport/basic_import_script.cs +++ b/modules/mono/editor/script_templates/EditorScenePostImport/basic_import_script.cs @@ -7,12 +7,10 @@ using System; [Tool] public partial class _CLASS_ : _BASE_ { - public override Object _PostImport(Node scene) + public override Godot.Object _PostImport(Node scene) { - // Modify the contents of the scene upon import. For example, setting up LODs: -// scene.GetNode("HighPolyMesh").DrawDistanceEnd = 5.0 -// scene.GetNode("LowPolyMesh").DrawDistanceBegin = 5.0 - return scene // Return the modified root node when you're done. + // Modify the contents of the scene upon import. + return scene; // Return the modified root node when you're done. } } #endif diff --git a/modules/mono/editor/script_templates/EditorScenePostImport/no_comments.cs b/modules/mono/editor/script_templates/EditorScenePostImport/no_comments.cs index 4e2d9b7088..bf2c9434e4 100644 --- a/modules/mono/editor/script_templates/EditorScenePostImport/no_comments.cs +++ b/modules/mono/editor/script_templates/EditorScenePostImport/no_comments.cs @@ -7,9 +7,9 @@ using System; [Tool] public partial class _CLASS_ : _BASE_ { - public override Object _PostImport(Node scene) + public override Godot.Object _PostImport(Node scene) { - return scene + return scene; } } #endif -- cgit v1.2.3