private UAirship()
        {
            if (Application.isEditor) {
                plugin = new StubbedPlugin ();
            } else {
                #if UNITY_ANDROID
                plugin = new UAirshipPluginAndroid ();
                #elif UNITY_IPHONE
                plugin = new UAirshipPluginIOS ();
                #else
                plugin = new StubbedPlugin ();
                #endif
            }

            GameObject gameObject = new GameObject("[UrbanAirshipListener]");
            listener = gameObject.AddComponent<UrbanAirshipListener>();
            MonoBehaviour.DontDestroyOnLoad(gameObject);
            plugin.Listener = gameObject;
        }
Beispiel #2
0
        private UAirship()
        {
            if (Application.isEditor)
            {
                plugin = new StubbedPlugin();
            }
            else
            {
                                #if UNITY_ANDROID
                plugin = new UAirshipPluginAndroid();
                                #elif UNITY_IOS
                plugin = new UAirshipPluginIOS();
                                #else
                plugin = new StubbedPlugin();
                                #endif
            }

            GameObject gameObject = new GameObject("[UrbanAirshipListener]");
            gameObject.AddComponent <UrbanAirshipListener>();

            MonoBehaviour.DontDestroyOnLoad(gameObject);
            plugin.Listener = gameObject;
        }