예제 #1
0
        void TryDrawDataVisualizerButton(PropertyGridItem itm, ref Rect rect)
        {
            if (!enabled || type.managedTypesArrayIndex == -1)
            {
                return;
            }

            if (!AbstractDataVisualizer.HasVisualizer(type.name))
            {
                return;
            }

            if (GUI.Button(HeEditorGUI.SpaceR(ref rect, rect.height), new GUIContent("", "Show in Data Visualizer."), HeEditorStyles.dataVisualizer))
            {
                var pointer = address;
                if (type.isPointer)
                {
                    pointer = myMemoryReader.ReadPointer(address);
                }

                DataVisualizerWindow.CreateWindow(m_Snapshot, myMemoryReader, pointer, type);
            }
        }