|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[SerializeField] |
|
|
|
private int m_LastShaderHash; |
|
|
|
private string m_LastShader; |
|
|
|
|
|
|
|
[SerializeField] |
|
|
|
private Shader m_PreviewShader; |
|
|
|
|
|
|
m_PreviewShader = ShaderUtil.CreateShaderAsset(resultShader); |
|
|
|
m_PreviewShader.hideFlags = HideFlags.HideInHierarchy; |
|
|
|
AssetDatabase.AddObjectToAsset(m_PreviewShader, this); |
|
|
|
m_LastShaderHash = resultShader.GetHashCode(); |
|
|
|
m_LastShader = resultShader; |
|
|
|
if (hash != m_LastShaderHash) |
|
|
|
if (string.CompareOrdinal(resultShader, m_LastShader) != 0) |
|
|
|
m_LastShaderHash = hash; |
|
|
|
m_LastShader = resultShader; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|