Ejemplo n.º 1
0
        void OnInstallPluginButtonClicked(EventBase evt)
        {
            if (null == m_latestCompatibleDCCPluginVersion)
            {
                EditorUtility.DisplayDialog("MeshSync",
                                            $"DCC Plugin compatible with MeshSync@{MeshSyncEditorConstants.GetPluginVersion()} is not found",
                                            "Ok"
                                            );
                return;
            }

            BaseDCCIntegrator integrator = GetEventButtonUserDataAs <BaseDCCIntegrator>(evt.target);

            if (null == integrator)
            {
                Debug.LogWarning("[MeshSync] Failed to Install Plugin");
                return;
            }

            integrator.Integrate(m_latestCompatibleDCCPluginVersion.ToString(), () => {
                DCCToolInfo dccToolInfo = integrator.GetDCCToolInfo();
                if (!m_dccStatusLabels.TryGetValue(dccToolInfo.AppPath, out Label statusLabel))
                {
                    SetupInternal(m_root);
                    return;
                }

                UpdateDCCPluginStatusLabel(statusLabel);
            });
        }
Ejemplo n.º 2
0
        void OnInstallPluginButtonClicked(EventBase evt)
        {
            BaseDCCIntegrator integrator = GetEventButtonUserDataAs <BaseDCCIntegrator>(evt.target);

            if (null == integrator)
            {
                Debug.LogWarning("[MeshSync] Failed to Install Plugin");
                return;
            }

            integrator.Integrate(() => {
                DCCToolInfo dccToolInfo = integrator.GetDCCToolInfo();
                if (!m_dccStatusLabels.ContainsKey(dccToolInfo.AppPath))
                {
                    Setup(m_root);
                    return;
                }

                UpdateDCCPluginStatus(integrator, m_dccStatusLabels[dccToolInfo.AppPath]);
            });
        }
Ejemplo n.º 3
0
        void OnInstallPluginButtonClicked(EventBase evt)
        {
            Button button = evt.target as Button;

            if (null == button)
            {
                Debug.LogWarning("[MeshSync] Failed to Install Plugin");
                return;
            }

            BaseDCCIntegrator integrator = button.userData as BaseDCCIntegrator;

            if (null == integrator)
            {
                Debug.LogWarning("[MeshSync] Failed to Install Plugin");
                return;
            }

            integrator.Integrate(() => {
                Setup(m_root);
            });
        }