private void UpdateMaterialRows()
        {
            int i;

            this.UpdateMaterialTabs();
            Material materials = this.Skin.Materials[this.EditingMaterial];

            if (materials == null)
            {
                return;
            }
            Material defaultMaterials = this.Skin.DefaultMaterials[this.EditingMaterial];

            if (defaultMaterials == null)
            {
                return;
            }
            if (!materials.IsKeywordEnabled("_ALPHATEST_ON"))
            {
                materials.SetFloat("_Cutoff", 0f);
            }
            if (!defaultMaterials.IsKeywordEnabled("_ALPHATEST_ON"))
            {
                defaultMaterials.SetFloat("_Cutoff", 0f);
            }
            MaterialRow[] componentsInChildren = base.GetComponentsInChildren <MaterialRow>(true);
            for (i = 0; i < (int)componentsInChildren.Length; i++)
            {
                MaterialRow materialRow = componentsInChildren[i];
                if (materials.HasProperty(materialRow.ParamName))
                {
                    materialRow.Read(materials, defaultMaterials);
                }
            }
            bool flag = materials.shader.name.Contains("Cloth");

            GameObject[] clothOnlyElements = this.ClothOnlyElements;
            for (i = 0; i < (int)clothOnlyElements.Length; i++)
            {
                clothOnlyElements[i].SetActive(flag);
            }
        }
Ejemplo n.º 2
0
 public MaterialRowChangeEvent(MaterialRow row, global::System.Data.DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }