Example #1
0
	public static void ShowEditor()
	{
#if UNITY_IPHONE && !(UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9)
		if (instance != null)
		{
			instance.Show(true);
			return;
		}

		instance = new UIPanelEditor();

		// Get the selected object and see if it has a sprite:
		instance.OnSelectionChange();

		instance.position = new Rect(200, 200, 700, 400);
		instance.autoRepaintOnSceneChange = true;
		instance.Show(true);
#else
		if (instance != null)
		{
			instance.ShowUtility();
			return;
		}
		else
		{
			instance = (UIPanelEditor)EditorWindow.GetWindow(typeof(UIPanelEditor), false, "Panel Editor");
			instance.OnSelectionChange();
			instance.ShowUtility();
		}
#endif
	}
Example #2
0
    public static void ShowEditor()
    {
#if UNITY_IPHONE && !(UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9)
        if (instance != null)
        {
            instance.Show(true);
            return;
        }

        instance = new UIPanelEditor();

        // Get the selected object and see if it has a sprite:
        instance.OnSelectionChange();

        instance.position = new Rect(200, 200, 700, 400);
        instance.autoRepaintOnSceneChange = true;
        instance.Show(true);
#else
        if (instance != null)
        {
            instance.ShowUtility();
            return;
        }
        else
        {
            instance = (UIPanelEditor)EditorWindow.GetWindow(typeof(UIPanelEditor), false, "Panel Editor");
            instance.OnSelectionChange();
            instance.ShowUtility();
        }
#endif
    }