예제 #1
0
 void Update()
 {
     if (transform.eulerAngles != lastEuler)
     {
         shaderScript.ApplyLighting();
         lastEuler = transform.eulerAngles;
     }
 }
예제 #2
0
    public override void OnInspectorGUI()
    {
        //base.OnInspectorGUI();
        TerrainShader shader = (TerrainShader)target;

        if (DrawDefaultInspector())
        {
            if (shader.autoUpdateLighting)
            {
                shader.ApplyLighting();
            }
            if (shader.autoUpdateTerrain)
            {
                shader.ApplyTerrain();
            }
            if (shader.autoUpdateTextures)
            {
                shader.ApplyTextures();
            }
        }
    }