Example #1
0
        public void SetMeshCustomColorAll(int textureID, Color color, string propertyName)
        {
            MaterialUnit curUnit = null;

            for (int i = 0; i < _matUnits.Count; i++)
            {
                curUnit = _matUnits[i];
                if (curUnit._textureID != textureID)
                {
                    continue;
                }

                curUnit.RequestCustomColor(color, propertyName);
                //curUnit.RefreshLinkedMeshes();
            }
        }
Example #2
0
        public void SetMeshCustomColorAll(int textureID, Color color, string propertyName)
        {
            MaterialUnit curUnit = null;

            for (int i = 0; i < _matUnits.Count; i++)
            {
                curUnit = _matUnits[i];
                if (curUnit._textureID != textureID)
                {
                    continue;
                }

                curUnit.RequestCustomColor(color, propertyName);
                //curUnit.RefreshLinkedMeshes();
            }


            if (_clippedMatUnits != null && _clippedMatUnits.Count > 0)
            {
                ClippedMatMeshSet curCMMSet = null;
                for (int i = 0; i < _clippedMatUnits.Count; i++)
                {
                    curCMMSet = _clippedMatUnits[i];
                    if (!curCMMSet.IsValid())
                    {
                        continue;
                    }
                    if (curCMMSet._matInfo._textureID != textureID)
                    {
                        continue;
                    }

                    curCMMSet._clippedMesh.SetClippedMaterialPropertyByBatch_CustomColor(color, propertyName);
                }
            }
        }