Admix comes with a config file that can be configured for multiple usecases. The file name is AdmixLocalConfig.txt, and is located in: Assets/Admix/AdmixAssets/Resources/. It can be used to determine:
- Admix initialization type
- Log level for debugging
Please note! AdmixLocalConfig.txt has other vital for Admix settings like endpoint URLs. Please keep them default, as it may break Admix from working properly on production line.
About Admix initialization
By default, the Admix SDK initializes as an app launches. It gets all the needed settings from the Admix servers and prepares everything on the back end to serve ads during runtime. Then, during gameplay, it sends ad requests from any scenes where In-Play banners have been added.
This page describes how you can delay Admix initialization to whenever you want.
Please note, the delayed initialization feature is implemented starting with the SDK version 2.2
How do you delay Admix initialization?
Admix comes with a config file that determines how Admix should be initialized. The file name is AdmixLocalConfig.txt, and is located in: Assets/Admix/AdmixAssets/Resources/. If you open this file up, you will find a line reading "InstantLoading" with the value "true". It's this line that makes Admix initialize right after an app is launched.
In order to delay initialization, simply change the value from "true" to "false" as shown in the picture below:
Then you can easily initiate Admix through code whenever you want. You can do this using the public method AdmixInitializer.Start()
About Admix debug level
For the testing purposes you might need to debug more things related to Admix. AdmixLocalConfig.txt allows you to setup different level of the log debugging for Admix. Here how it looks by default:
If you'd like to enable the log level, simply change "IsEnabled" to true
There are multiple levels of logs that can be enabled:
- "Level": 0 // off
- "Level": 1 // Info
- "Level": 2 // Warning
- "Level": 3 // Error
- "Level": 4 // Debug all