Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
* Add constructors to EngineResourceData and UnityPackageData
* Make UnityPackageData.Assets a dictionary
  • Loading branch information
ds5678 committed Jan 16, 2024
1 parent c009d0c commit c34f744
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<Authors>ds5678</Authors>
<Company>AssetRipper</Company>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<PackageId>AssetRipper.Mining.PredefinedAssets</PackageId>
<PackageTags>C# Unity</PackageTags>
Expand Down
4 changes: 4 additions & 0 deletions AssetRipper.Mining.PredefinedAssets/EngineResourceData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ namespace AssetRipper.Mining.PredefinedAssets;

public readonly record struct EngineResourceData(Dictionary<long, Object> DefaultResources, Dictionary<long, Object> ExtraResources)
{
public EngineResourceData() : this(new(), new())
{
}

public readonly string ToJson()
{
return JsonSerializer.Serialize(this, InternalSerializerContext.Default.EngineResourceData);
Expand Down
10 changes: 9 additions & 1 deletion AssetRipper.Mining.PredefinedAssets/UnityPackageData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@ public readonly record struct UnityPackageData(
bool UsedInPackageJson,
Dictionary<string, UnityGuid> Assemblies,
Dictionary<string, Dictionary<string, UnityGuid>> Scripts,
KeyValuePair<Object, UnityGuid>[] Assets)
Dictionary<Object, UnityGuid> 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);
Expand Down

0 comments on commit c34f744

Please sign in to comment.