private void DrawMeshPreview(FrameDebuggerEventData curEventData, Rect previewRect, Rect meshInfoRect, Mesh mesh, int meshSubset)
{
if (this.m_PreviewUtility == null)
{
this.m_PreviewUtility = new PreviewRenderUtility();
this.m_PreviewUtility.m_CameraFieldOfView = 30f;
}
if ((UnityEngine.Object) this.m_Material == (UnityEngine.Object)null)
{
this.m_Material = EditorGUIUtility.GetBuiltinExtraResource(typeof(Material), "Default-Material.mat") as Material;
}
if ((UnityEngine.Object) this.m_WireMaterial == (UnityEngine.Object)null)
{
this.m_WireMaterial = ModelInspector.CreateWireframeMaterial();
}
this.m_PreviewUtility.BeginPreview(previewRect, (GUIStyle)"preBackground");
ModelInspector.RenderMeshPreview(mesh, this.m_PreviewUtility, this.m_Material, this.m_WireMaterial, this.m_PreviewDir, meshSubset);
this.m_PreviewUtility.EndAndDrawPreview(previewRect);
string str = mesh.name;
if (string.IsNullOrEmpty(str))
{
str = "<no name>";
}
string text = str + " subset " + (object)meshSubset + "\n" + (object)curEventData.vertexCount + " verts, " + (object)curEventData.indexCount + " indices";
EditorGUI.DropShadowLabel(meshInfoRect, text);
}