public static bool ConvertSelectedAlpha1316TextureValidation() { if (Selection.activeObject is Texture2D) { return(Alpha1316Packer.IsValidAlpha1316Source(Selection.activeObject as Texture2D)); } return(false); }
private static string PackAlpha1316(Texture2D srcTex, string destPath, string debugDestPath) { string error = null; if (srcTex.width != srcTex.height || srcTex.width % Alpha1316Packer.SRC_SIZE_STEP != 0) { return("The width and height of the texture should be same, and can be divided by 13!"); } error = Alpha1316Packer.PackAlpha1316(srcTex, destPath, false); if (debugDestPath != null) { Alpha1316Packer.PackAlpha1316(srcTex, debugDestPath, true); } return(error); }