15 lines
341 B
C#
15 lines
341 B
C#
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
namespace GraphicsCat
|
|||
|
|
{
|
|||
|
|
public static class MaterialExtensions
|
|||
|
|
{
|
|||
|
|
public static void SetKeyword(this Material mat, string keyword, bool val)
|
|||
|
|
{
|
|||
|
|
if (val == true)
|
|||
|
|
mat.EnableKeyword(keyword);
|
|||
|
|
else
|
|||
|
|
mat.DisableKeyword(keyword);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|