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; } }
protected override void OnUpdateGUI() { value = GetValue<Material>(); dropbox.text = (value == null ? "null" : value.ToString()); }
internal StructureMaster[] Filter(StructureMaster[] structures, Material material) { return (from s in structures where s.GetMaterialType().ToString() == material.ToString() select s).ToArray<StructureMaster>(); }