mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-15 19:28:48 -05:00
Add option to dump material assets during model export
This commit is contained in:
@@ -89,6 +89,8 @@ namespace AssetStudio
|
||||
public sealed class Material : NamedObject
|
||||
{
|
||||
public PPtr<Shader> m_Shader;
|
||||
public string[] m_ValidKeywords;
|
||||
public string[] m_InvalidKeywords;
|
||||
public UnityPropertySheet m_SavedProperties;
|
||||
|
||||
public Material() { }
|
||||
@@ -97,6 +99,8 @@ namespace AssetStudio
|
||||
{
|
||||
var parsedMaterial = JsonSerializer.Deserialize<Material>(type, jsonOptions);
|
||||
m_Shader = parsedMaterial.m_Shader;
|
||||
m_ValidKeywords = parsedMaterial.m_ValidKeywords;
|
||||
m_InvalidKeywords = parsedMaterial.m_InvalidKeywords;
|
||||
m_SavedProperties = parsedMaterial.m_SavedProperties;
|
||||
}
|
||||
|
||||
@@ -111,8 +115,8 @@ namespace AssetStudio
|
||||
|
||||
if (version >= (2021, 2, 18)) //2021.2.18 and up
|
||||
{
|
||||
var m_ValidKeywords = reader.ReadStringArray();
|
||||
var m_InvalidKeywords = reader.ReadStringArray();
|
||||
m_ValidKeywords = reader.ReadStringArray();
|
||||
m_InvalidKeywords = reader.ReadStringArray();
|
||||
}
|
||||
else if (version >= 5) //5.0 - 2021.2.17
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user