mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update SahderVariantCollect
Update SahderVariantCollect
This commit is contained in:
@@ -25,7 +25,7 @@ public class ShaderVariantCollectionManifest
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ShaderVariantInfo
|
public class ShaderVariantInfo : IComparable<ShaderVariantInfo>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 着色器资源路径.
|
/// 着色器资源路径.
|
||||||
@@ -46,6 +46,13 @@ public class ShaderVariantCollectionManifest
|
|||||||
/// 着色器变种列表
|
/// 着色器变种列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ShaderVariantElement> ShaderVariantElements = new List<ShaderVariantElement>(1000);
|
public List<ShaderVariantElement> ShaderVariantElements = new List<ShaderVariantElement>(1000);
|
||||||
|
|
||||||
|
public int CompareTo(ShaderVariantInfo other)
|
||||||
|
{
|
||||||
|
string thisStr = AssetPath + "+" +ShaderName;
|
||||||
|
string otherStr = other.AssetPath + "+" + other.ShaderName;
|
||||||
|
return thisStr.CompareTo(otherStr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -141,6 +148,8 @@ public class ShaderVariantCollectionManifest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重新排序
|
||||||
|
manifest.ShaderVariantInfos.Sort();
|
||||||
return manifest;
|
return manifest;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -22,7 +22,7 @@ public static class ShaderVariantCollector
|
|||||||
}
|
}
|
||||||
|
|
||||||
private const float WaitMilliseconds = 1000f;
|
private const float WaitMilliseconds = 1000f;
|
||||||
private const float SleepMilliseconds = 100f;
|
private const float SleepMilliseconds = 2000f;
|
||||||
private static string _savePath;
|
private static string _savePath;
|
||||||
private static string _packageName;
|
private static string _packageName;
|
||||||
private static int _processMaxNum;
|
private static int _processMaxNum;
|
||||||
|
Reference in New Issue
Block a user