Troubleshoot your LevelPlay integration
Troubleshoot common LevelPlay integration issues.
読み終わるまでの所要時間 6 分最終更新 5ヶ月前
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 using as an enum or integer, this is because has been updated from an enum to a class in version 8.8.0. This change affects how banner positions should be referenced in code.
LevelPlayBannerPositionLevelPlayBannerPositionResolution
In LevelPlay Unity package versions 8.8.0 and 8.8.1, was changed from an enum to a class. The updated API supports nine predefined banner positions and allows you to specify an exact (x,y) coordinate by creating a object.
LevelPlayBannerPositionLevelPlayBannerPositionIf you see compile errors in the Unity Editor Console, refer to the following examples to understand some possible causes and how to resolve them:
LevelPlayBannerPositionExample 1: Parameter default value error
You might see a compile error when passing as a parameter with a default enum value. To fix this, use null instead:
LevelPlayBannerPosition// 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 compares values as enums or integers. For example:
LevelPlayBannerPositionswitch (position) { case LevelPlayBannerPosition.BottomCenter: }
Since is now a class, replace this logic with direct object comparisons:
LevelPlayBannerPositionif (position == LevelPlayBannerPosition.BottomCenter) { /* Handle case */ }
You can also use the property to compare banner positions when needed for layout logic, logging, or analytics purposes. For example:
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
The duplicated classes error has the following possible causes:
- 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
Refer to the following sections for descriptions and resolutions of these issues.
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 the scripting symbol from the LevelPlay SDK, but it keeps automatically reappearing in the SDK.
LEVELPLAY_DEPENDENCIES_INSTALLEDCause
When you remove the scripting symbol from the SDK, the SDK will always re-add it automatically. As of version 8.0.0 of the LevelPlay SDK Unity Package, this scripting symbol is required.
LEVELPLAY_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 the dependency from the LevelPlay SDK Unity package is removed or fails to install. If this dependency is missing, the console displays an error message identifying which dependency classes couldn't be found.
com.unity.services.coreResolution
There are two ways to resolve the missing dependency: by installing the Services Core package manually by name or by removing the scripting symbol.
com.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 the scripting symbol. When removed, the scripting symbol is re-added automatically. As part of the re-installation process, the package is also reinstalled automatically. You can use this method if the editor doesn't display the services core package.
LEVELPLAY_DEPENDENCIES_INSTALLEDcom.unity.services.coreTo resolve the missing dependency, delete the scripting symbol from the LevelPlay SDK Unity package, by doing the following:
LEVELPLAY_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 for Ads Mediation (LevelPlay), you might accidentally install the UPM package by selecting Quick Install (under Services > Ads Mediation (LevelPlay) > Install). This can result in compile errors and the package may stop functioning.
.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.
By following these steps, you can restore the back to its working state and resolve the issue.
.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.
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.
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 the scripting symbol:
LEVELPLAY_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.