diff --git a/GlitchyEngine/src/Scripting/ScriptGlue.bf b/GlitchyEngine/src/Scripting/ScriptGlue.bf
index 69c50cf..9a44790 100644
--- a/GlitchyEngine/src/Scripting/ScriptGlue.bf
+++ b/GlitchyEngine/src/Scripting/ScriptGlue.bf
@@ -468,6 +468,12 @@ static class ScriptGlue
}
#endregion
+
+ [RegisterCall("ScriptGlue::UUID_CreateNew")]
+ static void UUID_Create(out UUID id)
+ {
+ id = UUID.Create();
+ }
#region Editor Stuff
diff --git a/ScriptCore/Core/Application.cs b/ScriptCore/Core/Application.cs
new file mode 100644
index 0000000..44fc5b2
--- /dev/null
+++ b/ScriptCore/Core/Application.cs
@@ -0,0 +1,15 @@
+namespace GlitchyEngine.Core;
+
+public class Application
+{
+ ///
+ /// Returns true when the script is running in edit mode.
+ ///
+ ///
+ public bool IsEditor = false;
+ ///
+ /// Returns true when the script is running in play mode or in the player.
+ ///
+ ///
+ public bool IsPlaying = false;
+}
diff --git a/ScriptCore/Core/UUID.cs b/ScriptCore/Core/UUID.cs
index 235fc10..ec92ab3 100644
--- a/ScriptCore/Core/UUID.cs
+++ b/ScriptCore/Core/UUID.cs
@@ -14,6 +14,12 @@ public struct UUID
public static UUID Zero = new UUID(0);
+ public static UUID CreateNew()
+ {
+ ScriptGlue.UUID_CreateNew(out UUID id);
+ return id;
+ }
+
public static bool operator ==(UUID left, UUID right) => left._uuid == right._uuid;
public static bool operator !=(UUID left, UUID right) => left._uuid != right._uuid;
diff --git a/ScriptCore/ScriptGlue.cs b/ScriptCore/ScriptGlue.cs
index aa15ebd..7b0c4a4 100644
--- a/ScriptCore/ScriptGlue.cs
+++ b/ScriptCore/ScriptGlue.cs
@@ -115,5 +115,19 @@ internal static class ScriptGlue
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern float4 modf_float4(float4 x, out float4 integerPart);
+#endregion
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ internal static extern void UUID_CreateNew(out UUID uuid);
+
+#region Application
+
+// TODO: Implement IsEditor and IsPlaying
+ //[MethodImpl(MethodImplOptions.InternalCall)]
+ //internal static extern bool Application_IsEditor();
+
+ //[MethodImpl(MethodImplOptions.InternalCall)]
+ //internal static extern bool Application_IsPlaying();
+
#endregion
}