示例#1
0
 void UpdateMaterialsTextures()
 {
     WorkingMaterial.SetTexture("_YTex", yTexture);
     WorkingMaterial.SetTexture("_UTex", uTexture);
     WorkingMaterial.SetTexture("_VTex", vTexture);
     if (HasAlphaChannel)
     {
         WorkingMaterial.SetTexture("_ATex", aTexture);
     }
 }
示例#2
0
 void RemoveMaterialsTextures()
 {
     WorkingMaterial.SetTexture("_YTex", null);
     WorkingMaterial.SetTexture("_UTex", null);
     WorkingMaterial.SetTexture("_VTex", null);
     if (HasAlphaChannel)
     {
         WorkingMaterial.SetTexture("_ATex", null);
     }
 }
示例#3
0
            public TexturePacker.MaterialTexture GetMaterialTextures(WorkingMaterial material)
            {
                if (m_textureCache.ContainsKey(material.Guid) == false)
                {
                    AddToCache(material);
                }

                var textures = m_textureCache[material.Guid];

                if (textures != null)
                {
                    string inputName = m_textureInfoList[0].InputName;
                    material.SetTexture(inputName, textures[0].Clone());
                }

                return(textures);
            }