How to use this script texture compression script from the docs

hello I’m trying to compress all of my textures with this script from the docs: Unity - Scripting API: EditorUtility.CompressTexture

I posted it in a js script and it gives the error “no appropiate version of UnityEditor.EditorUtility.CompressTexture for the argument list (UnityEngine.Texture2D , UnityEngine.TextureFormat) was found” I’m hoping someone familiar with this script can help me fix it

I think you missed the quality to be compressed. (There is no CompressTexture with two arguments)

class MyTexturePostprocessor extends AssetPostprocessor {
		function OnPostprocessTexture (t : Texture2D) {
			EditorUtility.CompressTexture(t, TextureFormat.RGB24, TextureCompressionQuality.Best);