dimension5/BeautifulDissolves

DissolveUI not instantiating materials

Closed this issue · 1 comments

Unlike "Dissolve", the UI version does not instantiate materials. Creating runtime modifications on material assets. Consider either using Material Property Blocks, or Instantiating the materials.

Something like this works:

public class DissolveUI : Dissolve {

	protected override Material[] GetMaterials()
	{
		Graphic graphic = GetComponentInChildren<Graphic>();

		return graphic != null && graphic.materialForRendering != null ? new Material[]{ graphic.material = Instantiate(graphic.materialForRendering) } : null;
	}
}

Hi, so sorry for the late response (my GitHub notifications were turned off.. woops). Issue has been addressed and submitted for review. The update should be out in the asset store within the week.