diff options
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/SCsub | 3 | ||||
-rw-r--r-- | modules/mono/csharp_script.cpp | 6 | ||||
-rw-r--r-- | modules/mono/csharp_script.h | 4 | ||||
-rw-r--r-- | modules/mono/editor/script_templates/CharacterBody2D/basic_movement.cs (renamed from modules/mono/editor_templates/CharacterBody2D/basic_movement.cs) | 0 | ||||
-rw-r--r-- | modules/mono/editor/script_templates/CharacterBody3D/basic_movement.cs (renamed from modules/mono/editor_templates/CharacterBody3D/basic_movement.cs) | 0 | ||||
-rw-r--r-- | modules/mono/editor/script_templates/EditorPlugin/plugin.cs (renamed from modules/mono/editor_templates/EditorPlugin/plugin.cs) | 1 | ||||
-rw-r--r-- | modules/mono/editor/script_templates/EditorScript/basic_editor_script.cs (renamed from modules/mono/editor_templates/EditorScript/basic_editor_script.cs) | 3 | ||||
-rw-r--r-- | modules/mono/editor/script_templates/Node/default.cs (renamed from modules/mono/editor_templates/Node/default.cs) | 2 | ||||
-rw-r--r-- | modules/mono/editor/script_templates/Object/empty.cs (renamed from modules/mono/editor_templates/Object/empty.cs) | 1 | ||||
-rw-r--r-- | modules/mono/editor/script_templates/SCsub (renamed from modules/mono/editor_templates/SCsub) | 0 | ||||
-rw-r--r-- | modules/mono/editor/script_templates/VisualShaderNodeCustom/basic.cs (renamed from modules/mono/editor_templates/VisualShaderNodeCustom/basic.cs) | 0 |
11 files changed, 10 insertions, 10 deletions
diff --git a/modules/mono/SCsub b/modules/mono/SCsub index db35e804aa..3bafa351a9 100644 --- a/modules/mono/SCsub +++ b/modules/mono/SCsub @@ -63,5 +63,4 @@ elif env["platform"] == "android": if env["tools"]: env_mono.add_source_files(env.modules_sources, "editor/*.cpp") - -SConscript("editor_templates/SCsub") + SConscript("editor/script_templates/SCsub") diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 7ed0422236..0953bde9bb 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -45,17 +45,17 @@ #ifdef TOOLS_ENABLED #include "core/os/keyboard.h" #include "editor/bindings_generator.h" +#include "editor/editor_internal_calls.h" #include "editor/editor_node.h" #include "editor/editor_settings.h" #include "editor/node_dock.h" +#include "editor/script_templates/templates.gen.h" #endif #ifdef DEBUG_METHODS_ENABLED #include "class_db_api_json.h" #endif -#include "editor/editor_internal_calls.h" -#include "editor_templates/templates.gen.h" #include "godotsharp_dirs.h" #include "mono_gd/gd_mono_cache.h" #include "mono_gd/gd_mono_class.h" @@ -373,11 +373,13 @@ Ref<Script> CSharpLanguage::make_template(const String &p_template, const String Vector<ScriptLanguage::ScriptTemplate> CSharpLanguage::get_built_in_templates(StringName p_object) { Vector<ScriptLanguage::ScriptTemplate> templates; +#ifdef TOOLS_ENABLED for (int i = 0; i < TEMPLATES_ARRAY_SIZE; i++) { if (TEMPLATES[i].inherit == p_object) { templates.append(TEMPLATES[i]); } } +#endif return templates; } diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index 3b97d2acc4..1e5f218c95 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -202,9 +202,9 @@ public: void set_source_code(const String &p_code) override; #ifdef TOOLS_ENABLED - virtual const Vector<DocData::ClassDoc> &get_documentation() const override { + virtual Vector<DocData::ClassDoc> get_documentation() const override { // TODO - static Vector<DocData::ClassDoc> docs; + Vector<DocData::ClassDoc> docs; return docs; } #endif // TOOLS_ENABLED diff --git a/modules/mono/editor_templates/CharacterBody2D/basic_movement.cs b/modules/mono/editor/script_templates/CharacterBody2D/basic_movement.cs index 2ca81ab7cd..2ca81ab7cd 100644 --- a/modules/mono/editor_templates/CharacterBody2D/basic_movement.cs +++ b/modules/mono/editor/script_templates/CharacterBody2D/basic_movement.cs diff --git a/modules/mono/editor_templates/CharacterBody3D/basic_movement.cs b/modules/mono/editor/script_templates/CharacterBody3D/basic_movement.cs index a6935fe497..a6935fe497 100644 --- a/modules/mono/editor_templates/CharacterBody3D/basic_movement.cs +++ b/modules/mono/editor/script_templates/CharacterBody3D/basic_movement.cs diff --git a/modules/mono/editor_templates/EditorPlugin/plugin.cs b/modules/mono/editor/script_templates/EditorPlugin/plugin.cs index 6e6a799be6..eba5fd12a4 100644 --- a/modules/mono/editor_templates/EditorPlugin/plugin.cs +++ b/modules/mono/editor/script_templates/EditorPlugin/plugin.cs @@ -1,4 +1,5 @@ // meta-description: Basic plugin template + #if TOOLS using _BINDINGS_NAMESPACE_; using System; diff --git a/modules/mono/editor_templates/EditorScript/basic_editor_script.cs b/modules/mono/editor/script_templates/EditorScript/basic_editor_script.cs index 2088822890..1b347edc1c 100644 --- a/modules/mono/editor_templates/EditorScript/basic_editor_script.cs +++ b/modules/mono/editor/script_templates/EditorScript/basic_editor_script.cs @@ -1,4 +1,5 @@ // meta-description: Basic editor script template + #if TOOLS using _BINDINGS_NAMESPACE_; using System; @@ -6,9 +7,9 @@ using System; [Tool] public partial class _CLASS_ : _BASE_ { + // Called when the script is executed (using File -> Run in Script Editor). public override void _Run() { - // Called when the script is executed (using File -> Run in Script Editor). } } #endif diff --git a/modules/mono/editor_templates/Node/default.cs b/modules/mono/editor/script_templates/Node/default.cs index 73d69dd993..4c86d1666f 100644 --- a/modules/mono/editor_templates/Node/default.cs +++ b/modules/mono/editor/script_templates/Node/default.cs @@ -8,12 +8,10 @@ public partial class _CLASS_ : _BASE_ // Called when the node enters the scene tree for the first time. public override void _Ready() { - } // Called every frame. 'delta' is the elapsed time since the previous frame. public override void _Process(float delta) { - } } diff --git a/modules/mono/editor_templates/Object/empty.cs b/modules/mono/editor/script_templates/Object/empty.cs index e5bee64fe1..34526d514f 100644 --- a/modules/mono/editor_templates/Object/empty.cs +++ b/modules/mono/editor/script_templates/Object/empty.cs @@ -5,5 +5,4 @@ using System; public partial class _CLASS_ : _BASE_ { - } diff --git a/modules/mono/editor_templates/SCsub b/modules/mono/editor/script_templates/SCsub index 39f6cb5c01..39f6cb5c01 100644 --- a/modules/mono/editor_templates/SCsub +++ b/modules/mono/editor/script_templates/SCsub diff --git a/modules/mono/editor_templates/VisualShaderNodeCustom/basic.cs b/modules/mono/editor/script_templates/VisualShaderNodeCustom/basic.cs index a1b93e7daa..a1b93e7daa 100644 --- a/modules/mono/editor_templates/VisualShaderNodeCustom/basic.cs +++ b/modules/mono/editor/script_templates/VisualShaderNodeCustom/basic.cs |