fix #23; An error occur when SoftMask is destroyed on editor

pull/87/head
mob-sakai 2018-12-30 10:47:30 +09:00
parent 99873177ef
commit a49530e43d
1 changed files with 5 additions and 0 deletions

View File

@ -413,6 +413,11 @@ namespace Coffee.UIExtensions
/// </summary>
void UpdateMaskTexture()
{
if(!graphic || !graphic.canvas)
{
return;
}
Transform stopAfter = MaskUtilities.FindRootSortOverrideCanvas(transform);
_stencilDepth = MaskUtilities.GetStencilDepth(transform, stopAfter);