// Use this for initialization void Start() { buttonHeight = Screen.height / 12; buttonWidth = buttonHeight * 3.54f; // Make sure we grab the right initial state mOptedInState = AdendaPlugin.initializeState(); print("Initialized State: " + mOptedInState); // Set the right button text if (mOptedInState == AdendaPlugin.OPTED_ERROR_STATE) { mButtonText = OPT_ERROR_TXT; } else if (mOptedInState == AdendaPlugin.OPTED_IN_STATE) { mButtonText = OPT_OUT_TXT; } else { mButtonText = OPT_IN_TXT; } // Turn ads on AdendaPlugin.setEnableAds(true); AdendaPlugin.setUnlockType(AdendaPlugin.UNLOCK_TYPE_DEFAULT); }
// Use this for initialization void Start() { AdendaPlugin.setUnlockType(AdendaPlugin.UNLOCK_TYPE_SLIDE); // ADENDA: Disable ads AdendaPlugin.setEnableAds(false); // Opt the user IN string sUserId = SystemInfo.deviceUniqueIdentifier; Debug.Log("USERID: " + sUserId); print("USERID: " + sUserId); if (!AdendaPlugin.isOptedIn()) { AdendaPlugin.startAdendaLockscreen(sUserId, "m", "19900102", false); } if (AdendaPlugin.getNumberCustomEntries() <= 0) { AdendaPlugin.addUnityFragment(null, "Unity!", true, false, "Flappy", "startOnLockScreen", ""); } }