Skip to content

Instantly share code, notes, and snippets.

@TarasOsiris
Created June 24, 2014 09:57
Show Gist options
  • Save TarasOsiris/f5f13da5759818856359 to your computer and use it in GitHub Desktop.
Save TarasOsiris/f5f13da5759818856359 to your computer and use it in GitHub Desktop.
Set Android Texture Compression uTomate Action
using UnityEditor;
[UTActionInfoAttribute(actionCategory = "Build")]
[UTDoc(title = "Set Android Texture Compression", description = "Sets Android texture Compression.")]
[UTInspectorGroups(groups = new []{ "Player" })]
public class UTSetAndroidBuildSubtarget : UTAction
{
[UTDoc(description = "Android targets, only: The texture compression.")]
[UTInspectorHint(group = "Player", order = 4, required = true)]
public UTAndroidBuildSubtarget textureCompression;
public override System.Collections.IEnumerator Execute(UTContext context)
{
var theTextureCompression = textureCompression.EvaluateIn(context);
EditorUserBuildSettings.androidBuildSubtarget = theTextureCompression;
yield return "";
}
[MenuItem("Assets/Create/uTomate/Build/Set Android Texture Compression", false, 270)]
public static void AddAction ()
{
Create<UTSetAndroidBuildSubtarget> ();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment