Skip to content

Commit

Permalink
v1.3.2
Browse files Browse the repository at this point in the history
- fixed cubemaps & other non 2d textures breaking the ui
- fixed short list of textures having lots of empty space in the ui
  • Loading branch information
Thryrallo committed Mar 24, 2023
1 parent 189dcdc commit bc17614
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Editor/AvatarEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
namespace Thry.AvatarHelpers {
public class AvatarEvaluator : EditorWindow
{
public const string VERSION = "1.3.1";
public const string VERSION = "1.3.2";

[MenuItem("Thry/Avatar/Evaluator")]
static void Init()
Expand Down
11 changes: 4 additions & 7 deletions Editor/VRAM Check/TextureVRAM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,17 +408,14 @@ private void OnGUI()
"BC7 and DXT5 have the same VRAM size. BC7 is higher quality, DXT5 is smaller in download size.", MessageType.Info);
EditorGUILayout.Space(5);

_scrollposTex = EditorGUILayout.BeginScrollView(_scrollposTex, GUILayout.Height(500));
_scrollposTex = EditorGUILayout.BeginScrollView(_scrollposTex, GUILayout.Height(Math.Min(500, _texturesList.Count * 30)));
for (int texIdx = 0; texIdx < _texturesList.Count; texIdx++)
{
TextureInfo texInfo = _texturesList[texIdx];
if (_includeInactive || texInfo.isActive)
{
// get info messages
List<string> infoMessages = new List<string>();
if(texInfo.format.Length < 1) {
infoMessages.Add("This texture is not compressable");
}
if(texInfo.materials.Count < 1) {
infoMessages.Add("This texture is used in a material swap");
}
Expand Down Expand Up @@ -459,7 +456,7 @@ private void OnGUI()
if(newResolution != resolution)
ChangeImportSize(texInfo, newResolution);

if(texInfo.format.Length > 0)
if(string.IsNullOrWhiteSpace(texInfo.format) == false)
{
if(texInfo.importFormat != 0)
{
Expand All @@ -477,7 +474,7 @@ private void OnGUI()
GUILayout.Space(65);
}

if (texInfo.format.Length > 0 && texInfo.texture is Texture2D && texInfo.BPP > texInfo.minBPP)
if (string.IsNullOrWhiteSpace(texInfo.format) == false && texInfo.texture is Texture2D && texInfo.BPP > texInfo.minBPP)
{
TextureImporter importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(texInfo.texture)) as TextureImporter;
TextureImporterFormat newFormat = texInfo.hasAlpha || importer.textureType == TextureImporterType.NormalMap ?
Expand Down Expand Up @@ -534,7 +531,7 @@ private void OnGUI()
_meshesFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(_meshesFoldout, $"Meshes ({AvatarEvaluator.ToMebiByteString(_sizeAllMeshes)})");
if (_meshesFoldout)
{
_scrollPosMesh = EditorGUILayout.BeginScrollView(_scrollPosMesh, GUILayout.Height(300));
_scrollPosMesh = EditorGUILayout.BeginScrollView(_scrollPosMesh, GUILayout.Height(Math.Min(500, _meshesList.Count * 30)));
for (int mIdx = 0; mIdx < _meshesList.Count; mIdx++) {
MeshInfo meshInfo = _meshesList[mIdx];
if (_includeInactive || meshInfo.isActive)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "de.thryrallo.vrc.avatar-performance-tools",
"displayName": "Thry's Avatar Performance Tools",
"version": "1.3.1",
"version": "1.3.2",
"description": "Calculated and evaluates some avatar metric not currently taking into account by vrchats ranking system.\r\n\nMost prominently gives a breakdown over VRAM usage of different parts of the avatar.",
"gitDependencies": {},
"vpmDependencies": {},
Expand Down

0 comments on commit bc17614

Please sign in to comment.