Beispiel #1
0
        internal static void Initialize()
        {
            if (mInitialized)
            {
                return;
            }

            ConfigureLogging();

            RegisterExceptionHandlers();

            InitLocalization();

            ThreadWaiter.Initialize(new UnityThreadWaiterBuilder());
            ServicePointConfigurator.ConfigureServicePoint();
            CertificateUi.RegisterHandler(new ChannelCertificateUiImpl());

            DisableFsWatcherIfNeeded();

            EditionManager.Get().DisableCapability(
                EnumEditionCapabilities.Extensions);

            ClientHandlers.Register();

            PlasticGuiConfig.SetConfigFile(
                PlasticGuiConfig.UNITY_GUI_CONFIG_FILE);

            mInitialized = true;
        }
Beispiel #2
0
        internal static void InitializeIfNeeded()
        {
            if (sIsInitialized)
            {
                return;
            }

            sIsInitialized = true;

            PlasticAPI        = new PlasticAPI();
            PlasticWebRestApi = new PlasticWebRestApi();

            ConfigureLogging();

            GuiMessage.Initialize(new UnityPlasticGuiMessage());

            RegisterExceptionHandlers();

            InitLocalization();

            ThreadWaiter.Initialize(new UnityThreadWaiterBuilder());
            ServicePointConfigurator.ConfigureServicePoint();
            CertificateUi.RegisterHandler(new ChannelCertificateUiImpl());

            SetupFsWatcher();

            EditionManager.Get().DisableCapability(
                EnumEditionCapabilities.Extensions);

            ClientHandlers.Register();

            PlasticGuiConfig.SetConfigFile(
                PlasticGuiConfig.UNITY_GUI_CONFIG_FILE);

            sEventSenderScheduler = EventTracking.Configure(
                PlasticApp.PlasticWebRestApi,
                AssetsPath.IsRunningAsUPMPackage() ?
                ApplicationIdentifier.UnityPackage :
                ApplicationIdentifier.UnityAssetStorePlugin,
                IdentifyEventPlatform.Get());

            if (sEventSenderScheduler != null)
            {
                sPingEventLoop = new PingEventLoop();
                sPingEventLoop.Start();
                sPingEventLoop.SetUnityVersion(Application.unityVersion);

                CollabPlugin.GetVersion(pluginVersion => sPingEventLoop.SetPluginVersion(pluginVersion));
            }

            PlasticMethodExceptionHandling.InitializeAskCredentialsUi(
                new CredentialsUiImpl());
            ClientEncryptionServiceProvider.SetEncryptionPasswordProvider(
                new MissingEncryptionPasswordPromptHandler());
        }
Beispiel #3
0
        // These two (ClientHandlers and ThreadWatier) need to be reinitialized if they have not been
        // or else an error will be thrown and the Plastic context menu will not show up
        internal static void RegisterClientHandlersIfNeeded()
        {
            if (sIsInitialized)
            {
                return;
            }

            ClientHandlers.Register();
            ThreadWaiter.Initialize(new UnityThreadWaiterBuilder());

            sIsInitialized = true;
        }
Beispiel #4
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();
        }
 public void Setup()
 {
     ThreadWaiter.Initialize(new TestingThreadWaiterBuilder());
 }