Beispiel #1
0
        void OnEnable()
        {
            if (mException != null)
            {
                return;
            }

            GuiMessage.Initialize(new UnityPlasticGuiMessage(this));

            ConfigureLogging();

            RegisterExceptionHandlers();
            RegisterApplicationFocusHandlers(this);

            InitLocalization();

            ThreadWaiter.Initialize(new UnityThreadWaiterBuilder());
            ServicePointConfigurator.ConfigureServicePoint();
            CertificateUi.RegisterHandler(new ChannelCertificateUiImpl());
            CredentialsUIRegistrar.RegisterCredentialsUI(
                new CredentialsUiImpl(this));
            ClientEncryptionServiceProvider.SetEncryptionPasswordProvider(
                new MissingEncryptionPasswordPromptHandler(this));
            DisableFsWatcherIfNeeded();
            EditionManager.Get().DisableCapability(
                EnumEditionCapabilities.Extensions);

            mPlasticAPI = new PlasticAPI();
            ClientHandlers.Register();

            PlasticGuiConfig.SetConfigFile(PLASTIC_GUI_CONFIG_FILE);

            mPingEventLoop      = new PingEventLoop();
            mEventSenderRestApi = new SimpleEventSenderRestApi(
                PlasticWebApiUris.GetBaseUri());
            mEventSenderScheduler = EventTracking.Configure(
                mEventSenderRestApi,
                ApplicationIdentifier.UnityPackage,
                IdentifyEventPlatform.Get());

            if (mEventSenderScheduler != null)
            {
                mPingEventLoop.Start();
            }

            InitializePlastic();
        }
Beispiel #2
0
        void OnEnable()
        {
            wantsMouseMove = true;

            if (mException != null)
            {
                return;
            }

            GuiMessage.Initialize(new UnityPlasticGuiMessage(this));

            PlasticApp.Initialize();

            RegisterApplicationFocusHandlers(this);

            CredentialsUIRegistrar.RegisterCredentialsUI(
                new CredentialsUiImpl(this));
            ClientEncryptionServiceProvider.SetEncryptionPasswordProvider(
                new MissingEncryptionPasswordPromptHandler(this));

            mPlasticAPI = new PlasticAPI();

            mPingEventLoop      = new PingEventLoop();
            mEventSenderRestApi = new SimpleEventSenderRestApi(
                PlasticWebApiUris.GetBaseUri());
            mEventSenderScheduler = EventTracking.Configure(
                mEventSenderRestApi,
                ApplicationIdentifier.UnityPackage,
                IdentifyEventPlatform.Get());

            if (mEventSenderScheduler != null)
            {
                mPingEventLoop.Start();
            }

            InitializePlastic();

            EditorApplication.update += AutoCommitOperation.AutoCommit;
        }