BCE0023: No appropriate version of 'UnityEditor.EditorUtility.CompressTexture' for the argument list '(UnityEngine.Texture2D, UnityEngine.TextureFormat)' was found.

I’m getting this error:

BCE0023: No appropriate version of ‘UnityEditor.EditorUtility.CompressTexture’ for the argument list ‘(UnityEngine.Texture2D, UnityEngine.TextureFormat)’ was found.

My code:

class MyTexturePostprocessor extends AssetPostprocessor {
  function OnPostprocessTexture (t : Texture2D) {
     EditorUtility.CompressTexture(t, TextureFormat.PVRTC_4BPP_RGBA);
  }
}

Where is the problem? Thank you!

No appropriate version of CompressTexture

for the argument

UnityEngine.Texture2D, UnityEngine.TextureFormat