Add null check for prefab editor
parent
74f6180547
commit
a0e32d6f66
|
@ -340,7 +340,10 @@ namespace Coffee.UIExtensions
|
|||
{
|
||||
foreach (var sm in s_ActiveSoftMasks)
|
||||
{
|
||||
sm.UpdateMaskTexture();
|
||||
if(sm)
|
||||
{
|
||||
sm.UpdateMaskTexture ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,11 +158,14 @@ namespace Coffee.UIExtensions
|
|||
|
||||
foreach (var sm in s_ActiveSoftMaskables)
|
||||
{
|
||||
Material mat = sm._maskMaterial;
|
||||
if (mat)
|
||||
if(sm)
|
||||
{
|
||||
mat.SetMatrix("_SceneView", w2c);
|
||||
mat.SetMatrix("_SceneProj", prj);
|
||||
Material mat = sm._maskMaterial;
|
||||
if (mat)
|
||||
{
|
||||
mat.SetMatrix ("_SceneView", w2c);
|
||||
mat.SetMatrix ("_SceneProj", prj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue