diff --git a/AssetRipper.Mining.PredefinedAssets/AssetRipper.Mining.PredefinedAssets.csproj b/AssetRipper.Mining.PredefinedAssets/AssetRipper.Mining.PredefinedAssets.csproj index f028877..aceb12b 100644 --- a/AssetRipper.Mining.PredefinedAssets/AssetRipper.Mining.PredefinedAssets.csproj +++ b/AssetRipper.Mining.PredefinedAssets/AssetRipper.Mining.PredefinedAssets.csproj @@ -9,7 +9,7 @@ true ds5678 AssetRipper - 1.0.2 + 1.0.3 $(Version) AssetRipper.Mining.PredefinedAssets C# Unity diff --git a/AssetRipper.Mining.PredefinedAssets/EngineResourceData.cs b/AssetRipper.Mining.PredefinedAssets/EngineResourceData.cs index c34b0d5..2c415b0 100644 --- a/AssetRipper.Mining.PredefinedAssets/EngineResourceData.cs +++ b/AssetRipper.Mining.PredefinedAssets/EngineResourceData.cs @@ -4,6 +4,10 @@ namespace AssetRipper.Mining.PredefinedAssets; public readonly record struct EngineResourceData(Dictionary DefaultResources, Dictionary ExtraResources) { + public EngineResourceData() : this(new(), new()) + { + } + public readonly string ToJson() { return JsonSerializer.Serialize(this, InternalSerializerContext.Default.EngineResourceData); diff --git a/AssetRipper.Mining.PredefinedAssets/UnityPackageData.cs b/AssetRipper.Mining.PredefinedAssets/UnityPackageData.cs index 9bbbcc5..876a780 100644 --- a/AssetRipper.Mining.PredefinedAssets/UnityPackageData.cs +++ b/AssetRipper.Mining.PredefinedAssets/UnityPackageData.cs @@ -21,8 +21,16 @@ public readonly record struct UnityPackageData( bool UsedInPackageJson, Dictionary Assemblies, Dictionary> Scripts, - KeyValuePair[] Assets) + Dictionary Assets) { + public UnityPackageData(string name, string version, bool usedInPackageJson) : this(name, version, usedInPackageJson, new(), new(), new()) + { + } + + public UnityPackageData(string name, string version = "") : this(name, version, string.IsNullOrEmpty(version)) + { + } + public readonly string ToJson() { return JsonSerializer.Serialize(this, InternalSerializerContext.Default.UnityPackageData);