void guiForGeneral()
    {
        showGeneralSettings = targetMat.GetFloat("_showGeneral") == 1;
        showGeneralSettings = EditorGUILayout.Foldout(showGeneralSettings, "General Settings");
        targetMat.SetFloat("_showGeneral", showGeneralSettings ? 1f : 0f);

        //useHeightbasedBlending = targetMat.GetFloat("_useHeightBasedBlending") == 1;

        if (!showGeneralSettings)
        {
            return;
        }



        useHeightBasedBlending = targetMat.GetFloat("_Heightbased_Blending") == 1;
        useHeightBasedBlending = EditorGUILayout.Toggle("Heightbased Blending", useHeightBasedBlending);
        targetMat.SetFloat("_Heightbased_Blending", useHeightBasedBlending ? 1f : 0f);
        if (useHeightBasedBlending)
        {
            targetMat.EnableKeyword("_HEIGHTBASED_BLENDING");
        }
        else
        {
            targetMat.DisableKeyword("_HEIGHTBASED_BLENDING");
        }


        /*useHeightbasedBlending = EditorGUILayout.Toggle ("Heightbased Blending", useHeightbasedBlending);
         * targetMat.SetFloat ("_useHeightBasedBlending", useHeightbasedBlending ? 1f : 0f );
         * if( useHeightbasedBlending )
         *      targetMat.EnableKeyword ("_HEIGHTBASED_BLENDING");
         * else
         *      targetMat.DisableKeyword ("_HEIGHTBASED_BLENDING");*/


        windQuality = (WindQuality)targetMat.GetFloat("_WindQuality");
        windQuality = (WindQuality)EditorGUILayout.EnumPopup("Wind Quality:", windQuality);
        targetMat.SetFloat("_WindQuality", (float)windQuality);
    }
Exemplo n.º 2
0
    void guiForGeneral()
    {
        showGeneralSettings = targetMat.GetFloat("_showGeneral") == 1;
        showGeneralSettings = EditorGUILayout.Foldout(showGeneralSettings, "General Settings");
        targetMat.SetFloat("_showGeneral", showGeneralSettings ? 1f : 0f);

        //useHeightbasedBlending = targetMat.GetFloat("_useHeightBasedBlending") == 1;

        if (!showGeneralSettings)
        {
            return;
        }



        matEditor.RangeProperty(getProperty("_MaskClipValue"), "Mask Clip Value");


        windQuality = (WindQuality)targetMat.GetFloat("_WindQuality");
        windQuality = (WindQuality)EditorGUILayout.EnumPopup("Wind Quality:", windQuality);
        targetMat.SetFloat("_WindQuality", (float)windQuality);
    }