Static variables in scripts are now reset when leaving play mode #351

Merged
Pycorax merged 7 commits from SP3-6-CSharpStaticReset into main 2023-02-20 11:12:09 +08:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 7d7ffc56fd - Show all commits

View File

@ -81,7 +81,8 @@ namespace SHADE
// Add the script // Add the script
Script^ script; Script^ script;
ScriptStore::AddScriptViaNameWithRef(entity, type->Name, script); ScriptStore::AddScriptViaNameWithRef(entity, type->Name, script);
registerUndoScriptAddAction(entity, script); // TODO: Re-enable when undo-redo is fixed
// registerUndoScriptAddAction(entity, script);
break; break;
} }
} }
@ -375,7 +376,8 @@ namespace SHADE
{ {
// Mark script for removal // Mark script for removal
ScriptStore::RemoveScript(entity, script); ScriptStore::RemoveScript(entity, script);
registerUndoScriptRemoveAction(entity, script, scriptIndex); // TODO: Re-enable when undo-redo is fixed
// registerUndoScriptRemoveAction(entity, script, scriptIndex);
} }
SHEditorUI::EndPopup(); SHEditorUI::EndPopup();
} }

View File

@ -91,8 +91,6 @@ namespace SHADE
emitter << node; emitter << node;
emitter << YAML::EndMap; emitter << YAML::EndMap;
return Convert::ToCLI(emitter.c_str()); return Convert::ToCLI(emitter.c_str());
/*std::string str = emitter.c_str();
return Convert::ToCLI(str.substr(2));*/
} }
void SerialisationUtilities::Deserialise(Object^ object, YAML::Node& yamlNode) void SerialisationUtilities::Deserialise(Object^ object, YAML::Node& yamlNode)