// Use this for initialization void Start() { UpdatePlayerHUD(); /////////////////////////////////////////////////////////////////// // Start the deltaDNA SDK as normal and use it to capture gameplay // events to a deltaDNA game instance specifically for this game // For demo purposes... clear all data and treat each run as if it were a fresh new install. //DDNA.Instance.ClearPersistentData(); // Enter additional configuration here DDNA.Instance.ClientVersion = CLIENT_VERSION; DDNA.Instance.SetLoggingLevel(DeltaDNA.Logger.Level.DEBUG); DDNA.Instance.Settings.DebugMode = true; // Launch the SDK // Record normal event to the deltaDNA demo game dev environment. DDNA.Instance.StartSDK( "56919948607282167963952652014071", "https://collect2674dltcr.deltadna.net/collect/api", "https://engage2674dltcr.deltadna.net"); ////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // Send additional events to the Publisher MetaGame using the REST API // At the start of the game and other key points such as IAP purchase and gameEnd metagame_sender MetaGameSender = gameObject.GetComponent <metagame_sender>(); MetaGameSender.StartMetaGame(); ///////////////////////////////////////////////////////////////////////// }
/////////////////////////////////////////////////////////////////////////////// // MetaGame Campaign Check private void MetaGameCampaignCheck(string decisionPoint) { Debug.Log("MetaGame Campaign Check"); var engagement = new Engagement(decisionPoint) .AddParam("userLevel", this.userLevel) .AddParam("gameID", GAME_ID) .AddParam("gameName", GAME_NAME) .AddParam("gameGenre", GAME_GENRE); metagame_sender MetaGameSender = gameObject.GetComponent <metagame_sender>(); // Make request to Engage In-Game campaign system to see // if there are any active campaigns for this player at this time MetaGameSender.MetaGameRequestEngagement(engagement, (response) => { ReactToCampaignResponse(response); }, (exception) => { Debug.Log("Engage reported an error: " + exception.Message); }); }