Elephant Ads
UPM Package for Elephant/Rollic Ads. This package contains both MoPub and Rollic SDKs.
Installation
Use the package manager UPM to install Elephant Ads.
com.triflesgames.elephantads
Setup
You can easily set up elephant ads by clicking "Configure Ads" from the "Elephant" menu on the top bar.
Usage
Add RollicAdsManager as a component to a persistant GameObject in the scene.
Push(RollicAdsEvents.ShowAd,RollicAdTypes.Rewarded);
RollicAdsManager.Instance.Subscribe(RollicAdsEvents.OnRewardedVideoFinished,GiveReward);
Update The Package
Before updating the package you have to make some changes in the files.Please read down below for the necessary changes.
RollicGames/Editor/CodeControlUtils.cs
private const string AssetsPathPrefix ="Assets/"
private const string AssetsPathPrefix = EnvVariables.PackagePath;
RollicGames/Editor/PostProcess.cs
XElement[] elements = XDocument.Load(@"Assets/RollicGames/Resources/SkanIds.xml").Descendants("dict").ToArray();
XElement[] elements = XDocument.Load(EnvVariables.PackagePath+ @"/RollicGames/Resources/SkanIds.xml").Descendants("dict").ToArray();
TriflesGames/Rollic/EnvVariables.cs
public const string PackageVersion = "1.0.0"; (Old Version Number)
public const string PackageVersion = "1.0.1"; (New Version Number - Please remember this version number
must equal to the version number in the package.json file.)
In case of deletion of .asmdef files
For MoPub
Create one .asmdef file in the MoPub/Scripts folder with the name of MoPubSdk and leave it with default options.
Create one .asmdef file in the MoPub/Scripts/ThirdParty folder with the name of MoPubSdk.ThirdParty.Editor. Change its platform to Editor only.
Create one .asmdef file in the MoPub/Scripts/Editor folder with the name of MoPubSdk.Editor. Change its platform to Editor only. Also add references for the
- MoPubSdk,
- MoPubSdk.ThirdParty.Editor.
For TriflesGames
Create one .asmdef file in the TriflesGames/Rollic folder with the name of RollicAdsHelper and leave it with default options.
Create one .asmdef file in the TriflesGames/Scripts folder with the name of TGRollicAds and leave it with default options. Add references for
- TriflesGames.ManagerFramework.Runtime,
- RollicSdk,
- MoPubSdk,
- TriflesGames.Base.Runtime.
For RollicGames
Create one .asmdef file in the RollicGames folder with the name of RollicSdk and leave it with default options. Add references for
- ElephantSDK,
- MoPubSdk,
- AdjustSDK,
- RollicAdsHelper.
Create one .asmdef file in the RollicGames/Editor folder with the name of RollicSdk.Editor. Change its platform to Editor only. Add references for
- RollicSdk,
- ElephantSdk,
- MoPubSdk,
- RollicAdsHelper.