Troubleshoot your LevelPlay integration
Troubleshoot common LevelPlay integration issues.
Read time 6 minutesLast updated 5 hours ago
When you integrate LevelPlay with the Unity Editor you might experience some problems. Use this guide to troubleshoot the following types of issues:
- Duplicated classes error message
- Scripting Symbol can't be removed from the LevelPlay SDK
- Missing dependency class error message
Specifying Banner ad position with LevelPlayBannerPosition
Error
If you encounter a compile error when usingLevelPlayBannerPositionLevelPlayBannerPositionResolution
In LevelPlay Unity package versions 8.8.0 and 8.8.1,LevelPlayBannerPositionLevelPlayBannerPositionLevelPlayBannerPositionExample 1: Parameter default value error
You might see a compile error when passingLevelPlayBannerPosition// Use null for the default value, or pass a value explicitlypublic LevelPlayBannerAd(string adUnitId, LevelPlayBannerPosition position = null)
Example 2: Invalid switch or enum comparisons
You might see a compile error if your code uses a switch statement or comparesLevelPlayBannerPositionSinceswitch (position) { case LevelPlayBannerPosition.BottomCenter: }
LevelPlayBannerPositionYou can also use theif (position == LevelPlayBannerPosition.BottomCenter) { /* Handle case */ }
Descriptionif (position.Description == "BottomCenter") { Debug.Log("Banner is at bottom-center.");}
Duplicated classes error message
You receive duplicated class error message CSO433 when trying to build or test your project. This error message will identify the class that has been duplicated and which assemblies it appears in. The following is an example of a duplicated class error message:- The type exists in both
IronSourceMediationSettingsandAssembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'Unity.LevelPlay, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
- Updating the Ads Mediation package without removing the Unity Plugin
- Updating the Unity Plugin without removing the Ads Mediation package
- Significant Ads Mediation package updates
Updated the Ads Mediation package without removing the Unity Plugin
You updated to the latest version of Unity LevelPlay through the Ads Mediation package when the .unitypackage file (the Unity Plugin) was already installed.Resolution
Remove the .unitypackage file (the Unity Plugin) before installing or updating the Ads Mediation package. To remove the plugin, complete the following steps:- Open your project in the Unity Editor and go to Assets.
- From Assets, do one of the following depending on what version of the LevelPlay SDK you're using:
- SDK v7.8.0 and earlier: Right-click IronSource > Delete.
- SDK v8.0.0: Right-click LevelPlay > Delete.
Updated the Unity Plugin without removing the Ads Mediation package
You updated to the latest version of Unity LevelPlay through the .unitypackage file when Ads Mediation was already installed.Resolution
Remove the Ads Mediation package before installing or updating the Unity Plugin. Use the following steps to remove the Ads Mediation package from the Unity Editor:- Open your project in the Unity Editor and go to Window > Package Management > Package Manager.
- In the Package Manager, select Packages > In Project.
- Select Ads Mediation > Remove.
- From your Project in the Unity Editor, go to Assets.
- From Assets, do one of the following depending on what version of the LevelPlay SDK you're using:
- SDK v7.8.0 and earlier: Right-click IronSource > Delete.
- SDK v8.0.0: Right-click LevelPlay > Delete.
- If installed, right-click Mobile Dependency Resolver > Delete as well.
Significant Ads Mediation package updates
You updated the Ads Mediation package from an early version to a much later version.Resolution
If your Ads Mediation package is in need of significant updates, you might need additional steps to ensure a smooth upgrade path. For example, if you are updating from v1.0.0 to v8.0.0, you'll need to take additional steps when updating. For more information, refer to the Ads Mediation package description in the Unity Package Manager.Scripting Symbol can't be removed from the LevelPlay SDK
You removed theLEVELPLAY_DEPENDENCIES_INSTALLEDCause
When you remove theLEVELPLAY_DEPENDENCIES_INSTALLEDSolution
This issue has no known solution because the scripting symbol is required for the LevelPlay SDK as of version 8.0.0. The symbol will always be re-added automatically if deleted.Missing dependency class error message
You received a dependency class error message after installing the Ads Mediation package. The following messages are examples of possible missing dependency class warnings:- The type or namespace name does not exist in the namespace
Core.Unity.Services - The type or namespace name could not be found.
Newtonsoft - The type or namespace name could not be found.
EditorGameServiceFlagEnabler
Cause
This can happen if thecom.unity.services.coreResolution
There are two ways to resolve the missingcom.unity.services.coreLEVELPLAY_DEPENDENCIES_INSTALLEDInstall the Services Core package in Package Manager
To resolve the missing dependency, install the Services Core package in the Unity Package Manager by doing the following:- Open your project in the Unity Editor and go to Window > Package Management > Package Manager.
- In the Package Manager window, select the + icon to open the dropdown menu and select Install package by name... to enter the package name manually.
- Enter in the Name field and select Install.
com.unity.services.core
Remove the LEVELPLAY_DEPENDENCIES_INSTALLED scripting symbol
You can also restore the Services Core package using theLEVELPLAY_DEPENDENCIES_INSTALLEDcom.unity.services.coreLEVELPLAY_DEPENDENCIES_INSTALLED- Open your project in the Unity Editor and go to Edit > Project Settings > Player.
- In the Other Settings panel, scroll down to Script Compilation.
- Select the minus symbol (−) to remove a symbol, and select LEVELPLAY_DEPENDENCIES_INSTALLED.
- Select Apply to save your changes.
Editor 6.0+ UPM Package Install Error
Error
On the Unity Editor 6.0 and above, if you are using a.unitypackageResolution
A quick solution is to remove the UPM package using the Package Manager:- Go to the Unity Editor top menu and select Window > Package Management > Package Manager.
- Find the installed Ads Mediation package.
- Expand it to show details on the right panel.
- Select Remove to uninstall the UPM package.
.unitypackageRemove the Ads Mediation package
To remove Ads Mediation from the Unity Editor, you will complete the following three tasks:- Remove the Ads Mediation package.
- Delete Ads Mediation assets.
- Delete the LevelPlay scripting symbol.
- Open your project in the Unity Editor and go to Window > Package Management > Package Manager.
- In the Package Manager, select Packages > In Project.
- Select Ads Mediation > Remove.
Delete Ads Mediation assets
When removing the Ads Mediation package, delete the LevelPlay assets as well. You might also need to remove additional files if they are installed. Refer to the following instructions for deleting the necessary Ads Mediation assets.LevelPlay assets
After removing the Ads Mediation package, you need to delete the LevelPlay assets. The process will differ slightly depending on what version of the LevelPlay SDK you are using. Use the following steps to remove LevelPlay assets:- Open your project in the Unity Editor and go to Assets.
- From Assets, do one of the following depending on what version of the LevelPlay SDK you're using:
- SDK v7.8.0 and earlier: Right-click IronSource and select Delete.
- SDK v8.0.0: Right-click LevelPlay, and select Delete.
Ads Mediation sample
If you imported the Ads Mediation sample, delete it as well when removing the Ads Mediation package. Use the following steps to delete the Ads Mediation sample:- Open your project in the Unity Editor and go to Assets > Samples > Ads Mediation.
- Right-click Ads Mediation sample, and select Delete.
Mobile Dependency Resolver
If installed, delete the Mobile Dependency Resolver as well by doing the following:- Open your project in the Unity Editor, and go to Assets.
- Right-click Mobile Dependency Resolver and select Delete.
Delete the LevelPlay scripting symbol
After deleting the Ads Mediation package and its assets, use the following steps to remove theLEVELPLAY_DEPENDENCIES_INSTALLED- From your project in the Unity Editor, go to Edit > Project Settings.
- In the list of settings, go to Player or File > Build Settings > Player Settings.
- Scroll down to Other Settings > Script Compilation.
- Right-click the scripting symbol LEVELPLAY_DEPENDENCIES_INSTALLED and select Delete.