GetRuntimeMemorySize() private méthode

private GetRuntimeMemorySize ( Texture t ) : int
t UnityEngine.Texture
Résultat int
Exemple #1
0
        public override string GetInfoString()
        {
            RenderTexture target = this.target as RenderTexture;
            string        str    = target.width + "x" + target.height;

            if (!target.isPowerOfTwo)
            {
                str = str + "(NPOT)";
            }
            return((str + "  " + target.format) + "  " + EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySize(target)));
        }
        public override string GetInfoString()
        {
            RenderTexture renderTexture = base.target as RenderTexture;
            string        text          = renderTexture.width + "x" + renderTexture.height;

            if (!renderTexture.isPowerOfTwo)
            {
                text += "(NPOT)";
            }
            text = text + "  " + renderTexture.format;
            return(text + "  " + EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySize(renderTexture)));
        }
        public override string GetInfoString()
        {
            Texture3D texture3D = this.target as Texture3D;

            return(string.Format("{0}x{1}x{2} {3} {4}", new object[]
            {
                texture3D.width,
                texture3D.height,
                texture3D.depth,
                TextureUtil.GetTextureFormatString(texture3D.format),
                EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySize(texture3D))
            }));
        }
        public override string GetInfoString()
        {
            Texture3D target = this.target as Texture3D;

            return(string.Format("{0}x{1}x{2} {3} {4}", (object)target.width, (object)target.height, (object)target.depth, (object)TextureUtil.GetTextureFormatString(target.format), (object)EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySize((Texture)target))));
        }
Exemple #5
0
        public override string GetInfoString()
        {
            Texture3D target = base.target as Texture3D;

            return($"{target.width}x{target.height}x{target.depth} {TextureUtil.GetTextureFormatString(target.format)} {EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySize(target))}");
        }
        public override string GetInfoString()
        {
            Texture3D target = this.target as Texture3D;

            object[] args = new object[] { target.width, target.height, target.depth, TextureUtil.GetTextureFormatString(target.format), EditorUtility.FormatBytes(TextureUtil.GetRuntimeMemorySize(target)) };
            return(string.Format("{0}x{1}x{2} {3} {4}", args));
        }