コード例 #1
0
        private void OpenConfiguration()
        {
            m_CurrentPanelView = PanelView.Configuration;

            if (m_MainCacheMaterials == null || m_CurrentMeshACIndex < 0 || m_CurrentMeshACIndex >= m_MainCacheMaterials.Count)
            {
                return;
            }
            Material mat    = m_MainCacheMaterials[m_CurrentMeshACIndex];
            Shader   shader = mat.shader;

            if (ShaderMetaDataUtility.IsValidShader(shader))
            {
#pragma warning disable 0618
                // Data conversion between Polybrush Beta and Polybrush 1.0.
                string path = ShaderMetaDataUtility.FindPolybrushMetaDataForShader(shader);
                if (!string.IsNullOrEmpty(path))
                {
                    ShaderMetaDataUtility.ConvertMetaDataToNewFormat(shader);
                }
#pragma warning restore 0618

                m_LoadedAttributes = ShaderMetaDataUtility.LoadShaderMetaData(shader);
            }
        }
コード例 #2
0
 static void UpdateShaderMetaToNewFormat()
 {
     foreach (Shader s in Selection.objects)
     {
         ShaderMetaDataUtility.ConvertMetaDataToNewFormat(s);
     }
 }