Add null check for prefab editor

pull/87/head
mob-sakai 2018-12-15 20:20:14 +09:00
parent 74f6180547
commit a0e32d6f66
2 changed files with 11 additions and 5 deletions

View File

@ -340,7 +340,10 @@ namespace Coffee.UIExtensions
{ {
foreach (var sm in s_ActiveSoftMasks) foreach (var sm in s_ActiveSoftMasks)
{ {
sm.UpdateMaskTexture(); if(sm)
{
sm.UpdateMaskTexture ();
}
} }
} }

View File

@ -158,11 +158,14 @@ namespace Coffee.UIExtensions
foreach (var sm in s_ActiveSoftMaskables) foreach (var sm in s_ActiveSoftMaskables)
{ {
Material mat = sm._maskMaterial; if(sm)
if (mat)
{ {
mat.SetMatrix("_SceneView", w2c); Material mat = sm._maskMaterial;
mat.SetMatrix("_SceneProj", prj); if (mat)
{
mat.SetMatrix ("_SceneView", w2c);
mat.SetMatrix ("_SceneProj", prj);
}
} }
} }
} }