diff --git a/SHADE_Managed/src/Scripts/Script.cxx b/SHADE_Managed/src/Scripts/Script.cxx
index 2ee7dbf7..294f4096 100644
--- a/SHADE_Managed/src/Scripts/Script.cxx
+++ b/SHADE_Managed/src/Scripts/Script.cxx
@@ -258,6 +258,14 @@ namespace SHADE
Script::Script()
: OnGizmosDrawOverriden { false }
{}
+
+ /*---------------------------------------------------------------------------------*/
+ /* Manipulation Functions */
+ /*---------------------------------------------------------------------------------*/
+ void Script::SetEnabledWithoutEvents(bool enable)
+ {
+ enabled = enable;
+ }
/*---------------------------------------------------------------------------------*/
/* Virtual "All-Time" Lifecycle Functions */
diff --git a/SHADE_Managed/src/Scripts/Script.hxx b/SHADE_Managed/src/Scripts/Script.hxx
index 62c5015c..8fc36544 100644
--- a/SHADE_Managed/src/Scripts/Script.hxx
+++ b/SHADE_Managed/src/Scripts/Script.hxx
@@ -326,6 +326,15 @@ namespace SHADE
/// Information on the collision event.
void OnTriggerExit(CollisionInfo collision);
+ /*-----------------------------------------------------------------------------*/
+ /* Manipulation Functions */
+ /*-----------------------------------------------------------------------------*/
+ ///
+ /// Function to set the enabled state of this script without triggering events.
+ ///
+ /// Whether to enable or disable the script.
+ void SetEnabledWithoutEvents(bool enable);
+
protected:
/*-----------------------------------------------------------------------------*/
/* Constructors */
diff --git a/SHADE_Managed/src/Scripts/ScriptStore.cxx b/SHADE_Managed/src/Scripts/ScriptStore.cxx
index 96eb7361..d3d989cc 100644
--- a/SHADE_Managed/src/Scripts/ScriptStore.cxx
+++ b/SHADE_Managed/src/Scripts/ScriptStore.cxx
@@ -744,7 +744,7 @@ namespace SHADE
for (YAML::Node& node : *yamlNode)
{
// Get the name of the script
- if (!node["Type"])
+ if (!node["Type"].IsDefined())
{
Debug::LogWarning("[ScriptStore] Script with no type detected, skipping.");
continue;
diff --git a/SHADE_Managed/src/Serialisation/SerialisationUtilities.cxx b/SHADE_Managed/src/Serialisation/SerialisationUtilities.cxx
index 8a36613c..2bf05bc5 100644
--- a/SHADE_Managed/src/Serialisation/SerialisationUtilities.cxx
+++ b/SHADE_Managed/src/Serialisation/SerialisationUtilities.cxx
@@ -21,11 +21,13 @@ of DigiPen Institute of Technology is prohibited.
#include "Assets/FontAsset.hxx"
#include "Assets/MaterialAsset.hxx"
#include "Assets/MeshAsset.hxx"
+#include "Scripts/Script.hxx"
/*-------------------------------------------------------------------------------------*/
/* File-Level Constants */
/*-------------------------------------------------------------------------------------*/
static const std::string_view SCRIPT_TYPE_YAMLTAG = "Type";
+static const std::string_view SCRIPT_ENABLED_YAMLTAG = "Enabled";
/*-------------------------------------------------------------------------------------*/
/* Function Definitions */
@@ -39,10 +41,19 @@ namespace SHADE
{
using namespace System::Reflection;
+ // Obtain script
+ Script^ script = safe_cast