Skip to content

Commit cf1b419

Browse files
Syncing changes from private repository
1 parent bc9a22b commit cf1b419

File tree

56 files changed

+998
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+998
-1
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file using the standards as defined at [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0).
3+
4+
### Version 5.0.0 *(2024-08-08)*
5+
6+
First version of the Chartboost Mediation Unity SDK - Unity Ads Adapter.
7+
8+
#Added
9+
- Support for the following `Unity Ads` dependencies. Notice adapter dependencies are optimistic and any patches and hot-fixes will be automatically picked up.:
10+
* Android: `com.chartboost:chartboost-mediation-adapter-unity-ads:5.4.12.+`
11+
* iOS: `ChartboostMediationAdapterUnityAds ~> 5.4.12.0`
12+
13+
- `UnityAdsAdapter.cs` with Configuration Properties for `Unity Ads`.
14+
- The following properties have been added in `UnityAdsAdapter.cs`
15+
* `string AdapterUnityVersion`
16+
* `string AdapterNativeVersion`
17+
* `string PartnerSDKVersion`
18+
* `string PartnerIdentifier`
19+
* `string PartnerDisplayName`
20+
* `bool TestMode`
21+
22+
- The following methods have been added in `UnityAdsAdapter.cs`
23+
* `void SetGDPRConsentOverride(bool gdprStatus)`
24+
* `void SetPrivacyConsentOverride(bool consentStatus)`

CHANGELOG.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package>
3+
<metadata>
4+
<id>Chartboost.CSharp.Mediation.Unity.Adapter.UnityAds</id>
5+
<version>5.0.0</version>
6+
<title>Chartboost Mediation Adapter - Unity Ads</title>
7+
<description>The Chartboost Mediation Unity SDK Adapter for Unity Ads.</description>
8+
<authors>Chartboost</authors>
9+
<owners>Chartboost</owners>
10+
<license type="file">LICENSE.md</license>
11+
<readme>README.md</readme>
12+
<projectUrl>https://www.chartboost.com/products/mediation/</projectUrl>
13+
<copyright>Copyright 2024</copyright>
14+
<tags>Chartboost, Ads, Mediation, Unity, Adapter, Unity Ads, cs</tags>
15+
<repository type="git" url="https://github.com/ChartBoost/chartboost-mediation-unity-adapter-unity-ads.git"/>
16+
<dependencies>
17+
<dependency id="Chartboost.CSharp.Mediation.Unity" version="5.0.0" />
18+
<dependency id="Chartboost.CSharp.Threading.Unity" version="1.0.1" />
19+
<dependency id="Chartboost.CSharp.Utilities.Unity" version="1.0.1" />
20+
<dependency id="Chartboost.CSharp.Logging.Unity" version="1.0.0" />
21+
</dependencies>
22+
</metadata>
23+
</package>

Chartboost.CSharp.Mediation.Unity.Adapter.UnityAds.nuspec.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<dependencies>
3+
<androidPackages>
4+
<!-- Android Adapter -->
5+
<androidPackage spec="com.chartboost:chartboost-mediation-adapter-unity-ads:5.4.12.+"/>
6+
</androidPackages>
7+
<iosPods>
8+
<!-- iOS Adapter -->
9+
<iosPod name="ChartboostMediationAdapterUnityAds" version="~> 5.4.12.0"/>
10+
11+
<!-- Partner iOS SDK-->
12+
<iosPod name="UnityAds" version="~> 4.12.0" addToAllTargets="false"/>
13+
</iosPods>
14+
</dependencies>

Editor/UnityAdsAdapterDependencies.xml.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright 2024 Chartboost Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

LICENSE.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,96 @@
1-
# chartboost-mediation-unity-adapter-unity-ads
1+
# Chartboost Mediation Unity SDK - UnityAds Adapter
2+
3+
Provides a list of externally configurable properties pertaining to the partner SDK that can be retrieved and set by publishers.
4+
5+
Dependencies for the adapter are now embedded in the package, and can be found at `com.chartboost.mediation.unity.adapter.unity-ads/Editor/UnityAdsAdapterDependencies.xml`.
6+
7+
# Installation
8+
9+
## Using the public [npm registry](https://www.npmjs.com/search?q=com.chartboost.mediation.unity.adapter.unity-ads)
10+
11+
In order to add the Chartboost Mediation Unity SDK - UnityAds Adapter to your project using the npm package, add the following to your Unity Project's ***manifest.json*** file. The scoped registry section is required in order to fetch packages from the NpmJS registry.
12+
13+
```json
14+
"dependencies": {
15+
"com.chartboost.mediation.unity.adapter.unity-ads": "5.0.0",
16+
...
17+
},
18+
"scopedRegistries": [
19+
{
20+
"name": "NpmJS",
21+
"url": "https://registry.npmjs.org",
22+
"scopes": [
23+
"com.chartboost"
24+
]
25+
}
26+
]
27+
```
28+
## Using the public [NuGet package](https://www.nuget.org/packages/Chartboost.CSharp.Mediation.Unity.Adapter.UnityAds)
29+
30+
To add the Chartboost Mediation Unity SDK - UnityAds Adapter to your project using the NuGet package, you will first need to add the [NugetForUnity](https://github.com/GlitchEnzo/NuGetForUnity) package into your Unity Project.
31+
32+
This can be done by adding the following to your Unity Project's ***manifest.json***
33+
34+
```json
35+
"dependencies": {
36+
"com.github-glitchenzo.nugetforunity": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity",
37+
...
38+
},
39+
```
40+
41+
Once <code>NugetForUnity</code> is installed, search for `Chartboost.CSharp.Mediation.Unity.Adapter.UnityAds` in the search bar of Nuget Explorer window(Nuget -> Manage Nuget Packages).
42+
You should be able to see the `Chartboost.CSharp.Mediation.Unity.Adapter.UnityAds` package. Choose the appropriate version and install.
43+
44+
# Usage
45+
The following code block exemplifies usage of the `UnityAdsAdapter.cs` configuration class.
46+
47+
## IPartnerAdapterConfiguration Properties
48+
49+
```csharp
50+
51+
// AdapterUnityVersion - The partner adapter Unity version, e.g: 5.0.0
52+
Debug.Log($"Adapter Unity Version: {UnityAdsAdapter.AdapterUnityVersion}");
53+
54+
// AdapterNativeVersion - The partner adapter version, e.g: 5.4.12.0.0
55+
Debug.Log($"Adapter Native Version: {UnityAdsAdapter.AdapterNativeVersion}");
56+
57+
// PartnerSDKVersion - The partner SDK version, e.g: 4.12.0
58+
Debug.Log($"Partner SDK Version: {UnityAdsAdapter.PartnerSDKVersion}");
59+
60+
// PartnerIdentifier - The partner ID for internal uses, e.g: unity
61+
Debug.Log($"Partner Identifier: {UnityAdsAdapter.PartnerIdentifier}");
62+
63+
// PartnerDisplayName - The partner name for external uses, e.g: Unity Ads
64+
Debug.Log($"Partner Display Name: {UnityAdsAdapter.PartnerDisplayName}");
65+
```
66+
67+
## Test Mode
68+
To enable test mode for the UnityAds adapter, the following property has been made available:
69+
70+
```csharp
71+
UnityAdsAdapter.TestMode = true;
72+
```
73+
74+
## Set GDPR Consent Override
75+
Use to manually set the consent status on the Unity Ads SDK.This is generally unnecessary as the Mediation SDK will set the consent status.automatically based on the latest consent info.
76+
77+
```csharp
78+
// Consent
79+
UnityAdsAdapter.SetGDPRConsentOverride(true);
80+
81+
82+
// No Consent
83+
UnityAdsAdapter.SetGDPRConsentOverride(false);
84+
```
85+
86+
## Set Privacy Consent Override
87+
88+
Use to manually set the consent status on the Unity Ads SDK. This is generally unnecessary as the Mediation SDK will set the consent status automatically based on the latest consent info.
89+
90+
```csharp
91+
// Consent
92+
UnityAdsAdapter.SetPrivacyConsentOverride(true);
93+
94+
// No Consent
95+
UnityAdsAdapter.SetPrivacyConsentOverride(false);
96+
```

0 commit comments

Comments
 (0)