diff --git a/src/SpaceWarp.Core/API/SaveGameManager/ModSaves.cs b/src/SpaceWarp.Core/API/SaveGameManager/ModSaves.cs
index 432a134..d1204c2 100644
--- a/src/SpaceWarp.Core/API/SaveGameManager/ModSaves.cs
+++ b/src/SpaceWarp.Core/API/SaveGameManager/ModSaves.cs
@@ -20,7 +20,7 @@ public static class ModSaves
/// Function that will execute when a LOAD event is triggered. Defaults to null or no callback.
/// Your object that will be saved to a save file during a save event and that will be updated when a load event pulls new data. Ensure that a new instance of this object is NOT created after registration.
/// T saveData object you passed as a parameter, or a default instance of object T if you didn't pass anything
- public static T RegisterSaveLoadGameData(string modGuid, Action onSave = null, Action onLoad = null, T saveData = default)
+ public static T RegisterSaveLoadGameData(string modGuid, Action onSave = null, Action onLoad = null, T saveData = default) where T : class
{
// Check if this GUID is already registered
if (InternalPluginSaveData.Find(p => p.ModGuid == modGuid) != null)
@@ -73,7 +73,7 @@ public static void UnRegisterSaveLoadGameData(string modGuid)
/// Function that will execute when a LOAD event is triggered. Defaults to null or no callback.
/// Your object that will be saved to a save file during a save event and that will be updated when a load event pulls new data. Ensure that a new instance of this object is NOT created after registration.
/// T saveData object you passed as a parameter, or a default instance of object T if you didn't pass anything
- public static T ReregisterSaveLoadGameData(string modGuid, Action onSave = null, Action onLoad = null, T saveData = default(T))
+ public static T ReregisterSaveLoadGameData(string modGuid, Action onSave = null, Action onLoad = null, T saveData = default(T)) where T : class
{
UnRegisterSaveLoadGameData(modGuid);
return RegisterSaveLoadGameData(modGuid, onSave, onLoad, saveData);