private void RefreshDevelopButton()
        {
            var visibleFlag = PackageVersion?.HasTag(PackageTag.Embeddable) ?? false;

            if (visibleFlag)
            {
                var enableButton = !EditorApplication.isCompiling && !PackageDatabase.instance.isInstallOrUninstallInProgress;
                DevelopButton.SetEnabled(enableButton);
            }
            UIUtils.SetElementDisplay(DevelopButton, visibleFlag);
        }
Exemplo n.º 2
0
        private void RefreshDevelopButton()
        {
            if (package.AnyInDevelopment)
            {
                UIUtils.SetElementDisplay(DevelopButton, false);
                return;
            }

            var visibleFlag  = DisplayPackage.IsInstalled && DisplayPackage.Origin == PackageSource.Registry;
            var inprogress   = package.EmbedSignal.Operation != null;
            var enableButton = !EditorApplication.isCompiling && !inprogress && !Package.PackageOperationInProgress;

            if (EditorApplication.isCompiling)
            {
                EditorApplication.update -= CheckCompilationStatus;
                EditorApplication.update += CheckCompilationStatus;
            }

            DevelopButton.SetEnabled(enableButton);
            UIUtils.SetElementDisplay(DevelopButton, visibleFlag);
        }