DarkMatter  4.1.0
Integration

Migration Notes

DarkMatter 3.x / Magic

If you are migrating to DarkMatter 4.x from a version below 4 then you should remove all previous Mamgic libraries. These include:

  • MagicCore.dll
  • Nucleus.dll
  • MagicAnalytics.dll
  • MoreFunAdAPI.dll
  • TinyJSON.dll
  • Chronos.dll
  • StoreFront.dll
  • DarkMatter.dll

DarkMatter 4.0 -> 4.1

If your are updating for 4.0 you should be able to just replace the old 4.0 package with the new 4.1 package. If you have any custom changes to the library it’s your responsibility to keep track of those changes and migrate them forward.

Integration

Credentials

A Magmic representative will provide you with api keys, secrets and skuids that you’ll need to order to communicate with the v5 game service.

Hope

Login to hope and navigate to Manifest section. Select your game / platform / environment and version. In the edit section add a ‘gameService’ node with your games information. For more information on the gameService section of the manifest see sites (TODO: Update sites documentation to 4.1.0)

integration_manifest.jpg

Example 'gameService' node structure:

"gameService": {
"debug": true,
"logLevel": "VERBOSE",
"activeConfigurationKey": "staging",
"configurations": {
"staging": {
"gameId": "testapp",
"skuid": "YOUR_GAME_STAGING_SKUID",
"url": "https://v5-api-staging.gameserver.magmic.com",
"secret": "YOUR_GAME_STAGING_SECRET",
"key": "YOUR_GAME_STAGING_KEY",
"numberOfRetries": [
"1.0",
"2.0",
"5.0"
]
},
"prod": {
"gameId": "testapp",
"skuid": "YOUR_GAME_PROD_SKUID",
"url": "https://v5-api.gameserver.magmic.com",
"secret": "YOUR_GAME_PROD_SECRET",
"key": "YOUR_GAME_PROD_KEY",
"numberOfRetries": [
"1.0",
"2.0",
"5.0"
]
}
},
"endpoints": {
"login": {
"path": "/users/login/facebook"
},
"identify": {
"path": "/users/identify"
}
}
}

Import

Import the DarkMatter_Unity_4.1.0.assetpackage into your project, for more information on Unity asset packages see the unity documentation.

integration_assetimport.jpg

UnityIAP (Optional)

Setup UnityIAP library for more details see the Unity Documentation. If you have issues with the Unity IAP auto installer process a couple notes

  • Make sure IAP is enabled in the unity service section of the editor.
  • If you're getting build errors in the StoreFront code the UnityChannel asset package may not have imported correctly. Manually selecting and importing the asset package should solve the problem.

NOTE: If your project does not use the StoreFront subsystem, you can delete the Libraries/StoreFront folder.

Project settings

In the player settings under other settings > Identification make sure to set your version number for each of your supported platforms to the version of the manifest you setup on the hope site.

integration_versionstring.jpg

MRaid file

Extract the AdsMRAIDFix.zip into the Assets/Libraries/Ads/Editor/ios/Ads/res folder of your Unity project.

You should now have the proper MRAID file with this folder structure: Assets/Libraries/Ads/Editor/ios/Ads/res/.dontcompile/MRAID.bundle/mraid.js

Note, folders that start with a period are hidden by default on Mac so you may have to show hidden files in order to see it. Also, Macs treat .bundle folders as a special kind of file instead. You can peek inside by right clicking and selecting Show Package Contents. This file won't show up in the Unity project, but gets copied to the iOS project when building. Unity skips the hidden folder (which is needed because Unity will incorrectly try to compile the js file which it is not meant for).