예제 #1
0
        public void OnWindowCreated(WindowCreatedArgs args)
        {
            m_DevelopMenu         = args.window.AddPackageActionMenu();
            m_DevelopMenu.text    = L10n.Tr("Develop");
            m_DevelopMenu.visible = false;

            m_EmbedDropdown        = m_DevelopMenu.AddDropdownItem();
            m_EmbedDropdown.text   = L10n.Tr("Copy to Packages folder");
            m_EmbedDropdown.action = EmbedClicked;

            m_CloneDropdown         = m_DevelopMenu.AddDropdownItem();
            m_CloneDropdown.text    = L10n.Tr("Clone from git repo");
            m_CloneDropdown.action  = CloneClicked;
            m_CloneDropdown.visible = Unsupported.IsDeveloperMode();
        }
        public void OnWindowCreated(WindowCreatedArgs args)
        {
            m_PublishMenu         = args.window.AddPackageActionMenu();
            m_PublishMenu.text    = L10n.Tr("Publish");
            m_PublishMenu.visible = false;

            foreach (var extension in PackageManagerDevelopExtensions.publishExtensions)
            {
                var dropdownItem = m_PublishMenu.AddDropdownItem();
                dropdownItem.text   = extension.name;
                dropdownItem.action = args => extension?.OnPublish(args.packageVersion);
            }

            MenuExtensions.onShowDevToolsSet += OnShowDevToolsSet;
        }