private bool DrawEventMesh(int curEventIndex, FrameDebuggerEvent curEvent)
{
int frameEventMeshID = FrameDebuggerUtility.GetFrameEventMeshID(curEventIndex);
if (frameEventMeshID == 0)
{
return false;
}
Mesh mesh = EditorUtility.InstanceIDToObject(frameEventMeshID) as Mesh;
if (mesh == null)
{
return false;
}
GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandHeight(true) };
Rect position = GUILayoutUtility.GetRect((float) 10f, (float) 10f, options);
if ((position.width >= 64f) && (position.height >= 64f))
{
GameObject gameObjectForEvent = GetGameObjectForEvent(curEventIndex);
Rect meshInfoRect = position;
meshInfoRect.yMin = meshInfoRect.yMax - (EditorGUIUtility.singleLineHeight * 2f);
Rect rect3 = meshInfoRect;
meshInfoRect.xMin = meshInfoRect.center.x;
rect3.xMax = rect3.center.x;
if (Event.current.type == EventType.MouseDown)
{
if (meshInfoRect.Contains(Event.current.mousePosition))
{
EditorGUIUtility.PingObject(frameEventMeshID);
Event.current.Use();
}
if ((gameObjectForEvent != null) && rect3.Contains(Event.current.mousePosition))
{
EditorGUIUtility.PingObject(gameObjectForEvent.GetInstanceID());
Event.current.Use();
}
}
this.m_PreviewDir = PreviewGUI.Drag2D(this.m_PreviewDir, position);
if (Event.current.type == EventType.Repaint)
{
int frameEventMeshSubset = FrameDebuggerUtility.GetFrameEventMeshSubset(curEventIndex);
this.DrawMeshPreview(curEvent, position, meshInfoRect, mesh, frameEventMeshSubset);
if (gameObjectForEvent != null)
{
EditorGUI.DropShadowLabel(rect3, gameObjectForEvent.name);
}
}
}
return true;
}