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
0
		protected override void OnUpdateGUI()
		{
			value = GetValue<Material>();
			dropbox.text = (value == null ? "null" : value.ToString());
		}
예제 #3
0
파일: LookUp.cs 프로젝트: balu92/Fougerite
 internal StructureMaster[] Filter(StructureMaster[] structures, Material material)
 {
     return (from s in structures
                 where s.GetMaterialType().ToString() == material.ToString()
                 select s).ToArray<StructureMaster>();
 }