- [Core] Added shader flags.
This commit is contained in:
@@ -690,7 +690,10 @@ namespace AssetStudio
|
||||
{
|
||||
sb.Append($"[{m_Attribute}] ");
|
||||
}
|
||||
//TODO Flag
|
||||
foreach (var flag in Enum.GetValues<SerializedPropertyFlag>().Where(x => m_Prop.m_Flags.HasFlag(x)))
|
||||
{
|
||||
sb.Append($"[{flag}] ");
|
||||
}
|
||||
sb.Append($"{m_Prop.m_Name} (\"{m_Prop.m_Description}\", ");
|
||||
switch (m_Prop.m_Type)
|
||||
{
|
||||
|
||||
@@ -89,13 +89,27 @@ namespace AssetStudio
|
||||
Int = 5
|
||||
};
|
||||
|
||||
[Flags]
|
||||
public enum SerializedPropertyFlag
|
||||
{
|
||||
HideInInspector = 1 << 0,
|
||||
PerRendererData = 1 << 1,
|
||||
NoScaleOffset = 1 << 2,
|
||||
Normal = 1 << 3,
|
||||
HDR = 1 << 4,
|
||||
Gamma = 1 << 5,
|
||||
NonModifiableTextureData = 1 << 6,
|
||||
MainTexture = 1 << 7,
|
||||
MainColor = 1 << 8,
|
||||
}
|
||||
|
||||
public class SerializedProperty
|
||||
{
|
||||
public string m_Name;
|
||||
public string m_Description;
|
||||
public string[] m_Attributes;
|
||||
public SerializedPropertyType m_Type;
|
||||
public uint m_Flags;
|
||||
public SerializedPropertyFlag m_Flags;
|
||||
public float[] m_DefValue;
|
||||
public SerializedTextureProperty m_DefTexture;
|
||||
|
||||
@@ -105,7 +119,7 @@ namespace AssetStudio
|
||||
m_Description = reader.ReadAlignedString();
|
||||
m_Attributes = reader.ReadStringArray();
|
||||
m_Type = (SerializedPropertyType)reader.ReadInt32();
|
||||
m_Flags = reader.ReadUInt32();
|
||||
m_Flags = (SerializedPropertyFlag)reader.ReadUInt32();
|
||||
m_DefValue = reader.ReadSingleArray(4);
|
||||
m_DefTexture = new SerializedTextureProperty(reader);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user