public static void CreateGraph(MenuCommand menuCommand)
        {
            const string path = "Assets";
            var template = new GraphTemplate<MathBookStencil>(MathBookStencil.GraphName);
            CommandDispatcher commandDispatcher = null;
            if (EditorWindow.HasOpenInstances<SimpleGraphViewWindow>())
            {
                var window = EditorWindow.GetWindow<SimpleGraphViewWindow>();
                if (window != null)
                {
                    commandDispatcher = window.CommandDispatcher;
                }
            }

            GraphAssetCreationHelpers<MathBookAsset>.CreateInProjectWindow(template, commandDispatcher, path);
        }
Exemplo n.º 2
0
        public static void CreateGraph(MenuCommand menuCommand)
        {
            const string      path              = "Assets";
            var               template          = new GraphTemplate <VerticalStencil>(VerticalStencil.k_GraphName);
            CommandDispatcher commandDispatcher = null;

            if (EditorWindow.HasOpenInstances <VerticalGraphWindow>())
            {
                var window = EditorWindow.GetWindow <VerticalGraphWindow>();
                if (window != null)
                {
                    commandDispatcher = window.CommandDispatcher;
                }
            }

            GraphAssetCreationHelpers <VerticalGraphAssetModel> .CreateInProjectWindow(template, commandDispatcher, path);
        }
Exemplo n.º 3
0
        public override VisualElement CreateOnboardingElements(CommandDispatcher store)
        {
            var template = new GraphTemplate <VerticalStencil>(VerticalStencil.k_GraphName);

            return(AddNewGraphButton <VerticalGraphAssetModel>(template));
        }
        public override VisualElement CreateOnboardingElements(CommandDispatcher store)
        {
            var template = new GraphTemplate <MathBookStencil>(MathBookStencil.GraphName);

            return(AddNewGraphButton <MathBookAsset>(template));
        }