Skip to content

Commit

Permalink
Strip CR
Browse files Browse the repository at this point in the history
  • Loading branch information
phuong-axie committed Oct 28, 2023
1 parent 5354228 commit ba4880b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ private static Dictionary<string, SplatAtlasStuff> LoadAxieAtlasStuff()
{
Dictionary<string, Texture2D> textures = new Dictionary<string, Texture2D>();
var atlasAsset = Resources.Load<TextAsset>($"{StuffName}/{quality}/axie-2d-v3-stuff");
string[] lines = atlasAsset.text.Split('\n').Where(x => x.Contains(".png")).Select(x => x.Replace(".png", "")).ToArray();
string atlasStr = atlasAsset.text;
atlasStr = atlasStr.Replace("\r", "");
string[] lines = atlasStr.Split('\n').Where(x => x.Contains(".png")).Select(x => x.Replace(".png", "")).ToArray();
foreach (var texName in lines)
{
var colorTexture = Resources.Load<Texture2D>($"{StuffName}/{quality}/{texName}_color");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ Dictionary<string, Material> baseMaterials
static List<Material> LoadMaterials(SplatAtlasStuff atlasStuff, Material baseMaterial)
{
List<Material> materials = new List<Material>();
string[] texList = atlasStuff.atlasAssetText.Split('\n').Where(x => x.Contains(".png")).Select(x => x.Replace(".png", "")).ToArray();
string atlasStr = atlasStuff.atlasAssetText;
atlasStr = atlasStr.Replace("\r", "");

string[] texList = atlasStr.Split('\n').Where(x => x.Contains(".png")).Select(x => x.Replace(".png", "")).ToArray();
foreach (var texName in texList)
{
var material = new Material(baseMaterial);
Expand Down

0 comments on commit ba4880b

Please sign in to comment.