예제 #1
0
        public void SetMeshCustomImageAll(int textureID, Texture2D newTexture, string propertyName)
        {
            MaterialUnit curUnit = null;

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

                curUnit.RequestCustomImage(newTexture, 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_CustomTexture(newTexture, propertyName);
                }
            }
        }
예제 #2
0
        public void SetMeshAlphaAll(int textureID, float alpha)
        {
            MaterialUnit curUnit = null;

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

                curUnit.RequestAlpha(alpha);
                //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_Alpha(alpha);
                }
            }
        }
예제 #3
0
        public void SetMeshImageAll(int textureID, Texture2D newTexture)
        {
            MaterialUnit curUnit = null;

            for (int i = 0; i < _matUnits.Count; i++)
            {
                curUnit = _matUnits[i];

                //Debug.Log("[" + i + "] : " + curUnit._textureID);

                if (curUnit._textureID != textureID)
                {
                    continue;
                }

                curUnit.RequestImage(newTexture);
                //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_Texture(newTexture);
                }
            }
        }
예제 #4
0
        public void ResetProperties(int textureID)
        {
            MaterialUnit curUnit = null;

            for (int i = 0; i < _matUnits.Count; i++)
            {
                curUnit = _matUnits[i];

                //추가 19.10.28 : 이 코드가 빠지면 버그다.
                if (curUnit._textureID != textureID)
                {
                    continue;
                }

                curUnit.ResetRequestProperties();
                //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.ResetRequestProperties();
                }
            }
        }