//------------------------------------------------------------------ /// Initilisation that creates an instance of ChilliConnect and subscribes /// to Push Notification listener events. //------------------------------------------------------------------ private void Awake() { m_chilliConnect = new ChilliConnectSdk(k_chilliConnectToken, false); #if UNITY_ANDROID && !UNITY_EDITOR GooglePushNotificationHandler.SetRecieverGameObject("GooglePushNotificationListener"); GameObject.FindObjectOfType <GooglePushNotificationListener>().RegistrationSucceededEvent = OnPluginRegistered; GameObject.FindObjectOfType <GooglePushNotificationListener>().RegistrationFailedEvent = OnPluginFailed; #elif UNITY_IOS GameObject.FindObjectOfType <iOSPushNotificationListener>().RegistrationSucceededEvent = OnPluginRegistered; GameObject.FindObjectOfType <iOSPushNotificationListener>().RegistrationFailedEvent = OnPluginFailed; #endif }
//------------------------------------------------------------------ private void Awake() { GooglePushNotificationHandler.SetRecieverGameObject(name); }