Пример #1
0
    string GetTextureInfo(Texture tex, bool bShowSubDir)
    {
        Texture2D tex2d = (tex as Texture2D);

        if (tex2d != null)
        {
            string desc = FXMakerTooltip.GetHsFolderPopup_Texture("HOVER_DESC");
            string name = "";
            if (bShowSubDir)
            {
                name = AssetDatabase.GetAssetPath(tex);
                name = NgFile.PathSeparatorNormalize(name).Replace(m_LoadDirectory, "");
            }
            else
            {
                name = tex.name;
            }

            return(string.Format("{0}\n{1}x{2} {3}\n{4} {5} M={6} A={7}\n{8}"
                                 , name, tex2d.width, tex2d.height, tex2d.format, tex2d.filterMode, (tex2d.wrapMode == 0 ? "Repeat" : "Clamp"), tex2d.mipmapCount, tex2d.anisoLevel, desc));
        }
        return("");
    }