28 {
29 if (string.IsNullOrWhiteSpace(actingConfigClass))
30 {
31 IuvoDebug.DebugLogError("Acting config class name cannot be null or empty.");
32 return null;
33 }
34
35 if (string.IsNullOrWhiteSpace(objectToSerializeName))
36 {
37 IuvoDebug.DebugLogError("Object to serialize name cannot be null or empty.");
38 return null;
39 }
40
41 if (string.Compare(parentConfigClass, "BaseConfig", true) == 0)
42 {
43 IuvoDebug.DebugLogWarning("Parent config class is set to BaseConfig. Consider using a more specific parent class.");
44 }
45
46 string filePath = Path.Combine(Application.persistentDataPath, "Configurations" ,parentConfigClass, actingConfigClass, objectToSerializeName + ".json");
47 Directory.CreateDirectory(Path.GetDirectoryName(filePath));
48 return filePath;
49 }