示例#1
0
        /// <summary>
        /// Initialize this instance.
        /// </summary>
        public void Initialize()
        {
            if (isInitialized)
            {
                return;
            }

            isInitialized = true;
            // Keep this gameObject around, even when the scene changes.
            GameObject.DontDestroyOnLoad(gameObject);

            AVClient.Initialize(new AVClient.Configuration
            {
                ApplicationId  = applicationID,
                ApplicationKey = applicationKey,
                Region         = region,
                EngineServer   = (!string.IsNullOrEmpty(engineServer)) ? new Uri(engineServer) : null,
            });

            AVClient.UseProduction = useProduction;

            Dispatcher.Instance.GameObject = gameObject;

            // Kick off the dispatcher.
            StartCoroutine(Dispatcher.Instance.DispatcherCoroutine);
        }
示例#2
0
        private void Initialize()
        {
            if (!isInitialized)
            {
                isInitialized = true;
                // Keep this gameObject around, even when the scene changes.
                GameObject.DontDestroyOnLoad(gameObject);

                AVClient.Initialize(applicationID, applicationKey);

                // Kick off the dispatcher.
                StartCoroutine(PlatformHooks.RunDispatcher());
            }
        }