void UpdateMaterialsTextures() { WorkingMaterial.SetTexture("_YTex", yTexture); WorkingMaterial.SetTexture("_UTex", uTexture); WorkingMaterial.SetTexture("_VTex", vTexture); if (HasAlphaChannel) { WorkingMaterial.SetTexture("_ATex", aTexture); } }
void RemoveMaterialsTextures() { WorkingMaterial.SetTexture("_YTex", null); WorkingMaterial.SetTexture("_UTex", null); WorkingMaterial.SetTexture("_VTex", null); if (HasAlphaChannel) { WorkingMaterial.SetTexture("_ATex", null); } }
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); }