예제 #1
0
        void DoInfoWindow(int i)
        {
            GUILayout.Label(String.Format("name: {0}", hoveredComponent.name));
            GUILayout.Label(String.Format("type: {0}", hoveredComponent.GetType().Name));

            if (hoveredComponent.parent != null)
            {
                GUILayout.Label(String.Format("parent: {0}", hoveredComponent.parent.name));
            }

            GUILayout.Label(String.Format("anchor: {0}", hoveredComponent.anchor));
            GUILayout.Label(String.Format("size: {0}", hoveredComponent.size));
            GUILayout.Label(String.Format("relativePosition: {0}", hoveredComponent.relativePosition));

            var hash =
                HashUtil.HashRect(new Rect(hoveredComponent.relativePosition.x, hoveredComponent.relativePosition.y,
                                           hoveredComponent.size.x, hoveredComponent.size.y));

            GUILayout.Label(String.Format("hash: {0}", HashUtil.HashToString(hash)));
        }