本文整理汇总了C#中UnityEngine.Material.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Material.ToString方法的具体用法?C# Material.ToString怎么用?C# Material.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine.Material
的用法示例。
在下文中一共展示了Material.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckShaderAndCreateMaterial
static Material CheckShaderAndCreateMaterial(Shader s , Material m2Create )
{
if (m2Create && m2Create.shader == s)
return m2Create;
if (!s)
{
Debug.LogWarning("PostEffects: missing shader for " + m2Create.ToString ());
return null;
}
if(!s.isSupported)
{
Debug.LogWarning ("The shader " + s.ToString () + " is not supported");
return null;
}
else
{
m2Create = new Material (s);
m2Create.hideFlags = HideFlags.DontSave;
return m2Create;
}
}
示例2: OnUpdateGUI
protected override void OnUpdateGUI()
{
value = GetValue<Material>();
dropbox.text = (value == null ? "null" : value.ToString());
}
示例3: Filter
internal StructureMaster[] Filter(StructureMaster[] structures, Material material)
{
return (from s in structures
where s.GetMaterialType().ToString() == material.ToString()
select s).ToArray<StructureMaster>();
}