Esempio n. 1
0
		#pragma warning restore 414

		/// <summary>
		/// Initializes the game state before the game starts.
		/// </summary>
		void Awake(){
			if(instance == null){ 	// making sure we only initialize one instance.
				SoomlaUtils.LogDebug(TAG, "Initializing ProfileEvents (Awake)");

				instance = this;
				GameObject.DontDestroyOnLoad(this.gameObject);
				Initialize();
				// now we initialize the event pusher
				#if UNITY_ANDROID && !UNITY_EDITOR
				pep = new ProfileEventPusherAndroid();
				#elif UNITY_IOS && !UNITY_EDITOR
				pep = new ProfileEventPusherIOS();
				#endif

			} else {				// Destroying unused instances.
				GameObject.Destroy(this.gameObject);
			}
		}
Esempio n. 2
0
                #pragma warning restore 414

        /// <summary>
        /// Initializes the game state before the game starts.
        /// </summary>
        void Awake()
        {
            if (instance == null)               // making sure we only initialize one instance.
            {
                SoomlaUtils.LogDebug(TAG, "Initializing ProfileEvents (Awake)");

                instance = this;
                GameObject.DontDestroyOnLoad(this.gameObject);
                Initialize();
                // now we initialize the event pusher
                                #if UNITY_ANDROID && !UNITY_EDITOR
                pep = new ProfileEventPusherAndroid();
                                #elif UNITY_IOS && !UNITY_EDITOR
                pep = new ProfileEventPusherIOS();
                                #endif
            }
            else                                                // Destroying unused instances.
            {
                GameObject.Destroy(this.gameObject);
            }
        }