Skip to content

Commit

Permalink
enable streaming for texture assets
Browse files Browse the repository at this point in the history
  • Loading branch information
ASpoonPlaysGames committed May 28, 2023
1 parent a4264d9 commit f716ee0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Advocate/Conversion/JSON/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ internal class Map
[JsonPropertyName("name")]
public string Name { get; init; }

[JsonPropertyName("starpakPath")]
public string StarpakPath { get; init; }

[JsonPropertyName("assetsDir")]
public string AssetsDir { get; init; }

Expand All @@ -31,14 +34,15 @@ public Map(string name, string assetsDir, string outputDir)
Name = name;
AssetsDir = assetsDir;
OutputDir = outputDir;
StarpakPath = $"{name}.starpak";
}

public void AddTextureAsset(string path, string? starpakPath = null)
public void AddTextureAsset(string path, bool disableStreaming = false)
{
TextureAsset asset = new() { Path = path, DisableStreaming = starpakPath == null };
TextureAsset asset = new() { Path = path, DisableStreaming = disableStreaming };
Files.Add(asset);
}
}
}

internal class TextureAsset
{
Expand Down

0 comments on commit f716ee0

Please sign in to comment.