예제 #1
0
        public SponsorPayPlugin(string gameObjectName)
        {
#if UNITY_IPHONE && !UNITY_EDITOR
            // iOS initialization
            plugin = new IOSSponsorPayPlugin(gameObjectName);
#elif UNITY_ANDROID && !UNITY_EDITOR
            // Android initialization
            plugin = new AndroidSponsorPayPlugin(gameObjectName);
#else
            //Unsupported platform
            plugin = new UnsupportedPlatformSponsorPayPlugin();
#endif
        }
 public SponsorPayPlugin(GameObject gameObject)
 {
     #if (UNITY_IPHONE || UNITY_IOS) && !UNITY_EDITOR
     // iOS initialization
     plugin = gameObject.AddComponent<IOSSponsorPayPlugin>() as IOSSponsorPayPlugin;
     #elif UNITY_ANDROID && !UNITY_EDITOR
     // Android initialization
     plugin = new AndroidSponsorPayPlugin(gameObject.name);
     #else
     //Unsupported platform
     plugin = new UnsupportedPlatformSponsorPayPlugin();
     #endif
 }