summaryrefslogtreecommitdiff
path: root/addons/gut/get_native_script.gd
diff options
context:
space:
mode:
authorSophia Pearson <codergal89@gmail.com>2022-05-20 00:45:25 +0200
committerSophia Pearson <codergal89@gmail.com>2022-05-20 18:56:04 +0200
commit05d29ccce1898ed89c0b650c77242c2fa2805128 (patch)
treee8ee3bcb570fa6f3d9d96273c2bf4d4c8618d08b /addons/gut/get_native_script.gd
downloadtexty-05d29ccce1898ed89c0b650c77242c2fa2805128.tar.xz
texty-05d29ccce1898ed89c0b650c77242c2fa2805128.zip
texty: initial commit
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