diff --git a/AvatarEvaluator.cs b/AvatarEvaluator.cs index 0276759..0396df1 100644 --- a/AvatarEvaluator.cs +++ b/AvatarEvaluator.cs @@ -59,6 +59,12 @@ void InitGUI() private void OnGUI() { + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Thry's Avatar Avatar Evaluator v0.2.1", new GUIStyle(EditorStyles.label) { richText = true, alignment = TextAnchor.MiddleCenter }); + if (GUILayout.Button("Click here & follow me on twitter", EditorStyles.centeredGreyMiniLabel)) + Application.OpenURL("https://twitter.com/thryrallo"); + EditorGUILayout.Space(); + if (!isGUIInit) InitGUI(); EditorGUI.BeginChangeCheck(); scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); @@ -256,7 +262,7 @@ void Evaluate() else _writeDefaultoutliers = wdOn.Select(s => s.Item2).ToArray(); #endif - skinendMeshesWithBlendshapes = avatar.GetComponentsInChildren(true).Where(r => r.sharedMesh.blendShapeCount > 0).Select(r => (r, r.sharedMesh.triangles.Length / 3)).OrderByDescending(i => i.Item2).ToArray(); + skinendMeshesWithBlendshapes = avatar.GetComponentsInChildren(true).Where(r => r.sharedMesh != null && r.sharedMesh.blendShapeCount > 0).Select(r => (r, r.sharedMesh.triangles.Length / 3)).OrderByDescending(i => i.Item2).ToArray(); } public static IEnumerable[] GetMaterials(GameObject avatar)