summaryrefslogtreecommitdiff
path: root/modules/mono/editor/script_templates
diff options
context:
space:
mode:
authorJonathan Nicholl <jonathantnicholl@gmail.com>2022-05-28 00:09:41 -0400
committerJonathan Nicholl <jonathantnicholl@gmail.com>2022-06-15 12:41:37 -0400
commit912d8e23ca4d01e242eda386e420175329113d5b (patch)
tree960e22ca0a24e8f4a4555c6adb045404d6ba1b10 /modules/mono/editor/script_templates
parent1f690f197a4fb0809afb2f59bf78e4d3d89fd847 (diff)
Add script templates for EditorScenePostImport
Diffstat (limited to 'modules/mono/editor/script_templates')
-rw-r--r--modules/mono/editor/script_templates/EditorScenePostImport/basic_import_script.cs18
-rw-r--r--modules/mono/editor/script_templates/EditorScenePostImport/no_comments.cs15
2 files changed, 33 insertions, 0 deletions
diff --git a/modules/mono/editor/script_templates/EditorScenePostImport/basic_import_script.cs b/modules/mono/editor/script_templates/EditorScenePostImport/basic_import_script.cs
new file mode 100644
index 0000000000..0690205d01
--- /dev/null
+++ b/modules/mono/editor/script_templates/EditorScenePostImport/basic_import_script.cs
@@ -0,0 +1,18 @@
+// meta-description: Basic import script template
+
+#if TOOLS
+using _BINDINGS_NAMESPACE_;
+using System;
+
+[Tool]
+public partial class _CLASS_ : _BASE_
+{
+ public override Object _PostImport(Node scene)
+ {
+ // Modify the contents of the scene upon import. For example, setting up LODs:
+// scene.GetNode<MeshInstance3D>("HighPolyMesh").DrawDistanceEnd = 5.0
+// scene.GetNode<MeshInstance3D>("LowPolyMesh").DrawDistanceBegin = 5.0
+ 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
new file mode 100644
index 0000000000..4e2d9b7088
--- /dev/null
+++ b/modules/mono/editor/script_templates/EditorScenePostImport/no_comments.cs
@@ -0,0 +1,15 @@
+// meta-description: Basic import script template (no comments)
+
+#if TOOLS
+using _BINDINGS_NAMESPACE_;
+using System;
+
+[Tool]
+public partial class _CLASS_ : _BASE_
+{
+ public override Object _PostImport(Node scene)
+ {
+ return scene
+ }
+}
+#endif