Skip to content

Commit

Permalink
close #17; Set default material on disable
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Dec 17, 2018
1 parent a0e32d6 commit 9d6bf05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Scripts/SoftMaskable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void OnEnable()
{
if (!g.material || g.material == Graphic.defaultGraphicMaterial)
{
g.material = defaultMaterial ?? (defaultMaterial = new Material(Resources.Load<Shader>("UI-Default-SoftMask")));
g.material = defaultMaterial ?? (defaultMaterial = new Material (Resources.Load<Shader> ("UI-Default-SoftMask")) { hideFlags = HideFlags.HideAndDontSave, });
}
g.SetMaterialDirty();
}
Expand Down

0 comments on commit 9d6bf05

Please sign in to comment.