示例#1
0
        public void Compressed()
        {
            var readonlyTexture = AssetDatabase.LoadAssetAtPath <Texture2D>($"{AssetPath}/4x4compressed.dds");

            Assert.False(readonlyTexture.isReadable);
            var(bytes, mime) = AssetTextureUtil.GetTextureBytesWithMime(readonlyTexture);
            Assert.NotNull(bytes);
        }
示例#2
0
        public void NonReadablePng()
        {
            var nonReadableTex = AssetDatabase.LoadAssetAtPath <Texture2D>($"{AssetPath}/4x4.png");

            Assert.False(nonReadableTex.isReadable);
            var(bytes, mime) = AssetTextureUtil.GetTextureBytesWithMime(nonReadableTex, ColorSpace.sRGB);
            Assert.NotNull(bytes);
        }