summaryrefslogtreecommitdiff
path: root/addons/gut/get_native_script.gd
diff options
context:
space:
mode:
Diffstat (limited to 'addons/gut/get_native_script.gd')
-rw-r--r--addons/gut/get_native_script.gd6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/gut/get_native_script.gd b/addons/gut/get_native_script.gd
new file mode 100644
index 0000000..7055fc3
--- /dev/null
+++ b/addons/gut/get_native_script.gd
@@ -0,0 +1,6 @@
+# Since NativeScript does not exist if GDNative is not included in the build
+# of Godot this script is conditionally loaded only when NativeScript exists.
+# You can then get a reference to NativeScript for use in `is` checks by calling
+# get_it.
+static func get_it():
+ return NativeScript