How to get Android Build Settings Texture Compression Setting from editor script?

~HI:

I want to do some work automatically just before Android building.


So,i’m looking for a editor method which could be invoke by unity automatically beform building,just like OnPreprocessTexutre
method which will be invoked when a texture import to unity.But i didn’t find it!!

Then,I wrote a simple EditorWindow to do the build work just replace the unity default Build Setting Window,here i can do what i want just before building.But i encountered another problem:How to get Android Build Settings Texture Compression Setting from editor script?


I’ve looked for it in PlayerSettings and PlayerSettings.Android,but i haven’t find it.


38690-ss.jpg

ok,i’ve found it.
EditorUserBuildSettings.androidBuildSubtarget is what i want.
Hope this can help someone who is looking for this…