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
Script^ script;
ScriptStore::AddScriptViaNameWithRef(entity, type->Name, script);
registerUndoScriptAddAction(entity, script);
// TODO: Re-enable when undo-redo is fixed
// registerUndoScriptAddAction(entity, script);
break;
}
}
@ -374,8 +375,9 @@ namespace SHADE
if (SHEditorUI::Selectable("Delete Script", ICON_MD_DELETE))
{
// Mark script for removal
ScriptStore::RemoveScript(entity, script);
registerUndoScriptRemoveAction(entity, script, scriptIndex);
ScriptStore::RemoveScript(entity, script);
// TODO: Re-enable when undo-redo is fixed
// registerUndoScriptRemoveAction(entity, script, scriptIndex);
}
SHEditorUI::EndPopup();
}

View File

@ -91,8 +91,6 @@ namespace SHADE
emitter << node;
emitter << YAML::EndMap;
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)