├── CHANGELOG.md
├── CHANGELOG.md.meta
├── Editor.meta
├── Editor
├── BaseAdObjectInspector.cs
├── BaseAdObjectInspector.cs.meta
├── BuildConfig.meta
├── BuildConfig
│ ├── CASAndroidMediation.list
│ ├── CASAndroidMediation.list.meta
│ ├── CASSKAdNetworks.txt
│ ├── CASSKAdNetworks.txt.meta
│ ├── CASiOSMediation.list
│ ├── CASiOSMediation.list.meta
│ ├── cas_android_build_options.gradle
│ └── cas_android_build_options.gradle.meta
├── CASBaseDependencies.xml
├── CASBaseDependencies.xml.meta
├── CASEditorSettings.cs
├── CASEditorSettings.cs.meta
├── CASEditorUtils.cs
├── CASEditorUtils.cs.meta
├── CASIcons.meta
├── CASIcons
│ ├── cas_editoricon_banner.png
│ ├── cas_editoricon_banner.png.meta
│ ├── cas_editoricon_dark_banner.png
│ ├── cas_editoricon_dark_banner.png.meta
│ ├── cas_editoricon_dark_inter.png
│ ├── cas_editoricon_dark_inter.png.meta
│ ├── cas_editoricon_dark_mrec.png
│ ├── cas_editoricon_dark_mrec.png.meta
│ ├── cas_editoricon_dark_native.png
│ ├── cas_editoricon_dark_native.png.meta
│ ├── cas_editoricon_dark_reward.png
│ ├── cas_editoricon_dark_reward.png.meta
│ ├── cas_editoricon_inter.png
│ ├── cas_editoricon_inter.png.meta
│ ├── cas_editoricon_mrec.png
│ ├── cas_editoricon_mrec.png.meta
│ ├── cas_editoricon_native.png
│ ├── cas_editoricon_native.png.meta
│ ├── cas_editoricon_reward.png
│ └── cas_editoricon_reward.png.meta
├── CASInitSettignsInspector.cs
├── CASInitSettignsInspector.cs.meta
├── CASInternal.cs
├── CASInternal.cs.meta
├── CASPostGenerateGradle.cs
├── CASPostGenerateGradle.cs.meta
├── CASPostprocessBuild.cs
├── CASPostprocessBuild.cs.meta
├── CASPreprocessBuild.cs
├── CASPreprocessBuild.cs.meta
├── CASPreprocessGradle.cs
├── CASPreprocessGradle.cs.meta
├── CleverAdsSolutions-Editor.asmdef
├── CleverAdsSolutions-Editor.asmdef.meta
├── DependencyManager.cs
├── DependencyManager.cs.meta
├── ManagerIndexDrawer.cs
└── ManagerIndexDrawer.cs.meta
├── LICENSE.md
├── LICENSE.md.meta
├── Plugins.meta
├── Plugins
├── Android.meta
├── Android
│ ├── CASUnityBridge.aar
│ └── CASUnityBridge.aar.meta
├── iOS.meta
└── iOS
│ ├── CASUCallback.h
│ ├── CASUCallback.h.meta
│ ├── CASUCallback.m
│ ├── CASUCallback.m.meta
│ ├── CASUEnable.swift
│ ├── CASUEnable.swift.meta
│ ├── CASUInterface.m
│ ├── CASUInterface.m.meta
│ ├── CASUManager.h
│ ├── CASUManager.h.meta
│ ├── CASUManager.m
│ ├── CASUManager.m.meta
│ ├── CASUPluginUtil.h
│ ├── CASUPluginUtil.h.meta
│ ├── CASUPluginUtil.m
│ ├── CASUPluginUtil.m.meta
│ ├── CASUTypes.h
│ ├── CASUTypes.h.meta
│ ├── CASUView.h
│ ├── CASUView.h.meta
│ ├── CASUView.m
│ └── CASUView.m.meta
├── README.md
├── README.md.meta
├── Runtime.meta
├── Runtime
├── AdObject.meta
├── AdObject
│ ├── AppOpenAdObject.cs
│ ├── AppOpenAdObject.cs.meta
│ ├── BannerAdObject.cs
│ ├── BannerAdObject.cs.meta
│ ├── ConsentFlowAdObject.cs
│ ├── ConsentFlowAdObject.cs.meta
│ ├── InterstitialAdObject.cs
│ ├── InterstitialAdObject.cs.meta
│ ├── ManagerAdObject.cs
│ ├── ManagerAdObject.cs.meta
│ ├── ReturnToPlayAdObject.cs
│ ├── ReturnToPlayAdObject.cs.meta
│ ├── RewardedAdObject.cs
│ └── RewardedAdObject.cs.meta
├── CleverAdsSolutions.Common.dll
├── CleverAdsSolutions.Common.dll.meta
├── CleverAdsSolutions.Common.xml
├── CleverAdsSolutions.Common.xml.meta
├── CleverAdsSolutions.asmdef
├── CleverAdsSolutions.asmdef.meta
├── Common.meta
├── Common
│ ├── ATTrackingStatus.cs
│ ├── ATTrackingStatus.cs.meta
│ ├── MediationExtras.cs
│ ├── MediationExtras.cs.meta
│ ├── MobileAds.cs
│ └── MobileAds.cs.meta
├── Internal.meta
└── Internal
│ ├── Android.meta
│ ├── Android
│ ├── CASImpressionClient.cs
│ ├── CASImpressionClient.cs.meta
│ ├── CASJavaBridge.cs
│ ├── CASJavaBridge.cs.meta
│ ├── CASManagerClient.cs
│ ├── CASManagerClient.cs.meta
│ ├── CASSettingsClient.cs
│ ├── CASSettingsClient.cs.meta
│ ├── CASViewClient.cs
│ └── CASViewClient.cs.meta
│ ├── CASBase.cs
│ ├── CASBase.cs.meta
│ ├── CASFactory.cs
│ ├── CASFactory.cs.meta
│ ├── CASInitSettings.cs
│ ├── CASInitSettings.cs.meta
│ ├── Unity.meta
│ ├── Unity
│ ├── CASAppStateEventClient.cs
│ ├── CASAppStateEventClient.cs.meta
│ ├── CASImpressionClient.cs
│ ├── CASImpressionClient.cs.meta
│ ├── CASManagerClient.cs
│ ├── CASManagerClient.cs.meta
│ ├── CASSettingsClient.cs
│ ├── CASSettingsClient.cs.meta
│ ├── CASViewClient.cs
│ └── CASViewClient.cs.meta
│ ├── iOS.meta
│ └── iOS
│ ├── CASExterns.cs
│ ├── CASExterns.cs.meta
│ ├── CASImpressionClient.cs
│ ├── CASImpressionClient.cs.meta
│ ├── CASManagerClient.cs
│ ├── CASManagerClient.cs.meta
│ ├── CASSettingsClient.cs
│ ├── CASSettingsClient.cs.meta
│ ├── CASViewClient.cs
│ └── CASViewClient.cs.meta
├── Samples~
├── SampleComponents.meta
├── SampleComponents
│ ├── SampleComponents.unity
│ └── SampleComponents.unity.meta
├── SampleScripts.meta
└── SampleScripts
│ ├── CSharpSampleController.cs
│ ├── CSharpSampleController.cs.meta
│ ├── LoadScene.cs
│ ├── LoadScene.cs.meta
│ ├── SampleCSharp.unity
│ └── SampleCSharp.unity.meta
├── Source~
└── CleverAdsSolutions.Common
│ ├── .gitignore
│ ├── CleverAdsSolutions.Common.csproj
│ ├── CleverAdsSolutions.Common.sln
│ ├── README.md
│ └── Source
│ ├── AdError.cs
│ ├── AdMetaData.cs
│ ├── AdNetwork.cs
│ ├── AdPosition.cs
│ ├── AdSize.cs
│ ├── AdType.cs
│ ├── ConsentFlow.cs
│ ├── EventExecutor.cs
│ ├── IAdView.cs
│ ├── IAdsPreset.cs
│ ├── IAdsSettings.cs
│ ├── IManagerBuilder.cs
│ ├── IMediationManager.cs
│ ├── ITargetingOptions.cs
│ ├── InitialConfiguration.cs
│ ├── InitializationError.cs
│ ├── LastPageAdContent.cs
│ ├── LoadingManagerMode.cs
│ ├── MediationExtras.cs
│ └── PriceAccuracy.cs
├── package.json
└── package.json.meta
/CHANGELOG.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 679259c947b314e0b919c0b44a7072c7
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2d1176a6ecaa14793a8d0d6f25aa184c
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/BaseAdObjectInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bbb71efdfd59346ef982f364e2338b9a
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/BuildConfig.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8ecf8cdd98ead46ca967a7c857fa41da
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/BuildConfig/CASAndroidMediation.list:
--------------------------------------------------------------------------------
1 | {"version": "4.0.2", "simple": [{"id": 62, "name": "OptimalAds", "version": "4.0.2", "require": 65, "filter": 0, "contains": [0, 1, 10, 9, 3, 4, 5, 11, 14, 15, 19, 23, 24, 8], "labels": 0}, {"id": 63, "name": "FamiliesAds", "version": "4.0.2", "require": 65, "filter": 1, "contains": [0, 2, 3, 4, 1, 10, 11, 14, 6], "labels": 0}], "adapters": [{"id": 14, "name": "IronSource", "version": "8.8.0.0", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:ironsource:", "version": "8.8.0.0"}], "labels": 7}, {"id": 4, "name": "UnityAds", "version": "4.14.2.0", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:unity:", "version": "4.14.2.0"}], "labels": 7}, {"id": 0, "name": "GoogleAds", "altName": "AdMob", "version": "24.2.0.0", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:google:", "version": "24.2.0.0"}], "labels": 7}, {"id": 1, "name": "LiftoffMonetize", "version": "7.4.3.1", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:vungle:", "version": "7.4.3.1"}], "labels": 7}, {"id": 10, "name": "InMobi", "version": "10.8.2.1", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:inmobi:", "version": "10.8.2.1"}], "labels": 7}, {"id": 3, "name": "Chartboost", "version": "9.8.3.1", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:chartboost:", "version": "9.8.3.1"}], "source": "https://cboost.jfrog.io/artifactory/chartboost-ads/", "sourceGroups": ["com.chartboost"], "labels": 7}, {"id": 11, "name": "DTExchange", "version": "8.3.7.0", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:fyber:", "version": "8.3.7.0"}], "labels": 7}, {"id": 2, "name": "Kidoz", "version": "9.1.2.1", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:kidoz:", "version": "9.1.2.1"}], "labels": 7}, {"id": 6, "name": "SuperAwesome", "version": "9.4.0.1", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:superawesome:", "version": "9.4.0.1"}], "source": "https://aa-sdk.s3-eu-west-1.amazonaws.com/android_repo", "sourceGroups": ["tv.superawesome.sdk.publisher"], "labels": 7}, {"id": 23, "name": "Mintegral", "version": "16.9.71.0", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:mintegral:", "version": "16.9.71.0"}], "source": "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea", "sourceGroups": ["com.mbridge.msdk.oversea"], "labels": 7}, {"id": 5, "name": "AppLovin", "version": "13.2.0.0", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:applovin:", "version": "13.2.0.0"}], "labels": 7}, {"id": 24, "name": "Pangle", "version": "7.1.0.7", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:pangle:", "version": "7.1.0.7"}], "source": "https://artifact.bytedance.com/repository/pangle", "sourceGroups": ["com.pangle.global"], "labels": 7}, {"id": 19, "name": "Bigo", "version": "5.3.0.0", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:bigo:", "version": "5.3.0.0"}], "labels": 7}, {"id": 15, "name": "YandexAds", "version": "27.12.1.0", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:yandex:", "version": "27.12.1.0"}], "comment": "Yandex Metrica will also be included", "labels": 7}, {"id": 9, "name": "AudienceNetwork", "altName": "Meta", "version": "6.19.0.1", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:facebook:", "version": "6.19.0.1"}], "comment": "Required implementation of `Data processing options for Users in California`", "labels": 7}, {"id": 25, "name": "YsoNetwork", "version": "1.2.7.0", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:ysonetwork:", "version": "1.2.7.0"}], "source": "https://ysonetwork.s3.eu-west-3.amazonaws.com/sdk/android", "sourceGroups": ["com.ysocorp"], "labels": 7}, {"id": 8, "name": "CASExchange", "version": "4.0.2", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:cas-exchange:", "version": "4.0.2"}], "labels": 7}, {"id": 13, "name": "CrossPromotion", "version": "4.0.2", "require": 65, "filter": 1, "libs": [{"name": "com.cleveradssolutions:cas-promo:", "version": "4.0.2"}], "labels": 7}, {"id": 7, "name": "StartIO", "version": "5.1.0.1", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:startio:", "version": "5.1.0.1"}], "labels": 7}, {"id": 16, "name": "HyprMX", "version": "6.4.2.1", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:hyprmx:", "version": "6.4.2.1"}], "comment": "Focused on USA region only. Your apps must be approved for use", "labels": 7}, {"id": 20, "name": "Ogury", "version": "6.0.1.0", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:ogury:", "version": "6.0.1.0"}], "source": "https://maven.ogury.co", "sourceGroups": ["co.ogury", "co.ogury.module"], "labels": 7}, {"id": 21, "name": "Madex", "version": "1.7.1.0", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:madex:", "version": "1.7.1.0"}], "source": "https://repo.repsy.io/mvn/cleveradssolutions/proxy", "sourceGroups": ["sspnet.tech", "sspnet.tech.adapters"], "comment": "Focused on CIS region only.", "labels": 23}, {"id": 26, "name": "Prado", "version": "10.0.1.1", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:prado:", "version": "10.0.1.1"}], "labels": 23}, {"id": 18, "name": "Smaato", "version": "22.7.2.0", "require": 65, "filter": 0, "libs": [{"name": "com.cleveradssolutions:smaato:", "version": "22.7.2.0"}], "source": "https://s3.amazonaws.com/smaato-sdk-releases/", "sourceGroups": ["com.smaato.android.sdk"], "labels": 23}], "deprecated": ["FacebookAN", "StartApp", "Fyber", "FairBid", "DigitalTurbine", "Vungle", "Tapjoy", "AdColony", "BidMachine", "MyTarget", "DSPExchange", "LoopMe"]}
--------------------------------------------------------------------------------
/Editor/BuildConfig/CASAndroidMediation.list.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9a770f14986f144eaa6a2899a42711b7
3 | labels:
4 | - CleverAdsSolutions
5 | DefaultImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Editor/BuildConfig/CASSKAdNetworks.txt:
--------------------------------------------------------------------------------
1 | 22mmun2rn5
2 | 238da6jt44
3 | 24t9a8vw3c
4 | 24zw6aqk47
5 | 252b5q8x7y
6 | 275upjj5gd
7 | 294l99pt4k
8 | 2fnua5tdw4
9 | 2q884k2j68
10 | 2rq3zucswp
11 | 2tdux39lx8
12 | 2u9pt9hc89
13 | 32z4fx6l9h
14 | 33r6p7g8nc
15 | 3cgn6rq224
16 | 3l6bd9hu43
17 | 3qcr597p9d
18 | 3qy4746246
19 | 3rd42ekr43
20 | 3sh42y64q3
21 | 424m5254lk
22 | 4468km3ulz
23 | 44jx6755aq
24 | 44n7hlldy6
25 | 47vhws6wlr
26 | 488r3q3dtq
27 | 4dzt52r2t5
28 | 4fzdc2evr5
29 | 4mn522wn87
30 | 4pfyvq9l8r
31 | 4w7y6s5ca2
32 | 523jb4fst2
33 | 52fl2v3hgk
34 | 54nzkqm89y
35 | 55644vm79v
36 | 55y65gfgn7
37 | 577p5t736z
38 | 578prtvx9j
39 | 5a6flpkh64
40 | 5f5u5tfb26
41 | 5ghnmfs3dh
42 | 5l3tpt7t6e
43 | 5lm9lj6jb7
44 | 5mv394q32t
45 | 5tjdwbrq8w
46 | 627r9wr2y5
47 | 633vhxswh4
48 | 67369282zy
49 | 6964rsfnh4
50 | 6g9af3uyq4
51 | 6lz2ygh3q6
52 | 6p4ks3rnbw
53 | 6qx585k4p6
54 | 6rd35atwn8
55 | 6v7lgmsu45
56 | 6xzpu9s2p8
57 | 6yxyv74ff7
58 | 737z793b9f
59 | 74b6s63p6l
60 | 7953jerfzd
61 | 79pbpufp6p
62 | 79w64w269u
63 | 7bxrt786m8
64 | 7fbxrn65az
65 | 7fmhfwg9en
66 | 7k3cvf297u
67 | 7rz58n8ntl
68 | 7tnzynbdc7
69 | 7ug5zh24hu
70 | 84993kbrcf
71 | 866k9ut3g3
72 | 87u5trcl3r
73 | 88k8774x49
74 | 899vrgt9g8
75 | 89z7zv988g
76 | 8c4e2ghe7u
77 | 8m87ys6875
78 | 8qiegk9qfv
79 | 8r8llnkz5a
80 | 8s468mfl3y
81 | 8w3np9l82g
82 | 97r2b46745
83 | 9b89h5y424
84 | 9g2aggbj52
85 | 9nlqeag3gk
86 | 9rd848q2bz
87 | 9t245vhmpl
88 | 9vvzujtq5s
89 | 9wsyqb3ku7
90 | 9yg77x724h
91 | a2p9lx4jpn
92 | a7xqa6mtl2
93 | a8cz6cu7e5
94 | au67k4efj4
95 | av6w8kgt66
96 | axh5283zss
97 | b55w3d8y8z
98 | b9bk5wbcq9
99 | bvpn9ufa9b
100 | bxvub5ada5
101 | c3frkrj4fj
102 | c6k4g5qg8m
103 | c7g47wypnu
104 | cad8qz2s3j
105 | ce8ybjwass
106 | cg4yq2srnc
107 | cj5566h2ga
108 | cp8zw746q7
109 | cs644xg564
110 | cstr6suwn9
111 | cwn433xbcr
112 | d7g9azk84q
113 | dbu4b84rxf
114 | dcc9l689qj
115 | dd3a75yxkv
116 | dkc879ngq3
117 | dmv22haz9p
118 | dn942472g5
119 | dr774724x4
120 | dt3cjx1a9i
121 | dticjx1a9i
122 | dzg6xy7pwj
123 | e5fvkxwrpn
124 | ecpz2srf59
125 | eh6m2bh4zr
126 | ejvt5qm6ak
127 | eqhxz8m8av
128 | f38h382jlk
129 | f73kdq92p3
130 | f7s53z58qe
131 | feyaarzu9v
132 | fkak3gfpt6
133 | fq6vru337s
134 | fz2k2k5tej
135 | g28c52eehv
136 | g2y4y55b64
137 | g69uk9uh2b
138 | g6gcrrvk4p
139 | gfat3222tu
140 | ggvn48r87g
141 | glqzh8vgby
142 | gta8lk7p23
143 | gta9lk7p23
144 | gvmwg8q7h5
145 | h5jmj969g5
146 | h65wbv5k3f
147 | h8vml93bkz
148 | hb56zgv37p
149 | hdw39hrw9y
150 | hjevpa356n
151 | hs6bdukanm
152 | jb7bn6koa5
153 | jk2fsx2rgz
154 | k674qkevps
155 | k6y4y55b64
156 | kbd757ywx3
157 | kbmxgpxpgc
158 | klf5c3l5u5
159 | krvm3zuq6h
160 | l6nv3x923s
161 | l93v5h6a4m
162 | ln5gz23vtd
163 | lr83yxwka7
164 | ludvb6z3bs
165 | m297p6643m
166 | m2jqnlggk3
167 | m5mvw97r93
168 | m8dbw4sv7c
169 | mj797d8u6f
170 | mlmmfzh3r3
171 | mls7yz5dvl
172 | mp6xlyr22a
173 | mqn7fxpca7
174 | mtkv5xtk9e
175 | n38lu8286q
176 | n66cz3y3bx
177 | n6fk4nfna4
178 | n9x2a789qt
179 | nfqy3847ph
180 | nrt9jy4kw9
181 | nu4557a4je
182 | nzq8sh4pbs
183 | p78axxw29g
184 | pd25vrrwzn
185 | ppxm28t8ap
186 | prcb7njmu6
187 | pu4na253f3
188 | pwa73g5rt2
189 | pwdxu55a5a
190 | qlbq5gtkt8
191 | qqp299437r
192 | qu637u8glc
193 | qwpu75vrh2
194 | r26jy69rpl
195 | r45fhb6rf7
196 | r8lj5b58b5
197 | raa6f494kr
198 | rvh3l7un93
199 | rx5hdcabgc
200 | s39g8k73mm
201 | s69wq72ugq
202 | sczv5946wb
203 | su67r6k2v3
204 | t38b2kh725
205 | t3b3f7n3x8
206 | t6d3zquu66
207 | t7ky8fmwkd
208 | tl55sbb4fm
209 | tmhh9296z4
210 | tskbem2b5g
211 | tvvz7th9br
212 | u679fj5vs4
213 | uw77j35x4d
214 | uzqba5354d
215 | v4nxqhlyqp
216 | v72qych5uu
217 | v7896pgt74
218 | v79kvwwj4g
219 | v9wttpbfk9
220 | vc83br9sjg
221 | vcra2ehyfk
222 | vhf287vqwu
223 | vutu7akeur
224 | w28pnjg2k4
225 | w7jznl3r6g
226 | w9q455wk68
227 | wg4vff78zm
228 | wzmmz9fp6w
229 | x2jnk7ly8j
230 | x44k69ngh6
231 | x5854y7y24
232 | x5l83yy675
233 | x8jxxk4ff5
234 | x8uqf25wch
235 | x8yj322td6
236 | xga6mpmplv
237 | xmn954pzmp
238 | xx9sdjej2w
239 | xy9t38ct57
240 | y45688jllp
241 | y5ghdn5j9k
242 | y755zyxw56
243 | yclnxrl5pm
244 | ydx93a7ass
245 | yrqqpx2mcb
246 | z24wtl6j62
247 | z4gj7hsk7h
248 | z5b3gh5ugf
249 | z959bm4gru
250 | zh3b7bxvad
251 | zmvfpc5aq8
252 | zq492l623r
253 |
--------------------------------------------------------------------------------
/Editor/BuildConfig/CASSKAdNetworks.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4cbddc350c3214c478cb6871ca2fd0b1
3 | labels:
4 | - CleverAdsSolutions
5 | TextScriptImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Editor/BuildConfig/CASiOSMediation.list:
--------------------------------------------------------------------------------
1 | {"version": "4.0.2", "simple": [{"id": 62, "name": "OptimalAds", "version": "4.0.2", "require": 65, "filter": 0, "contains": [0, 1, 10, 9, 3, 4, 5, 11, 14, 15, 19, 23, 24, 8], "labels": 0}, {"id": 63, "name": "FamiliesAds", "version": "4.0.2", "require": 65, "filter": 1, "contains": [0, 1, 2, 3, 4, 10, 23, 14, 15, 6, 11], "labels": 0}], "adapters": [{"id": 14, "name": "IronSource", "version": "8.8.0.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationIronSource", "version": "8.8.0.0"}], "labels": 7}, {"id": 4, "name": "UnityAds", "version": "4.14.2.0", "require": 14, "filter": 1, "libs": [{"name": "CASMediationUnityAds", "version": "4.14.2.0"}], "labels": 7}, {"id": 0, "name": "GoogleAds", "altName": "AdMob", "version": "12.3.0.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationGoogleAds", "version": "12.3.0.0"}], "labels": 47}, {"id": 1, "name": "LiftoffMonetize", "version": "7.5.0.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationLiftoffMonetize", "version": "7.5.0.0"}], "labels": 47}, {"id": 10, "name": "InMobi", "version": "10.8.2.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationInMobi", "version": "10.8.2.0"}], "embedPath": ["InMobiSDK/InMobiSDK.xcframework"], "labels": 7}, {"id": 3, "name": "Chartboost", "version": "9.8.1.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationChartboost", "version": "9.8.1.0"}], "labels": 7}, {"id": 11, "name": "DTExchange", "version": "8.3.6.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationDTExchange", "version": "8.3.6.0"}], "labels": 7}, {"id": 2, "name": "Kidoz", "version": "9.2.0.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationKidoz", "version": "9.2.0.0"}], "labels": 7}, {"id": 6, "name": "SuperAwesome", "version": "9.4.0.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationSuperAwesome", "version": "9.4.0.0"}], "labels": 7}, {"id": 23, "name": "Mintegral", "version": "7.7.7.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationMintegral", "version": "7.7.7.0"}], "labels": 47}, {"id": 5, "name": "AppLovin", "version": "13.2.0.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationAppLovin", "version": "13.2.0.0"}], "embedPath": ["AppLovinSDK/applovin-ios-sdk-13.2.0/AppLovinSDK.xcframework"], "labels": 47}, {"id": 24, "name": "Pangle", "version": "7.1.1.0.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationPangle", "version": "7.1.1.0.0"}], "labels": 47}, {"id": 19, "name": "Bigo", "version": "4.7.0.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationBigo", "version": "4.7.0.0"}], "labels": 47}, {"id": 15, "name": "YandexAds", "version": "7.12.1.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationYandexAds", "version": "7.12.1.0"}], "comment": "Yandex Metrica will also be added to the app", "labels": 47}, {"id": 9, "name": "AudienceNetwork", "altName": "Meta", "version": "6.17.1.0", "require": 5, "filter": 0, "libs": [{"name": "CASMediationAudienceNetwork", "version": "6.17.1.0"}], "comment": "Required implementation of `Data processing options for Users in California` and `Advertising Tracking Enabled", "labels": 15}, {"id": 25, "name": "YsoNetwork", "version": "1.1.31.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationYsoNetwork", "version": "1.1.31.0"}], "embedPath": ["YsoNetworkSDK/YsoNetwork.xcframework"], "labels": 7}, {"id": 8, "name": "CASExchange", "version": "4.0.2.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationCASExchange", "version": "4.0.2.0"}], "labels": 15}, {"id": 13, "name": "CrossPromo", "version": "4.0.2.0", "require": 65, "filter": 1, "libs": [{"name": "CASMediationCrossPromo", "version": "4.0.2.0"}], "labels": 7}, {"id": 7, "name": "StartIO", "version": "4.10.5.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationStartIO", "version": "4.10.5.0"}], "embedPath": ["StartAppSDK/StartApp.xcframework"], "labels": 7}, {"id": 16, "name": "HyprMX", "version": "6.4.2.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationHyprMX", "version": "6.4.2.0"}], "embedPath": ["HyprMX/HyprMX.xcframework"], "comment": "Focused on USA region only", "labels": 7}, {"id": 20, "name": "Ogury", "version": "5.0.2.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationOgury", "version": "5.0.2.0"}], "embedPath": ["OguryAds/OMSDK_Ogury.xcframework"], "labels": 7}, {"id": 21, "name": "Madex", "version": "1.7.0.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationMadex", "version": "1.7.0.0"}], "embedPath": ["MadexSDK/MadexSDK.xcframework", "SspnetCore/SspnetCore.xcframework", "SspnetDsp/SspnetDsp.xcframework"], "comment": "Focused on CIS region only", "labels": 22}, {"id": 26, "name": "Prado", "version": "10.0.1.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationPrado", "version": "10.0.1.0"}], "labels": 23}, {"id": 18, "name": "Smaato", "version": "22.9.3.0", "require": 65, "filter": 0, "libs": [{"name": "CASMediationSmaato", "version": "22.9.3.0"}], "embedPath": ["smaato-ios-sdk/vendor/OMSDK_Smaato.xcframework", "smaato-ios-sdk/SmaatoSDKCore.xcframework", "smaato-ios-sdk/SmaatoSDKInAppBidding.xcframework", "smaato-ios-sdk/SmaatoSDKInterstitial.xcframework", "smaato-ios-sdk/SmaatoSDKNative.xcframework", "smaato-ios-sdk/SmaatoSDKOpenMeasurement.xcframework", "smaato-ios-sdk/SmaatoSDKOutstream.xcframework", "smaato-ios-sdk/SmaatoSDKRewardedAds.xcframework", "smaato-ios-sdk/SmaatoSDKRichMedia.xcframework", "smaato-ios-sdk/SmaatoSDKVideo.xcframework"], "labels": 23}], "deprecated": ["FacebookAN", "StartApp", "Fyber", "FairBid", "DigitalTurbine", "Vungle", "Tapjoy", "AdColony", "BidMachine", "MyTarget", "DSPExchange", "LoopMe"]}
--------------------------------------------------------------------------------
/Editor/BuildConfig/CASiOSMediation.list.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 53aa9226de3cc430ea9121515ac15725
3 | labels:
4 | - CleverAdsSolutions
5 | DefaultImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Editor/BuildConfig/cas_android_build_options.gradle:
--------------------------------------------------------------------------------
1 | android {
2 | packagingOptions {
3 | pickFirst "META-INF/kotlinx_coroutines_core.version"
4 | pickFirst "META-INF/core-utils_release.kotlin_module"
5 | }
6 | }
--------------------------------------------------------------------------------
/Editor/BuildConfig/cas_android_build_options.gradle.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9a9d2612f670041768d928c51f3e06c9
3 | labels:
4 | - CleverAdsSolutions
5 | DefaultImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Editor/CASBaseDependencies.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | https://github.com/cleveradssolutions/CAS-Specs.git
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Editor/CASBaseDependencies.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4b90820da2982420b9a37faf1f47daa5
3 | labels:
4 | - CleverAdsSolutions
5 | - gvh
6 | TextScriptImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Editor/CASEditorSettings.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using UnityEngine;
5 | using UnityEditor;
6 |
7 | namespace CAS.UEditor
8 | {
9 | [Serializable]
10 | public class CASEditorSettings : ScriptableObject
11 | {
12 | public bool autoCheckForUpdatesEnabled = true;
13 | public bool buildPreprocessEnabled = true;
14 |
15 | public Permission permissionAdId = Permission.Auto;
16 |
17 | public bool generateIOSDeepLinksForPromo = true;
18 | public string attributionReportEndpoint = null;
19 |
20 | ///
21 | /// Override Gradle Wrapper propery.
22 | /// distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
23 | /// Supported strings with full https url or just version number, for example "7.2".
24 | ///
25 | public string overrideGradleWrapperVersion = "";
26 | ///
27 | /// Override Android Gradle Plugin version (Gradle Build Tools).
28 | /// plugin id 'com.android.application' version '7.1.2'
29 | /// or
30 | /// classpath 'com.android.tools.build:gradle:4.0.1'
31 | /// Supported version strings only, for example "4.0.1".
32 | /// If you are override the Android Gradle Plugin version, make sure it is compatible with the Gradle Wrapper version.
33 | /// See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/build/releases/gradle-plugin#updating-gradle
34 | ///
35 | public string overrideGradlePluginVersion = "";
36 |
37 | ///
38 | /// {key}.lproj Language code (ISO-639)
39 | /// NSUserTrackingUsageDescription = {value}
40 | ///
41 | /// https://www.ibabbleon.com/iOS-Language-Codes-ISO-639.html
42 | ///
43 | public KeyValuePair[] userTrackingUsageDescription = new KeyValuePair[0];
44 |
45 |
46 | #if UNITY_2022_2_OR_NEWER
47 | // Unity 2022.2 migrated to valid gradle 7.1.2
48 | public bool updateGradlePluginVersion { get { return false; } }
49 | #else
50 | public bool updateGradlePluginVersion = true;
51 | #endif
52 |
53 | public static CASEditorSettings Load(bool createAsset = false)
54 | {
55 | var asset = CASEditorUtils.GetSettingsAsset("CASEditorSettings",
56 | CASEditorUtils.editorFolderPath, typeof(CASEditorSettings), createAsset, null);
57 | if (asset)
58 | return (CASEditorSettings)asset;
59 | return CreateInstance();
60 | }
61 |
62 | public bool isUseAdvertiserIdLimited(Audience audience)
63 | {
64 | var permission = permissionAdId;
65 | if (permission == Permission.Auto)
66 | return audience == Audience.Children;
67 | return permission == Permission.Removed;
68 | }
69 |
70 | public enum Permission
71 | {
72 | Auto = 0,
73 | Required = 1,
74 | Removed = 2
75 | }
76 | }
77 |
78 | [CustomEditor(typeof(CASEditorSettings))]
79 | internal class CASEditorSettingsInspector : Editor
80 | {
81 | protected override void OnHeaderGUI()
82 | {
83 | EditorGUILayout.Space();
84 | EditorGUILayout.BeginHorizontal();
85 | GUILayout.Label("CAS.AI", HelpStyles.largeTitleStyle);
86 | GUILayout.Label("Editor Settings", HelpStyles.largeTitleStyle, GUILayout.ExpandWidth(false));
87 | EditorGUILayout.EndHorizontal();
88 | EditorGUILayout.Space();
89 | }
90 |
91 | public override void OnInspectorGUI()
92 | {
93 | EditorGUILayout.HelpBox("This Asset is created automatically to store Unity Editor behavior settings.", MessageType.Info);
94 | EditorGUILayout.HelpBox("Use the 'Assets > CleverAdsSolutions > [Platform] Settings' menu to change the settings.", MessageType.Info);
95 | EditorGUILayout.HelpBox("Feel free to move this and other assets from 'CleverAdsSolutions/Editor' to any Editor folder in the project that is convenient for you.", MessageType.Info);
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/Editor/CASEditorSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a595f7bff19a04697a1af11f2ef2f5a6
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/CASEditorUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b8ebd913121d546b18e0f4b7b688297b
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/CASIcons.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c70fe8528dc2a48c797ba47607ba034d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_banner.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_banner.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be19d1ae77ffb428bbbbae63d1d61e47
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 0
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: 271b473f34fc8468a9f5c5ca18db24db
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_dark_banner.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_banner.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 56ca5dfdbb65548ebb3ed9a6f0b85818
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 0
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: 8d87df5cc3cb24ec885c782c9223560c
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_inter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_dark_inter.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_inter.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 257bad35573504a11b6e7a1c9417e9df
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 0
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: 8a2f8d577d9b040dc96d9b00f186b6ff
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_mrec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_dark_mrec.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_mrec.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7e3fda82eee7741d187e99267c5ce20b
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 0
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: 70381e423347e46a2a0faece33bceec3
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_native.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_dark_native.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_native.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9418fd4b6f045433cb5ef72cdd3e701a
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 0
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: 43c795874c1ef4b02aeb9b82bec5672f
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_reward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_dark_reward.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_dark_reward.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 04a0095f1b8af40d58d653f5ad8b1fbe
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 0
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: a18518f7ddb1042388b7351b8e893fc1
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_inter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_inter.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_inter.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a82a6da6812684f729e00b358a307671
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 1
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: d44e2b07d365741b39d2acc8a6cbc46e
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_mrec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_mrec.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_mrec.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 197c2276097bd45b0ac0e0a4ef58a529
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 1
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: 9f425b41e0a3d41808a6dee108bb1e20
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_native.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_native.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_native.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f276c06ecab4244a883d11b531139346
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 1
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: f19a85e30cf3a4abca520074c14a1d41
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_reward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Editor/CASIcons/cas_editoricon_reward.png
--------------------------------------------------------------------------------
/Editor/CASIcons/cas_editoricon_reward.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5fadd73d381ac455099c1843cf39e0aa
3 | labels:
4 | - CleverAdsSolutions
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | externalObjects: {}
8 | serializedVersion: 9
9 | mipmaps:
10 | mipMapMode: 0
11 | enableMipMap: 0
12 | sRGBTexture: 1
13 | linearTexture: 0
14 | fadeOut: 0
15 | borderMipMap: 0
16 | mipMapsPreserveCoverage: 0
17 | alphaTestReferenceValue: 0.5
18 | mipMapFadeDistanceStart: 1
19 | mipMapFadeDistanceEnd: 3
20 | bumpmap:
21 | convertToNormalMap: 0
22 | externalNormalMap: 0
23 | heightScale: 0.25
24 | normalMapFilter: 0
25 | isReadable: 1
26 | streamingMipmaps: 0
27 | streamingMipmapsPriority: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: -1
37 | aniso: 1
38 | mipBias: -100
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | maxTextureSizeSet: 0
60 | compressionQualitySet: 0
61 | textureFormatSet: 0
62 | platformSettings:
63 | - serializedVersion: 2
64 | buildTarget: DefaultTexturePlatform
65 | maxTextureSize: 2048
66 | resizeAlgorithm: 0
67 | textureFormat: -1
68 | textureCompression: 1
69 | compressionQuality: 50
70 | crunchedCompression: 0
71 | allowsAlphaSplitting: 0
72 | overridden: 0
73 | androidETC2FallbackOverride: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID: 5235a80916c8141db82702e19cedb5fb
81 | vertices: []
82 | indices:
83 | edges: []
84 | weights: []
85 | spritePackingTag:
86 | pSDRemoveMatte: 0
87 | pSDShowRemoveMatteOption: 0
88 | userData:
89 | assetBundleName:
90 | assetBundleVariant:
91 |
--------------------------------------------------------------------------------
/Editor/CASInitSettignsInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7550116580687b3419166fd390a8907a
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/CASInternal.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14182ef6164124de99cc6574187716a6
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/CASPostGenerateGradle.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 33f169a85ca8840278e8959da3605425
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/CASPostprocessBuild.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: baa1a508ce4a249a9bec9a251962acae
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/CASPreprocessBuild.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 317107cc5d821a5469868be5b40d43d5
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/CASPreprocessGradle.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using System.Collections.Generic;
5 | using System.IO;
6 | using System.Reflection;
7 | using UnityEditor;
8 | using UnityEngine;
9 |
10 | namespace CAS.UEditor
11 | {
12 | using Utils = CASEditorUtils;
13 |
14 | internal static class CASPreprocessGradle
15 | {
16 | [Obsolete("No longer used")]
17 | internal static void Configure(CASEditorSettings settings)
18 | {
19 | Configure();
20 | }
21 |
22 | internal static void Configure()
23 | {
24 | #if UNITY_6000_0_OR_NEWER
25 | // TODO Implement Unity 6 update flags
26 | #elif UNITY_2022_3_OR_NEWER
27 | UpdateGradleTemplateIfNeed(Utils.mainGradlePath, "sourceCompatibility JavaVersion.VERSION_11");
28 | UpdateGradleTemplateIfNeed(Utils.projectGradlePath, "id 'com.android.application' version");
29 | #endif
30 | }
31 |
32 | internal static void UpdateGradleTemplateIfNeed(string path, string requiredLine)
33 | {
34 | if (!File.Exists(path))
35 | return;
36 |
37 | try
38 | {
39 | using (var reader = new StreamReader(path))
40 | {
41 | string line = reader.ReadLine();
42 | while (line != null)
43 | {
44 | if (line.Contains(requiredLine))
45 | return;
46 |
47 | line = reader.ReadLine();
48 | }
49 | }
50 | TryEnableGradleTemplate(path);
51 | }
52 | catch (Exception e)
53 | {
54 | Debug.LogException(e);
55 | }
56 | }
57 |
58 | internal static string[] TryEnableGradleTemplate(string assetPath)
59 | {
60 | var fileName = Path.GetFileName(assetPath);
61 | var internalTemplate = GetUnityAndroidToolsPath("GradleTemplates", fileName);
62 |
63 | if (!File.Exists(internalTemplate))
64 | {
65 | Debug.LogError(Utils.logTag + "Template file not found: " + internalTemplate);
66 | return null;
67 | }
68 | try
69 | {
70 | var fileLines = File.ReadAllLines(internalTemplate);
71 | Utils.WriteToAsset(assetPath, fileLines);
72 | Utils.Log("Gradle template activated: " + assetPath);
73 | return fileLines;
74 | }
75 | catch (Exception e)
76 | {
77 | Debug.LogException(e);
78 | return null;
79 | }
80 | }
81 |
82 | internal static Version GetGradleWrapperVersion()
83 | {
84 | string gradleLibPath;
85 | if (IsUsedGradleWrapperEmbeddedInUnity())
86 | gradleLibPath = GetUnityAndroidToolsPath("gradle", "lib");
87 | else
88 | gradleLibPath = Path.Combine(EditorPrefs.GetString("GradlePath"), "lib");
89 |
90 | if (!Directory.Exists(gradleLibPath))
91 | return null;
92 |
93 | foreach (var file in Directory.GetFiles(gradleLibPath, "gradle-wrapper-*.jar"))
94 | {
95 | try
96 | {
97 | var fileName = Path.GetFileNameWithoutExtension(file);
98 | return new Version(fileName.Substring(fileName.LastIndexOf('-') + 1));
99 | }
100 | catch (Exception e)
101 | {
102 | Debug.LogException(e);
103 | }
104 | }
105 | return null;
106 | }
107 |
108 | private static bool IsUsedGradleWrapperEmbeddedInUnity()
109 | {
110 | return EditorPrefs.GetBool("GradleUseEmbedded");
111 | }
112 |
113 | private static string GetUnityAndroidToolsPath(params string[] parts)
114 | {
115 | var result = GetUnityAndroidToolsDirPath();
116 | for (int i = 0; i < parts.Length; i++)
117 | result = Path.Combine(result, parts[i]);
118 |
119 | return Path.GetFullPath(result);
120 | }
121 |
122 | private static string GetUnityAndroidToolsDirPath()
123 | {
124 | // Alternate of internal unity method
125 | // BuildPipeline.GetBuildToolsDirectory( ( BuildTarget )13 );
126 | try
127 | {
128 | return (string)typeof(BuildPipeline)
129 | .GetMethod("GetBuildToolsDirectory", BindingFlags.Static | BindingFlags.NonPublic)
130 | .Invoke(null, new object[] { BuildTarget.Android });
131 | }
132 | catch { }
133 |
134 | // App path ends `version/Unity.app` or `version/Editor/Unity.exe`
135 | var appPath = EditorApplication.applicationPath;
136 | var result = Path.GetDirectoryName(EditorApplication.applicationPath);
137 | // Windows path: 2020.3.11\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib
138 | // Macos path: 2020.3.11/PlaybackEngines/AndroidPlayer/Tools/gradle/lib
139 | if (appPath.EndsWith(".exe"))
140 | result = Path.Combine(result, "Data");
141 | return Path.Combine(Path.Combine(Path.Combine(result, "PlaybackEngines"), "AndroidPlayer"), "Tools");
142 | }
143 |
144 | }
145 | }
--------------------------------------------------------------------------------
/Editor/CASPreprocessGradle.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b31a774a723754666bdea1977d87e9aa
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/CleverAdsSolutions-Editor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "CleverAdsSolutions-Editor",
3 | "rootNamespace": "",
4 | "references": [
5 | "CleverAdsSolutions"
6 | ],
7 | "includePlatforms": [
8 | "Editor"
9 | ],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": false,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": true,
15 | "defineConstraints": [],
16 | "versionDefines": [],
17 | "noEngineReferences": false
18 | }
--------------------------------------------------------------------------------
/Editor/CleverAdsSolutions-Editor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a470a32af3af2fb41ad6d76779084ef5
3 | labels:
4 | - CleverAdsSolutions
5 | AssemblyDefinitionImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Editor/DependencyManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c8ce9291c8c84ba89f51f22785f08c5
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Editor/ManagerIndexDrawer.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using CAS.UEditor;
4 | using UnityEditor;
5 | using UnityEngine;
6 |
7 | namespace CAS.AdObject
8 | {
9 | [CustomPropertyDrawer( typeof( ManagerIndex ) )]
10 | [CanEditMultipleObjects]
11 | internal class ManagerIndexDrawer : PropertyDrawer
12 | {
13 | private string[] androidIDs;
14 | private string[] iosIDs;
15 |
16 | public override void OnGUI( Rect position, SerializedProperty property, GUIContent label )
17 | {
18 | if (androidIDs == null)
19 | androidIDs = GetIDS( BuildTarget.Android );
20 | if (iosIDs == null)
21 | iosIDs = GetIDS( BuildTarget.iOS );
22 | var android = property.FindPropertyRelative( "android" );
23 | var ios = property.FindPropertyRelative( "ios" );
24 | position.yMax -= position.height * 0.66f;
25 | EditorGUI.LabelField( position, "Mediaiton manager" );
26 | position.y += position.height;
27 | EditorGUI.indentLevel++;
28 | android.intValue = EditorGUI.Popup( position, "Android", android.intValue, androidIDs );
29 | position.y += position.height;
30 | ios.intValue = EditorGUI.Popup( position, "iOS", ios.intValue, iosIDs );
31 | EditorGUI.indentLevel--;
32 | }
33 |
34 | public override float GetPropertyHeight( SerializedProperty property, GUIContent label )
35 | {
36 | return EditorGUIUtility.singleLineHeight * 3.0f + 3.0f;
37 | }
38 |
39 | private string[] GetIDS( BuildTarget target )
40 | {
41 | var settings = CASEditorUtils.GetSettingsAsset( target, false );
42 | if (settings && settings.managersCount > 0)
43 | {
44 | var result = new string[settings.managersCount];
45 | for (int i = 0; i < settings.managersCount; i++)
46 | result[i] = settings.GetManagerId( i );
47 | if (result.Length > 1 || !string.IsNullOrEmpty( result[0] ))
48 | return result;
49 | }
50 | return new[] { "Default" };
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/Editor/ManagerIndexDrawer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 157f4bfbf02f449c2af4a4edafb10546
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/LICENSE.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 802b3e2e177a34ce5a23728de489ca45
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bd47650ad4f2049328b537aa35ba0c76
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Plugins/Android.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cf9a782995dd4419e8ae4ce9ba65efd9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Plugins/Android/CASUnityBridge.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Plugins/Android/CASUnityBridge.aar
--------------------------------------------------------------------------------
/Plugins/Android/CASUnityBridge.aar.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 63575bec0981c469e913eecad2fb538d
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 0
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | Android: Android
18 | second:
19 | enabled: 1
20 | settings: {}
21 | - first:
22 | Any:
23 | second:
24 | enabled: 0
25 | settings: {}
26 | - first:
27 | Editor: Editor
28 | second:
29 | enabled: 0
30 | settings:
31 | DefaultValueInitialized: true
32 | userData:
33 | assetBundleName:
34 | assetBundleVariant:
35 |
--------------------------------------------------------------------------------
/Plugins/iOS.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd15a5d6efebf4968aac58b64ed7ce49
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUCallback.h:
--------------------------------------------------------------------------------
1 | //
2 | // CASUCallback.h
3 | // CASUnityPlugin
4 | //
5 | // Copyright © 2025 CleverAdsSolutions LTD, CAS.AI. All rights reserved.
6 | //
7 |
8 | #ifndef CASUCallback_h
9 | #define CASUCallback_h
10 |
11 | #import
12 | #import
13 | #import "CASUTypes.h"
14 |
15 | @class CASUManager;
16 |
17 | @interface CASUCallback : NSObject
18 |
19 | - (nonnull instancetype)initWithType:(int)type
20 | client:(_Nonnull CASManagerClientRef *_Nonnull)client;
21 |
22 | @property (nonatomic, assign) int adType;
23 | @property (nonatomic, assign) _Nonnull CASManagerClientRef *_Nonnull client;
24 | @property (nonatomic, assign, nullable) CASUActionCallback actionCallback;
25 | @property (nonatomic, assign, nullable) CASUImpressionCallback impressionCallback;
26 | @property (nonatomic, strong, nullable) CASContentInfo *impression;
27 | - (void)didCompletedAd;
28 | - (void)didAdNotReadyToPresent;
29 |
30 | @end
31 |
32 | #endif /* ifndef CASUCallback_h */
33 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUCallback.h.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48a2e4175a91c45c8b8e6e8824a3f097
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 0
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | userData:
47 | assetBundleName:
48 | assetBundleVariant:
49 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUCallback.m:
--------------------------------------------------------------------------------
1 | //
2 | // CASUCallback.m
3 | // CASUnityPlugin
4 | //
5 | // Copyright © 2025 CleverAdsSolutions LTD, CAS.AI. All rights reserved.
6 | //
7 |
8 | #import "CASUCallback.h"
9 | #import "CASUManager.h"
10 | #import "CASUPluginUtil.h"
11 |
12 | const char * CASUStringToUnity(NSString *str);
13 |
14 | @implementation CASUCallback
15 |
16 | - (instancetype)initWithType:(int)type
17 | client:(CASManagerClientRef _Nonnull *)client {
18 | self = [super init];
19 |
20 | if (self) {
21 | _adType = type;
22 | _client = client;
23 | }
24 |
25 | return self;
26 | }
27 |
28 |
29 | - (void)didCompletedAd {
30 | if (self.adType == kCASUType_REWARD) {
31 | extern bool _didResignActive;
32 |
33 | if (_didResignActive) {
34 | return;
35 | }
36 |
37 | if (self.actionCallback) {
38 | self.actionCallback(self.client, kCASUAction_COMPLETED, self.adType, 0, NULL);
39 | }
40 | }
41 | }
42 | - (void)didAdNotReadyToPresent{
43 | if (self.actionCallback) {
44 | CASError* error = CASError.notReady;
45 | self.actionCallback(self.client, kCASUAction_SHOW_FAILED, self.adType, (int)error.code, CASUStringToUnity(error.description));
46 | }
47 |
48 | // Inter type sets only for true Inter impression/
49 | // After impression done need reset type to AppReturn
50 | if (self.adType == kCASUType_INTER) {
51 | self.adType = kCASUType_APP_RETURN;
52 | }
53 | }
54 |
55 | // MARK: CASScreenContentDelegate
56 | - (void)screenAdDidLoadContent:(id)ad {
57 | if (self.actionCallback) {
58 | self.actionCallback(self.client, kCASUAction_LOADED,
59 | self.adType == kCASUType_APP_RETURN ? kCASUType_INTER : self.adType,
60 | 0, NULL);
61 | }
62 | }
63 |
64 | - (void)screenAd:(id)ad didFailToLoadWithError:(CASError *)error {
65 | if (self.actionCallback) {
66 | self.actionCallback(self.client, kCASUAction_FAILED,
67 | self.adType == kCASUType_APP_RETURN ? kCASUType_INTER : self.adType,
68 | (int)error.code, CASUStringToUnity(error.description));
69 | }
70 | }
71 |
72 | - (void)screenAdWillPresentContent:(id)ad {
73 | [CASUPluginUtil onAdsWillPressent];
74 |
75 | if (self.impressionCallback) {
76 | self.impression = ad.contentInfo;
77 | self.impressionCallback(self.client, kCASUAction_SHOWN, self.adType, (__bridge CASImpressionRef)self.impression);
78 | }
79 | }
80 |
81 | - (void)screenAdDidClickContent:(id)ad {
82 | if (self.actionCallback) {
83 | self.actionCallback(self.client, kCASUAction_CLICKED, self.adType, 0, NULL);
84 | }
85 | }
86 |
87 | - (void)screenAd:(id)ad didFailToPresentWithError:(CASError *)error {
88 | extern bool _didResignActive;
89 |
90 | if (_didResignActive) {
91 | return;
92 | }
93 |
94 | [CASUPluginUtil onAdsDidClosed];
95 |
96 | if (self.actionCallback) {
97 | self.actionCallback(self.client, kCASUAction_SHOW_FAILED, self.adType, (int)error.code, CASUStringToUnity(error.description));
98 | }
99 |
100 | // Inter type sets only for true Inter impression/
101 | // After impression done need reset type to AppReturn
102 | if (self.adType == kCASUType_INTER) {
103 | self.adType = kCASUType_APP_RETURN;
104 | }
105 | }
106 |
107 | - (void)screenAdDidDismissContent:(id)ad {
108 | extern bool _didResignActive;
109 |
110 | if (_didResignActive) {
111 | // We are in the middle of the shutdown sequence, and at this point unity runtime is already destroyed.
112 | // We shall not call unity API, and definitely not script callbacks, so nothing to do here
113 | return;
114 | }
115 |
116 | [CASUPluginUtil onAdsDidClosed];
117 |
118 | if (self.actionCallback) {
119 | self.actionCallback(self.client, kCASUAction_CLOSED, self.adType, 0, NULL);
120 | }
121 |
122 | // Inter type sets only for true Inter impression/
123 | // After impression done need reset type to AppReturn
124 | if (self.adType == kCASUType_INTER) {
125 | self.adType = kCASUType_APP_RETURN;
126 | }
127 | }
128 |
129 | // MARK: CASImpressionDelegate
130 | - (void)adDidRecordImpressionWithInfo:(CASContentInfo *)info {
131 | extern bool _didResignActive;
132 |
133 | if (_didResignActive) {
134 | return;
135 | }
136 |
137 | if (self.impressionCallback) {
138 | self.impression = info;
139 | self.impressionCallback(self.client, kCASUAction_IMPRESSION, self.adType, (__bridge CASImpressionRef)info);
140 | }
141 | }
142 |
143 | @end
144 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUCallback.m.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7d7a3f2523d3844c190163418ff7d758
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 1
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | - first:
47 | tvOS: tvOS
48 | second:
49 | enabled: 1
50 | settings: {}
51 | userData:
52 | assetBundleName:
53 | assetBundleVariant:
54 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUEnable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CASUnityPlugin
3 | // This empty script will include the required Swift in the project.
4 | // Since XCode does not do this automatically.
5 |
6 | import Foundation
7 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUEnable.swift.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d7bd346de05524808ac6090b0087326d
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 0
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | - first:
47 | tvOS: tvOS
48 | second:
49 | enabled: 1
50 | settings: {}
51 | userData:
52 | assetBundleName:
53 | assetBundleVariant:
54 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUInterface.m.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 61d8a481dd3ad416da091e1bd490ff56
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 1
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | - first:
47 | tvOS: tvOS
48 | second:
49 | enabled: 1
50 | settings: {}
51 | userData:
52 | assetBundleName:
53 | assetBundleVariant:
54 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // CASUManager.h
3 | // CASUnityPlugin
4 | //
5 | // Copyright © 2025 CleverAdsSolutions LTD, CAS.AI. All rights reserved.
6 | //
7 |
8 | #ifndef CASUManager_h
9 | #define CASUManager_h
10 |
11 | #import
12 | #import
13 | #import
14 | #import
15 | #import "CASUCallback.h"
16 | #import "CASUTypes.h"
17 | #import "CASUView.h"
18 |
19 | @interface CASUManager : NSObject
20 |
21 | - (nonnull instancetype)initWithManager:(CASMediationManager *_Nonnull)manager
22 | client:(_Nonnull CASManagerClientRef *_Nonnull)client;
23 |
24 | @property (nonatomic, strong, nonnull) CASMediationManager *casManager;
25 |
26 | @property (nonatomic, strong, nullable) CASAppOpen *appOpenAd;
27 | @property (nonatomic, strong, nullable) CASInterstitial *interstitialAd;
28 | @property (nonatomic, strong, nullable) CASRewarded *rewardedAd;
29 |
30 | @property (nonatomic, strong, nonnull) CASUCallback *interCallback;
31 | @property (nonatomic, strong, nonnull) CASUCallback *rewardCallback;
32 | @property (nonatomic, strong, nonnull) CASUCallback *appOpenCallback;
33 |
34 | - (void)enableAd:(int)type;
35 | - (void)loadAd:(int)type;
36 | - (BOOL)isAdReady:(int)type;
37 | - (void)showAd:(int)type;
38 | - (void)destroyAd:(int)type;
39 | - (CASUView *_Nonnull)createViewWithSize:(int)adSize
40 | client:(CASViewClientRef _Nullable *_Nullable)adViewClient;
41 |
42 | - (void)setLastPageAdFor:(NSString *_Nullable)content;
43 | - (void)setAutoShowAdOnAppReturn:(BOOL)enabled;
44 | - (void)skipNextAppReturnAd;
45 | @end
46 |
47 | #endif /* ifndef CASUManager_h */
48 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUManager.h.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 874eef06ff00443c089d58c96ba11fc7
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 1
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | userData:
47 | assetBundleName:
48 | assetBundleVariant:
49 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUManager.m.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1c1257806feb4b8ead9c7b858f1dc03
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 1
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | : Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | - first:
47 | tvOS: tvOS
48 | second:
49 | enabled: 1
50 | settings: {}
51 | userData:
52 | assetBundleName:
53 | assetBundleVariant:
54 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUPluginUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // CASUPluginUtil.h
3 | // CASUnityPlugin
4 | //
5 | // Copyright © 2025 CleverAdsSolutions LTD, CAS.AI. All rights reserved.
6 | //
7 |
8 | #ifndef CASUPluginUtils_h
9 | #define CASUPluginUtils_h
10 |
11 | #import
12 | #import
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | @interface CASUPluginUtil : NSObject
18 | + (nonnull instancetype)sharedInstance;
19 |
20 | @property (nonatomic, strong, nullable) CASManagerBuilder *builder;
21 | - (void)saveObject:(nullable id)obj withKey:(nonnull NSString *)key;
22 | - (void)removeObjectWithKey:(nonnull NSString *)key;
23 |
24 | + (UIWindow *)unityWindow;
25 | + (void)onAdsWillPressent;
26 | + (void)onAdsDidClosed;
27 |
28 | @property (class) BOOL pauseOnBackground;
29 | @end
30 |
31 | NS_ASSUME_NONNULL_END
32 |
33 | #endif /* ifndef CASUPluginUtils_h */
34 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUPluginUtil.h.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7cef13de6197f43deae9d03946a3e537
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 0
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | userData:
47 | assetBundleName:
48 | assetBundleVariant:
49 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUPluginUtil.m:
--------------------------------------------------------------------------------
1 | //
2 | // CASUPluginUtil.m
3 | // CASUnityPlugin
4 | //
5 | // Copyright © 2025 CleverAdsSolutions LTD, CAS.AI. All rights reserved.
6 | //
7 |
8 | #import
9 | #import "CASUPluginUtil.h"
10 |
11 | extern int UnityIsPaused(void);
12 | extern void UnityPause(int pause);
13 | extern void UnityUpdateMuteState(int mute);
14 | extern UIViewController * UnityGetGLViewController(void);
15 | extern UIWindow * UnityGetMainWindow(void);
16 |
17 | @interface CASUPluginUtil ()
18 | @property (nonatomic, strong) NSMutableDictionary *internalReferences;
19 |
20 | @end
21 |
22 | @implementation CASUPluginUtil{
23 | }
24 |
25 | + (instancetype)sharedInstance {
26 | static CASUPluginUtil *sharedInstance;
27 | static dispatch_once_t onceToken;
28 |
29 | dispatch_once(&onceToken, ^{
30 | sharedInstance = [[self alloc] init];
31 | });
32 | return sharedInstance;
33 | }
34 |
35 | - (id)init {
36 | self = [super init];
37 |
38 | if (self) {
39 | _internalReferences = [[NSMutableDictionary alloc] init];
40 | }
41 |
42 | return self;
43 | }
44 |
45 | - (void)saveObject:(id)obj withKey:(NSString *)key {
46 | self->_internalReferences[key] = obj;
47 | }
48 |
49 | - (void)removeObjectWithKey:(NSString *)key {
50 | [self->_internalReferences removeObjectForKey:key];
51 | }
52 |
53 | static BOOL _pauseOnBackground = YES;
54 |
55 | + (BOOL)pauseOnBackground {
56 | return _pauseOnBackground;
57 | }
58 |
59 | + (void)setPauseOnBackground:(BOOL)pause {
60 | _pauseOnBackground = pause;
61 | }
62 |
63 | + (UIWindow *)unityWindow {
64 | //return UnityGetGLViewController() ? : UnityGetMainWindow().rootViewController;
65 | id appDelegate = [UIApplication sharedApplication].delegate;
66 | return appDelegate.window;
67 | }
68 |
69 | + (void)onAdsWillPressent {
70 | if ([CASUPluginUtil pauseOnBackground]) {
71 | UnityPause(YES);
72 | }
73 | }
74 |
75 | + (void)onAdsDidClosed {
76 | if (UnityIsPaused()) {
77 | UnityPause(NO);
78 | }
79 |
80 | // Unity not support change active of [AVAudioSession sharedInstance]
81 | // After that audio session can be restored by
82 | // UnitySetAudioSessionActive(YES);
83 | // but any AudioSources that are already playing will be stoped.
84 |
85 | // need to do this with delay because FMOD restarts audio in AVAudioSessionInterruptionNotification handler
86 | [CASUPluginUtil.sharedInstance performSelector:@selector(updateUnityAudioOutput) withObject:nil afterDelay:0.1];
87 | }
88 |
89 | - (void)updateUnityAudioOutput {
90 | if ([[AVAudioSession sharedInstance] outputVolume] > 0.0f) {
91 | UnityUpdateMuteState(0);
92 | }
93 | }
94 |
95 | @end
96 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUPluginUtil.m.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 26124e800bb624016abc0a2f8e0a665a
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 0
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | - first:
47 | tvOS: tvOS
48 | second:
49 | enabled: 1
50 | settings: {}
51 | userData:
52 | assetBundleName:
53 | assetBundleVariant:
54 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUTypes.h:
--------------------------------------------------------------------------------
1 | //
2 | // CSAUTypes.h
3 | // CASUnityPlugin
4 | //
5 | // Copyright © 2025 CleverAdsSolutions LTD, CAS.AI. All rights reserved.
6 | //
7 |
8 | #ifndef CASUTypes_h
9 | #define CASUTypes_h
10 |
11 | /// Type representing a Unity MediationManager ad client.
12 | typedef const void * CASManagerClientRef;
13 | /// Type representing a CASMediationManager type
14 | typedef const void * CASUManagerRef;
15 |
16 | /// Type representing a Unity AdView ad client.
17 | typedef const void * CASViewClientRef;
18 | /// Type representing a CASUView type
19 | typedef const void * CASUViewRef;
20 |
21 | /// Type representing a NSObject type
22 | typedef const void * CASImpressionRef;
23 |
24 | // MARK: - CAS Mediation Manager callbacks
25 | typedef void (*CASUInitializationCompleteCallback)(CASManagerClientRef *manager,
26 | const char *error,
27 | const char *countryCode,
28 | BOOL isConsentRequired,
29 | BOOL isTestMode,
30 | int consentFlowStatus);
31 |
32 | typedef void (*CASUActionCallback)(CASManagerClientRef *manager,
33 | int action,
34 | int type,
35 | int error,
36 | const char *errorMessage);
37 |
38 | typedef void (*CASUImpressionCallback)(CASManagerClientRef *manager, int action, int type, CASImpressionRef impression);
39 |
40 |
41 | // MARK: - CAS AdView callbacks
42 | typedef void (*CASUViewActionCallback)(CASViewClientRef *view,
43 | int action,
44 | int error,
45 | const char *errorMessage);
46 | typedef void (*CASUViewImpressionCallback)(CASViewClientRef *view, CASImpressionRef impression);
47 | typedef void (*CASUViewRectCallback)(CASViewClientRef *view, float x, float y, float width, float height);
48 |
49 | typedef void (*CASUConsentFlowCompletion)(int status);
50 |
51 | // #c# consts AdActionCode
52 | #define kCASUAction_LOADED 1
53 | #define kCASUAction_FAILED 2
54 | #define kCASUAction_SHOWN 3
55 | #define kCASUAction_IMPRESSION 4
56 | #define kCASUAction_SHOW_FAILED 5
57 | #define kCASUAction_CLICKED 6
58 | #define kCASUAction_COMPLETED 7
59 | #define kCASUAction_CLOSED 8
60 | #define kCASUAction_VIEW_RECT 9
61 | #define kCASUAction_INIT 10
62 |
63 | // C# consts AdTypeCode
64 | #define kCASUType_BANNER 0
65 | #define kCASUType_INTER 1
66 | #define kCASUType_REWARD 2
67 | #define kCASUType_APP_OPEN 3
68 | #define kCASUType_APP_RETURN 5
69 | #define kCASUType_MANAGER 6
70 |
71 | // C# Enum AdPosition
72 | #define kCASUPosition_TOP_CENTER 0
73 | #define kCASUPosition_TOP_LEFT 1
74 | #define kCASUPosition_TOP_RIGHT 2
75 | #define kCASUPosition_BOTTOM_CENTER 3
76 | #define kCASUPosition_BOTTOM_LEFT 4
77 | #define kCASUPosition_BOTTOM_RIGHT 5
78 | #define kCASUPosition_MIDDLE_CENTER 6
79 | #define kCASUPosition_MIDDLE_LEFT 7
80 | #define kCASUPosition_MIDDLE_RIGHT 8
81 |
82 | // C# Enum AdSize
83 | #define kCASUSize_BANNER 1
84 | #define kCASUSize_ADAPTIVE 2
85 | #define kCASUSize_SMART 3
86 | #define kCASUSize_LEADER 4
87 | #define kCASUSize_MREC 5
88 | #define kCASUSize_FULL_WIDTH 6
89 | #define kCASUSize_LINE 7
90 |
91 | #define kCASULOGTAG @"[CAS.AI-UB] "
92 | #define kCASUMETHOD_NOT_SUPPORT @"Unity bridge not support method with AdType index: "
93 |
94 | #endif // ifndef CASUTypes_h
95 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUTypes.h.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 230236f0fbc1f47f8a8aca68c9ea3b10
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 0
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | userData:
47 | assetBundleName:
48 | assetBundleVariant:
49 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CASUView.h
3 | // CASUnityPlugin
4 | //
5 | // Copyright © 2025 CleverAdsSolutions LTD, CAS.AI. All rights reserved.
6 | //
7 |
8 | #ifndef CASUView_h
9 | #define CASUView_h
10 |
11 | #import
12 | #import
13 | #import
14 | #import "CASUCallback.h"
15 | #import "CASUTypes.h"
16 |
17 | @interface CASUView : NSObject
18 |
19 | - (nonnull instancetype)initWithCASID:(NSString *_Nonnull)casID
20 | forClient:(CASViewClientRef _Nullable *_Nullable)adViewClient
21 | size:(int)size;
22 |
23 | @property (nonatomic, strong) CASBannerView *_Nullable bannerView;
24 | @property (nonatomic, assign) CASViewClientRef _Nullable *_Nullable client;
25 | @property (nonatomic, assign, nullable) CASUViewActionCallback actionCallback;
26 | @property (nonatomic, assign, nullable) CASUViewImpressionCallback impressionCallback;
27 | @property (nonatomic, assign, nullable) CASUViewRectCallback rectCallback;
28 |
29 | - (void)enable;
30 | - (void)present;
31 | - (void)hide;
32 | - (BOOL)isReady;
33 | - (void)load;
34 | - (void)setPositionCode:(int)code withX:(int)x withY:(int)y;
35 | - (void)setRefreshInterval:(int)interval;
36 | - (int)getRefreshInterval;
37 | - (void)destroy;
38 | @end
39 |
40 | #endif /* ifndef CASUView_h */
41 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUView.h.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b650f8f927b541feb9c420abae550a0
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 0
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | userData:
47 | assetBundleName:
48 | assetBundleVariant:
49 |
--------------------------------------------------------------------------------
/Plugins/iOS/CASUView.m.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cbc684ef367df43baa623befeb5d5201
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 0
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | '': Any
18 | second:
19 | enabled: 0
20 | settings:
21 | Exclude Android: 1
22 | Exclude Editor: 1
23 | Exclude Linux: 1
24 | Exclude Linux64: 1
25 | Exclude LinuxUniversal: 1
26 | Exclude OSXUniversal: 1
27 | Exclude Win: 1
28 | Exclude Win64: 1
29 | Exclude iOS: 0
30 | - first:
31 | Any:
32 | second:
33 | enabled: 0
34 | settings: {}
35 | - first:
36 | Editor: Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | DefaultValueInitialized: true
41 | - first:
42 | iPhone: iOS
43 | second:
44 | enabled: 1
45 | settings: {}
46 | - first:
47 | tvOS: tvOS
48 | second:
49 | enabled: 1
50 | settings: {}
51 | userData:
52 | assetBundleName:
53 | assetBundleVariant:
54 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CAS.AI Unity Plugin
2 | The CAS.AI SDK is mobile advertising featuring refined ad formats and streamlined APIs for access to mobile ad networks and advertising solutions. The SDK enables mobile app developers to maximize their monetization in native mobile apps.
3 |
4 | This repository contains the source code for the CAS.AI (CleverAdsSolutions) Unity plugin. This plugin enables Unity developers to easily serve ads on Android and iOS apps without having to write Java or Objective-C code. The plugin provides a C# interface for ad management that is used by C# scripts in your Unity project.
5 |
6 | [](https://openupm.com/packages/com.cleversolutions.ads.unity/)
7 | [](https://github.com/cleveradssolutions/App-ads.txt)
8 |
9 | ## Documentation
10 | For instructions on using the plugin, please refer to [this developer guide](https://github.com/cleveradssolutions/CAS-Unity/wiki).
11 |
12 | ## Sample application
13 | For a sample application demonstrating how to use CAS.AI Unity plugin see [The Sample Unity project](https://github.com/cleveradssolutions/CAS-Unity-Sample).
14 |
15 | ## Suggesting improvements
16 | To file bugs, make feature requests, or to suggest other improvements, please use [GitHub's issue tracker](https://github.com/cleveradssolutions/CAS-Unity/issues).
17 |
18 | ## Support
19 | mailto:support@cleveradssolutions.com
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb5626da6c34640e4a0f072a7df40882
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c3ec1f8cdf8d4133bcbcd934f1f884e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/AdObject.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 58f4d3a943ce14feb90315a4e9292d84
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/AdObject/AppOpenAdObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 84175c10880bc43d697a83a2af660e85
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {fileID: 2800000, guid: 197c2276097bd45b0ac0e0a4ef58a529, type: 3}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/AdObject/BannerAdObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 843e5b43b4dcf427780c1376ee0473ad
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {fileID: 2800000, guid: be19d1ae77ffb428bbbbae63d1d61e47, type: 3}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/AdObject/ConsentFlowAdObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using UnityEngine;
5 | using UnityEngine.Events;
6 |
7 | namespace CAS.AdObject
8 | {
9 | [AddComponentMenu("CleverAdsSolutions/Consent Flow Ad Object")]
10 | [DisallowMultipleComponent]
11 | [HelpURL("https://github.com/cleveradssolutions/CAS-Unity/wiki/User-Consent-Flow#inspector-implementation")]
12 | public class ConsentFlowAdObject : MonoBehaviour
13 | {
14 | [SerializeField]
15 | internal bool showOnAwakeIfRequired = false;
16 | public ConsentFlow.DebugGeography debugGeography = ConsentFlow.DebugGeography.EEA;
17 | public string privacyPolicyUrl = "";
18 |
19 | public UnityEvent OnCompleted;
20 | public CASUEventWithError OnFailed;
21 | public CASUToggleEvent EnableOptionsButton;
22 |
23 | ///
24 | /// Shows the consent form only if it is required and the user has not responded previously.
25 | /// If the consent status is required, the SDK loads a form and immediately presents it.
26 | ///
27 | public void ShowIfRequired()
28 | {
29 | CreateFlow().ShowIfRequired();
30 |
31 | }
32 |
33 | ///
34 | /// Force Shows the consent form.
35 | /// Some consent forms require the user to modify their consent at any time.
36 | /// When a user interacts with your UI element, call function to show the form
37 | /// so the user can update their privacy options at any time.
38 | ///
39 | public void Show()
40 | {
41 | CreateFlow().Show();
42 | }
43 |
44 | public ConsentFlow CreateFlow()
45 | {
46 | return new ConsentFlow()
47 | .WithPrivacyPolicy(privacyPolicyUrl)
48 | .WithCompletionListener(HandleFlowResult)
49 | .WithDebugGeography(debugGeography);
50 | }
51 |
52 | private void Start()
53 | {
54 | EnableOptionsButton.Invoke(CASFactory.consentFlowStatus == ConsentFlow.Status.Obtained);
55 | CASFactory.OnManagerStateChanged += OnManagerStateChanged;
56 |
57 | if (showOnAwakeIfRequired)
58 | ShowIfRequired();
59 | }
60 |
61 | private void OnDestroy()
62 | {
63 | CASFactory.OnManagerStateChanged -= OnManagerStateChanged;
64 | }
65 |
66 | private void OnManagerStateChanged(int index, CASManagerBase manager)
67 | {
68 | if (!this) return;
69 | var config = manager.initialConfig;
70 | if (config == null) return;
71 | EnableOptionsButton.Invoke(CASFactory.consentFlowStatus == ConsentFlow.Status.Obtained);
72 | }
73 |
74 | private void HandleFlowResult(ConsentFlow.Status status)
75 | {
76 | EnableOptionsButton.Invoke(status == ConsentFlow.Status.Obtained);
77 |
78 | if (status == ConsentFlow.Status.Obtained
79 | || status == ConsentFlow.Status.NotRequired
80 | || status == ConsentFlow.Status.Unavailable)
81 | OnCompleted.Invoke();
82 | else
83 | OnFailed.Invoke(status.ToString());
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/Runtime/AdObject/ConsentFlowAdObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 940ad81473db84bd5b1e3b75b4c13153
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {fileID: 2800000, guid: 197c2276097bd45b0ac0e0a4ef58a529, type: 3}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/AdObject/InterstitialAdObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using UnityEngine;
5 | using UnityEngine.Events;
6 |
7 | namespace CAS.AdObject
8 | {
9 | [AddComponentMenu("CleverAdsSolutions/Interstitial Ad Object")]
10 | [DisallowMultipleComponent]
11 | [HelpURL("https://github.com/cleveradssolutions/CAS-Unity/wiki/Interstitial-Ad-object")]
12 | public sealed class InterstitialAdObject : MonoBehaviour
13 | {
14 | public ManagerIndex managerId;
15 |
16 | public UnityEvent OnAdLoaded;
17 | public CASUEventWithError OnAdFailedToLoad;
18 | public CASUEventWithError OnAdFailedToShow;
19 | public UnityEvent OnAdShown;
20 | public UnityEvent OnAdClicked;
21 | public UnityEvent OnAdClosed;
22 |
23 | public CASUEventWithMeta OnAdImpression;
24 |
25 | private IMediationManager manager;
26 | private bool loadAdOnAwake = false;
27 |
28 | ///
29 | /// Check ready ad to present.
30 | ///
31 | public bool isAdReady
32 | {
33 | get { return manager != null && manager.IsReadyAd(AdType.Interstitial); }
34 | }
35 |
36 | ///
37 | /// Manual load Ad.
38 | /// Please call load before each show ad when active load mode is .
39 | /// You can get a callback for the successful loading of an ad by subscribe .
40 | ///
41 | public void LoadAd()
42 | {
43 | if (manager == null)
44 | loadAdOnAwake = true;
45 | else
46 | manager.LoadAd(AdType.Interstitial);
47 | }
48 |
49 | ///
50 | /// Present ad to user
51 | ///
52 | public void Present()
53 | {
54 | if (manager == null)
55 | {
56 | OnAdFailedToShow.Invoke(new AdError(AdError.NotInitialized, null).ToString());
57 | return;
58 | }
59 | OnAdShown.Invoke();
60 | manager.ShowAd(AdType.Interstitial);
61 | }
62 |
63 | #region MonoBehaviour
64 | private void Start()
65 | {
66 | if (!CASFactory.TryGetManagerByIndexAsync(managerId.index, OnManagerReady))
67 | OnAdFailedToLoad.Invoke(new AdError(AdError.NotInitialized, null).ToString());
68 | }
69 |
70 | private void OnDestroy()
71 | {
72 | if (manager == null)
73 | {
74 | CASFactory.OnManagerStateChanged -= OnManagerReady;
75 | }
76 | else
77 | {
78 | manager.OnInterstitialAdLoaded -= OnAdLoaded.Invoke;
79 | manager.OnInterstitialAdFailedToLoad -= AdFailedToLoad;
80 | manager.OnInterstitialAdFailedToShow -= AdFailedToShow;
81 | manager.OnInterstitialAdClicked -= OnAdClicked.Invoke;
82 | manager.OnInterstitialAdClosed -= OnAdClosed.Invoke;
83 | manager.OnInterstitialAdImpression -= OnAdImpression.Invoke;
84 | }
85 |
86 | }
87 | #endregion
88 |
89 | #region Manager Events wrappers
90 | private void OnManagerReady(int index, CASManagerBase manager)
91 | {
92 | if (!this || index != managerId.index) return;
93 | CASFactory.OnManagerStateChanged -= OnManagerReady;
94 |
95 | this.manager = manager;
96 | manager.OnInterstitialAdLoaded += OnAdLoaded.Invoke;
97 | manager.OnInterstitialAdFailedToLoad += AdFailedToLoad;
98 | manager.OnInterstitialAdFailedToShow += AdFailedToShow;
99 | manager.OnInterstitialAdClicked += OnAdClicked.Invoke;
100 | manager.OnInterstitialAdClosed += OnAdClosed.Invoke;
101 | manager.OnInterstitialAdImpression += OnAdImpression.Invoke;
102 |
103 | try
104 | {
105 | if (manager.IsReadyAd(AdType.Interstitial))
106 | {
107 | OnAdLoaded.Invoke();
108 | }
109 | else if (loadAdOnAwake)
110 | {
111 | loadAdOnAwake = false;
112 | manager.LoadAd(AdType.Interstitial);
113 | }
114 | }
115 | catch (Exception e)
116 | {
117 | Debug.LogException(e);
118 | }
119 | }
120 |
121 | private void AdFailedToLoad(AdError error)
122 | {
123 | OnAdFailedToLoad.Invoke(error.GetMessage());
124 | }
125 | private void AdFailedToShow(string error)
126 | {
127 | OnAdFailedToShow.Invoke(error);
128 | OnAdClosed.Invoke();
129 | }
130 | #endregion
131 | }
132 | }
--------------------------------------------------------------------------------
/Runtime/AdObject/InterstitialAdObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 60dca420af8994f1396ba88695765563
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {fileID: 2800000, guid: a82a6da6812684f729e00b358a307671, type: 3}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/AdObject/ManagerAdObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using UnityEngine;
5 | using UnityEngine.Events;
6 |
7 | namespace CAS.AdObject
8 | {
9 | [AddComponentMenu("CleverAdsSolutions/Initialize Manager Ad Object")]
10 | [DisallowMultipleComponent]
11 | [HelpURL("https://github.com/cleveradssolutions/CAS-Unity/wiki/Manager-Ad-object")]
12 | public class ManagerAdObject : MonoBehaviour
13 | {
14 | public ManagerIndex managerId;
15 | [SerializeField]
16 | private bool initializeOnAwake = false;
17 |
18 | public bool consentFlowEnabled = true;
19 | public ConsentFlowAdObject consentFlow;
20 |
21 | public CCPAStatus metaDataProcessing = CCPAStatus.Undefined;
22 | public ConsentStatus metaAdvertiserTracking = ConsentStatus.Undefined;
23 |
24 | public UnityEvent OnInitialized;
25 | public CASUEventWithError OnInitializationFailed;
26 |
27 | public void Initialize()
28 | {
29 | #if UNITY_EDITOR || UNITY_IOS || UNITY_ANDROID || CASDeveloper
30 | CreateBuilder().Build();
31 | #endif
32 | }
33 |
34 | public IManagerBuilder CreateBuilder()
35 | {
36 | var builder = MobileAds.BuildManager()
37 | .WithManagerIdAtIndex(managerId.index);
38 |
39 | if (!consentFlowEnabled)
40 | builder.WithConsentFlow(new ConsentFlow(false));
41 | else if (consentFlow)
42 | builder.WithConsentFlow(consentFlow.CreateFlow());
43 |
44 | if (metaDataProcessing != CCPAStatus.Undefined)
45 | {
46 | builder.WithMediationExtras(
47 | MediationExtras.facebookDataProcessing,
48 | metaDataProcessing == CCPAStatus.OptInSale ? "" : "LDU"
49 | );
50 | }
51 | if (metaAdvertiserTracking != ConsentStatus.Undefined)
52 | {
53 | builder.WithMediationExtras(
54 | MediationExtras.facebookAdvertiserTracking,
55 | metaAdvertiserTracking == ConsentStatus.Accepted ? "1" : "0"
56 | );
57 | }
58 | return builder;
59 | }
60 |
61 |
62 | #region MonoBehaviour
63 | private void Awake()
64 | {
65 | if (consentFlow)
66 | consentFlow.showOnAwakeIfRequired = false;
67 | }
68 |
69 | private void Start()
70 | {
71 | CASFactory.OnManagerStateChanged += OnManagerReady;
72 | if (initializeOnAwake)
73 | Initialize();
74 | }
75 |
76 | private void OnDestroy()
77 | {
78 | CASFactory.OnManagerStateChanged -= OnManagerReady;
79 | }
80 |
81 | private void OnManagerReady(int index, CASManagerBase manager)
82 | {
83 | if (!this || index != managerId.index) return;
84 | var config = manager.initialConfig;
85 | if (config == null) return;
86 | if (config.error == null)
87 | OnInitialized.Invoke();
88 | else
89 | OnInitializationFailed.Invoke(config.error);
90 | }
91 | #endregion
92 | }
93 |
94 | [Serializable]
95 | public class CASUEventWithError : UnityEvent { }
96 |
97 | [Serializable]
98 | public class CASUEventWithMeta : UnityEvent { }
99 |
100 | [Serializable]
101 | public class CASUToggleEvent : UnityEvent { }
102 |
103 | [Serializable]
104 | public struct ManagerIndex
105 | {
106 | #pragma warning disable 649
107 | [SerializeField]
108 | private int android;
109 | [SerializeField]
110 | private int ios;
111 | #pragma warning restore 649
112 |
113 | public int index
114 | {
115 | get
116 | {
117 | #if UNITY_ANDROID
118 | return android;
119 | #elif UNITY_IOS
120 | return ios;
121 | #else
122 | return 0;
123 | #endif
124 | }
125 | }
126 | }
127 | }
128 |
--------------------------------------------------------------------------------
/Runtime/AdObject/ManagerAdObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cc0325880c5bb4d9cb74eceaed5d259a
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/AdObject/ReturnToPlayAdObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using UnityEngine;
5 | using UnityEngine.Events;
6 |
7 | namespace CAS.AdObject
8 | {
9 | [AddComponentMenu("CleverAdsSolutions/Return To Play Ad Object")]
10 | [DisallowMultipleComponent]
11 | [HelpURL("https://github.com/cleveradssolutions/CAS-Unity/wiki/Return-To-Play-Ad-Object")]
12 | public class ReturnToPlayAdObject : MonoBehaviour
13 | {
14 | public ManagerIndex managerId;
15 | [SerializeField]
16 | private bool _allowReturnToPlayAd = true;
17 |
18 | public UnityEvent OnAdLoaded;
19 | public CASUEventWithError OnAdFailedToLoad;
20 | public CASUEventWithError OnAdFailedToShow;
21 | public UnityEvent OnAdShown;
22 | public UnityEvent OnAdClicked;
23 | public UnityEvent OnAdClosed;
24 |
25 | public CASUEventWithMeta OnAdImpression;
26 |
27 | private IMediationManager manager;
28 |
29 | public bool allowReturnToPlayAd
30 | {
31 | get { return _allowReturnToPlayAd; }
32 | set
33 | {
34 | _allowReturnToPlayAd = value;
35 | if (manager != null)
36 | {
37 | manager.SetAppReturnAdsEnabled(value);
38 | }
39 | }
40 | }
41 |
42 | #region MonoBehaviour
43 | private void Start()
44 | {
45 | if (!CASFactory.TryGetManagerByIndexAsync(managerId.index, OnManagerReady))
46 | OnAdFailedToLoad.Invoke(new AdError(AdError.NotInitialized, null).ToString());
47 | }
48 |
49 | private void OnDestroy()
50 | {
51 | if (manager == null)
52 | {
53 | CASFactory.OnManagerStateChanged -= OnManagerReady;
54 | }
55 | else
56 | {
57 | manager.OnInterstitialAdLoaded -= OnAdLoaded.Invoke;
58 | manager.OnInterstitialAdFailedToLoad -= AdFailedToLoad;
59 | manager.OnAppReturnAdFailedToShow -= AdFailedToShow;
60 | manager.OnAppReturnAdShown -= OnAdShown.Invoke;
61 | manager.OnAppReturnAdClicked -= OnAdClicked.Invoke;
62 | manager.OnAppReturnAdClosed -= OnAdClosed.Invoke;
63 | manager.OnAppReturnAdImpression -= OnAdImpression.Invoke;
64 | }
65 | }
66 | #endregion
67 |
68 | #region Manager Events wrappers
69 | private void OnManagerReady(int index, CASManagerBase manager)
70 | {
71 | if (!this || index != managerId.index) return;
72 | CASFactory.OnManagerStateChanged -= OnManagerReady;
73 | this.manager = manager;
74 |
75 | allowReturnToPlayAd = _allowReturnToPlayAd;
76 |
77 | manager.OnInterstitialAdLoaded += OnAdLoaded.Invoke;
78 | manager.OnInterstitialAdFailedToLoad += AdFailedToLoad;
79 | manager.OnAppReturnAdFailedToShow += AdFailedToShow;
80 | manager.OnAppReturnAdShown += OnAdShown.Invoke;
81 | manager.OnAppReturnAdClicked += OnAdClicked.Invoke;
82 | manager.OnAppReturnAdClosed += OnAdClosed.Invoke;
83 | manager.OnAppReturnAdImpression += OnAdImpression.Invoke;
84 |
85 | try
86 | {
87 | if (manager.IsReadyAd(AdType.Interstitial))
88 | OnAdLoaded.Invoke();
89 | }
90 | catch (Exception e)
91 | {
92 | Debug.LogException(e);
93 | }
94 | }
95 |
96 | private void AdFailedToLoad(AdError error)
97 | {
98 | OnAdFailedToLoad.Invoke(error.GetMessage());
99 | }
100 |
101 | private void AdFailedToShow(string error)
102 | {
103 | OnAdFailedToShow.Invoke(error);
104 | OnAdClosed.Invoke();
105 | }
106 | #endregion
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/Runtime/AdObject/ReturnToPlayAdObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6c3845180a593481f81ed40627fa712b
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {fileID: 2800000, guid: a82a6da6812684f729e00b358a307671, type: 3}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/AdObject/RewardedAdObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using UnityEngine;
5 | using UnityEngine.Events;
6 |
7 | namespace CAS.AdObject
8 | {
9 | [AddComponentMenu("CleverAdsSolutions/Rewarded Ad Object")]
10 | [DisallowMultipleComponent]
11 | [HelpURL("https://github.com/cleveradssolutions/CAS-Unity/wiki/Rewarded-Ad-object")]
12 | public sealed class RewardedAdObject : MonoBehaviour
13 | {
14 | public ManagerIndex managerId;
15 |
16 | public bool restartInterstitialInterval = false;
17 |
18 | public UnityEvent OnAdLoaded;
19 | public CASUEventWithError OnAdFailedToLoad;
20 | public CASUEventWithError OnAdFailedToShow;
21 | public UnityEvent OnAdShown;
22 | public UnityEvent OnAdClicked;
23 | public UnityEvent OnAdClosed;
24 |
25 | public CASUEventWithMeta OnAdImpression;
26 |
27 | public UnityEvent OnReward;
28 |
29 | private IMediationManager manager;
30 | private bool loadAdOnAwake = false;
31 |
32 | ///
33 | /// Check ready ad to present.
34 | ///
35 | public bool isAdReady
36 | {
37 | get { return manager != null && manager.IsReadyAd(AdType.Rewarded); }
38 | }
39 |
40 | ///
41 | /// Manual load Ad.
42 | /// Please call load before each show ad when active load mode is .
43 | /// You can get a callback for the successful loading of an ad by subscribe .
44 | ///
45 | public void LoadAd()
46 | {
47 | if (manager == null)
48 | loadAdOnAwake = true;
49 | else
50 | manager.LoadAd(AdType.Rewarded);
51 | }
52 |
53 | ///
54 | /// Present ad to user
55 | ///
56 | public void Present()
57 | {
58 | if (manager == null)
59 | {
60 | OnAdFailedToShow.Invoke(new AdError(AdError.NotInitialized, null).ToString());
61 | return;
62 | }
63 | OnAdShown.Invoke();
64 | manager.ShowAd(AdType.Rewarded);
65 | }
66 |
67 | #region MonoBehaviour
68 | private void Start()
69 | {
70 | if (!CASFactory.TryGetManagerByIndexAsync(managerId.index, OnManagerReady))
71 | OnAdFailedToLoad.Invoke(new AdError(AdError.NotInitialized, null).ToString());
72 | }
73 |
74 | private void OnDestroy()
75 | {
76 | if (manager == null)
77 | {
78 | CASFactory.OnManagerStateChanged -= OnManagerReady;
79 | }
80 | else
81 | {
82 | manager.OnRewardedAdLoaded -= OnAdLoaded.Invoke;
83 | manager.OnRewardedAdFailedToLoad -= AdFailedToLoad;
84 | manager.OnRewardedAdFailedToShow -= AdFailedToShow;
85 | manager.OnRewardedAdClicked -= OnAdClicked.Invoke;
86 | manager.OnRewardedAdCompleted -= OnReward.Invoke;
87 | manager.OnRewardedAdClosed -= AdClosed;
88 | manager.OnRewardedAdImpression -= OnAdImpression.Invoke;
89 | }
90 | }
91 | #endregion
92 |
93 | #region Manager Events wrappers
94 | private void OnManagerReady(int index, CASManagerBase manager)
95 | {
96 | if (!this || index != managerId.index) return;
97 | CASFactory.OnManagerStateChanged -= OnManagerReady;
98 | this.manager = manager;
99 | manager.OnRewardedAdLoaded += OnAdLoaded.Invoke;
100 | manager.OnRewardedAdFailedToLoad += AdFailedToLoad;
101 | manager.OnRewardedAdFailedToShow += AdFailedToShow;
102 | manager.OnRewardedAdClicked += OnAdClicked.Invoke;
103 | manager.OnRewardedAdCompleted += OnReward.Invoke;
104 | manager.OnRewardedAdClosed += AdClosed;
105 | manager.OnRewardedAdImpression += OnAdImpression.Invoke;
106 |
107 | try
108 | {
109 | if (manager.IsReadyAd(AdType.Rewarded))
110 | {
111 | OnAdLoaded.Invoke();
112 | }
113 | else if (loadAdOnAwake)
114 | {
115 | loadAdOnAwake = false;
116 | manager.LoadAd(AdType.Rewarded);
117 | }
118 | }
119 | catch (Exception e)
120 | {
121 | Debug.LogException(e);
122 | }
123 | }
124 |
125 | private void AdFailedToLoad(AdError error)
126 | {
127 | OnAdFailedToLoad.Invoke(error.GetMessage());
128 | }
129 |
130 | private void AdFailedToShow(string error)
131 | {
132 | OnAdFailedToShow.Invoke(error);
133 | OnAdClosed.Invoke();
134 | }
135 |
136 | private void AdClosed()
137 | {
138 | if (restartInterstitialInterval)
139 | CAS.MobileAds.settings.RestartInterstitialInterval();
140 | OnAdClosed.Invoke();
141 | }
142 | #endregion
143 | }
144 | }
--------------------------------------------------------------------------------
/Runtime/AdObject/RewardedAdObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9fb8a64e7e44d4607b2e3c17cd31f9ac
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {fileID: 2800000, guid: 5fadd73d381ac455099c1843cf39e0aa, type: 3}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/CleverAdsSolutions.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cleveradssolutions/CAS-Unity/ec97b6811aba2eb2c0a7645549b0530bea6910fd/Runtime/CleverAdsSolutions.Common.dll
--------------------------------------------------------------------------------
/Runtime/CleverAdsSolutions.Common.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c7ca15dbfabcb4092bbed4487d155c51
3 | labels:
4 | - CleverAdsSolutions
5 | PluginImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | iconMap: {}
9 | executionOrder: {}
10 | defineConstraints: []
11 | isPreloaded: 0
12 | isOverridable: 0
13 | isExplicitlyReferenced: 0
14 | validateReferences: 1
15 | platformData:
16 | - first:
17 | Any:
18 | second:
19 | enabled: 1
20 | settings: {}
21 | - first:
22 | Editor: Editor
23 | second:
24 | enabled: 0
25 | settings:
26 | DefaultValueInitialized: true
27 | - first:
28 | Windows Store Apps: WindowsStoreApps
29 | second:
30 | enabled: 0
31 | settings:
32 | CPU: AnyCPU
33 | userData:
34 | assetBundleName:
35 | assetBundleVariant:
36 |
--------------------------------------------------------------------------------
/Runtime/CleverAdsSolutions.Common.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 22541537fd46c484db2eb381d7d6aa59
3 | labels:
4 | - CleverAdsSolutions
5 | TextScriptImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Runtime/CleverAdsSolutions.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "CleverAdsSolutions",
3 | "references": [],
4 | "optionalUnityReferences": [],
5 | "includePlatforms": [],
6 | "excludePlatforms": [],
7 | "allowUnsafeCode": false,
8 | "overrideReferences": false,
9 | "precompiledReferences": [],
10 | "autoReferenced": true,
11 | "defineConstraints": []
12 | }
--------------------------------------------------------------------------------
/Runtime/CleverAdsSolutions.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b0231c70e1748cd4592184cbc0511c8e
3 | labels:
4 | - CleverAdsSolutions
5 | AssemblyDefinitionImporter:
6 | externalObjects: {}
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Runtime/Common.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10a1a774173cf43a98de706fdf6e10cb
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Common/ATTrackingStatus.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | #if UNITY_IOS || ( CASDeveloper && UNITY_EDITOR )
4 | #define NATIVE_REQUEST
5 | #endif
6 |
7 | using UnityEngine;
8 |
9 | namespace CAS
10 | {
11 | ///
12 | /// A class that provides a tracking authorization request and the tracking authorization status of the app.
13 | ///
14 | [WikiPage("https://github.com/cleveradssolutions/CAS-Unity/wiki/App-Tracking-Transparency")]
15 | public static class ATTrackingStatus
16 | {
17 | ///
18 | /// The status values for app tracking authorization.
19 | ///
20 | [WikiPage("https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/authorizationstatus")]
21 | public enum AuthorizationStatus
22 | {
23 | ///
24 | /// The value that returns when the app can’t determine the user’s authorization status
25 | /// for access to app-related data for tracking the user or the device.
26 | ///
27 | NotDetermined = 0,
28 | ///
29 | /// The value that returns if authorization to access app-related data
30 | /// for tracking the user or the device has a restricted status.
31 | ///
32 | Restricted,
33 | ///
34 | /// The value that returns if the user denies authorization to access app-related data
35 | /// for tracking the user or the device.
36 | ///
37 | Denied,
38 | ///
39 | /// The value that returns if the user authorizes access to app-related data
40 | /// for tracking the user or the device.
41 | ///
42 | Authorized
43 | }
44 |
45 | public delegate void CompleteHandler(AuthorizationStatus status);
46 |
47 | ///
48 | /// The request for user authorization to access app-related data.
49 | /// This method allows you to request the user permission dialogue.
50 | ///
51 | [WikiPage("https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorization")]
52 | public static void Request()
53 | {
54 | Request(null);
55 | }
56 |
57 | ///
58 | /// The request for user authorization to access app-related data.
59 | /// This method allows you to request the user permission dialogue.
60 | ///
61 | [WikiPage("https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorization")]
62 | public static void Request(CompleteHandler callback)
63 | {
64 | #if NATIVE_REQUEST
65 | if (Application.platform == RuntimePlatform.IPhonePlayer)
66 | {
67 | CAS.iOS.CASExternCallbacks.ATTRequest(callback);
68 | return;
69 | }
70 | #endif
71 | if (callback != null)
72 | callback(AuthorizationStatus.NotDetermined);
73 | }
74 |
75 | ///
76 | /// The authorization status that is current for the calling application.
77 | /// This method allows you to check the app tracking transparency (ATT) authorization status.
78 | ///
79 | [WikiPage("https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547038-trackingauthorizationstatus")]
80 | public static AuthorizationStatus GetStatus()
81 | {
82 | #if NATIVE_REQUEST
83 | if (Application.platform == RuntimePlatform.IPhonePlayer)
84 | return (AuthorizationStatus)CAS.iOS.CASExterns.CASUGetATTStatus();
85 | #endif
86 | return AuthorizationStatus.NotDetermined;
87 | }
88 |
89 | }
90 | }
--------------------------------------------------------------------------------
/Runtime/Common/ATTrackingStatus.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6d66b53e547cf468d88479703f307c08
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Common/MediationExtras.cs:
--------------------------------------------------------------------------------
1 | // Removed
--------------------------------------------------------------------------------
/Runtime/Common/MediationExtras.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e81c603cf282640eaab8c7c4fee1d62e
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Common/MobileAds.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 09f63de5241fa47c7a65761dd896a106
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8a3c542e4d6be49dd9cc5c26fe44a598
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Internal/Android.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6be928c7613a84073bed660ea84ab5b3
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Internal/Android/CASImpressionClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | #if UNITY_ANDROID || (CASDeveloper && UNITY_EDITOR)
4 | using System;
5 | using UnityEngine;
6 |
7 | namespace CAS.Android
8 | {
9 | public class CASImpressionClient : AdMetaData
10 | {
11 | private readonly AndroidJavaObject impression;
12 |
13 | public CASImpressionClient( AdType type, AndroidJavaObject impression ) : base( type )
14 | {
15 | this.impression = impression;
16 | }
17 |
18 | public override AdNetwork network
19 | {
20 | get { return (AdNetwork)impression.Call( "getNetwork" ); }
21 | }
22 |
23 | public override double revenue
24 | {
25 | get { return cpm / 1000.0; }
26 | }
27 |
28 | public override double cpm
29 | {
30 | get { return impression.Call( "getCpm" ) / 1000.0; }
31 | }
32 |
33 | public override PriceAccuracy priceAccuracy
34 | {
35 | get { return (PriceAccuracy)impression.Call( "getPriceAccuracy" ); }
36 | }
37 |
38 | public override string creativeIdentifier
39 | {
40 | get { return impression.Call( "getCreativeIdentifier" ); }
41 | }
42 |
43 | public override string sourceUnitId
44 | {
45 | get { return impression.Call( "getIdentifier" ); }
46 | }
47 |
48 | public override int impressionDepth
49 | {
50 | get { return impression.Call( "getImpressionDepth" ); }
51 | }
52 |
53 | public override double lifetimeRevenue
54 | {
55 | get { return impression.Call( "getLifetimeRevenue" ) / 1000000.0; }
56 | }
57 | }
58 | }
59 |
60 | #endif
--------------------------------------------------------------------------------
/Runtime/Internal/Android/CASImpressionClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 81f689cb17421449ca0516115105da4c
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/Android/CASJavaBridge.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6cf21a0e64dcc4169b78e4adf1bfbad9
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/Android/CASManagerClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | #if UNITY_ANDROID || (CASDeveloper && UNITY_EDITOR)
4 | using System;
5 | using UnityEngine;
6 |
7 | namespace CAS.Android
8 | {
9 | internal sealed class CASManagerClient : CASManagerBase, CASCallback.Handler
10 | {
11 | private AndroidJavaObject _managerBridge;
12 | private CASCallback _managerCallback;
13 |
14 | internal override void Init(CASInitSettings initSettings)
15 | {
16 | base.Init(initSettings);
17 |
18 | EventExecutor.Initialize();
19 |
20 | _managerCallback = new CASCallback(this);
21 |
22 | using (var builder = new AndroidJavaObject(CASJavaBridge.BridgeBuilderClass))
23 | {
24 | if (isTestAdMode)
25 | builder.Call("enableTestMode");
26 |
27 | if (!string.IsNullOrEmpty(initSettings.userID))
28 | builder.Call("setUserId", initSettings.userID);
29 |
30 | if (initSettings.consentFlow != null)
31 | {
32 | if (!initSettings.consentFlow.isEnabled)
33 | {
34 | builder.Call("disableConsentFlow");
35 | }
36 | else
37 | {
38 | using (var consent = new CASConsentFlowClient(initSettings.consentFlow, false))
39 | {
40 | builder.Call("withConsentFlow", consent.obj);
41 | }
42 | }
43 | }
44 | if (initSettings.extras != null)
45 | {
46 | foreach (var extra in initSettings.extras)
47 | {
48 | builder.Call("addExtras", extra.Key, extra.Value);
49 | }
50 | }
51 |
52 | _managerBridge = builder.Call("build",
53 | initSettings.targetId, Application.unityVersion, _managerCallback);
54 | }
55 | }
56 |
57 | protected override void SetLastPageAdContentNative(string json)
58 | {
59 | _managerBridge.Call("setLastPageAdContent", json);
60 | }
61 |
62 | public override void EnableAd(AdType adType)
63 | {
64 | _managerBridge.Call("enableAd", (int)adType);
65 | }
66 |
67 | public override bool IsReadyAd(AdType adType)
68 | {
69 | return _managerBridge.Call("isAdReady", (int)adType);
70 | }
71 |
72 | protected override void LoadAdNetive(AdType adType)
73 | {
74 | _managerBridge.Call("loadAd", (int)adType);
75 | }
76 |
77 | public override void ShowAd(AdType adType)
78 | {
79 | _managerBridge.Call("showAd", (int)adType);
80 | }
81 |
82 | public override void DisposeAd(AdType adType)
83 | {
84 | _managerBridge.Call("destroyAd", (int)adType);
85 | }
86 |
87 | [UnityEngine.Scripting.Preserve]
88 | public bool TryOpenDebugger()
89 | {
90 | return _managerBridge.Call("tryOpenDebugger");
91 | }
92 |
93 | public override void SetAppReturnAdsEnabled(bool enable)
94 | {
95 | _managerBridge.Call("setAutoShowAdOnAppReturn", enable);
96 | }
97 |
98 | public override void SkipNextAppReturnAds()
99 | {
100 | _managerBridge.Call("skipNextReturnAds");
101 | }
102 |
103 | protected override CASViewBase CreateAdView(AdSize size)
104 | {
105 | return new CASViewClient(this, size);
106 | }
107 |
108 | public override AdMetaData WrapImpression(AdType adType, object impression)
109 | {
110 | return new CASImpressionClient(adType, (AndroidJavaObject)impression);
111 | }
112 | }
113 | }
114 | #endif
115 |
--------------------------------------------------------------------------------
/Runtime/Internal/Android/CASManagerClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eff550f7f7bb84abfa5744e1646690f5
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/Android/CASSettingsClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a7ca8e02f23ed44c4a0cb61aaf9e4afa
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/Android/CASViewClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | #if UNITY_ANDROID || (CASDeveloper && UNITY_EDITOR)
4 | using System;
5 | using UnityEngine;
6 |
7 | namespace CAS.Android
8 | {
9 | internal sealed class CASViewClient : CASViewBase, CASCallback.Handler
10 | {
11 | private readonly AndroidJavaObject _bridge;
12 | private CASCallback _callback;
13 |
14 | public override bool isReady
15 | {
16 | get { return _bridge.Call("isReady"); }
17 | }
18 |
19 | public override int refreshInterval
20 | {
21 | get { return _bridge.Call("getRefreshInterval"); }
22 | set { _bridge.Call("setRefreshInterval", value); }
23 | }
24 |
25 | internal CASViewClient(CASManagerBase manager, AdSize size)
26 | : base(manager, size)
27 | {
28 | _callback = new CASCallback(this);
29 | _bridge = new AndroidJavaObject(CASJavaBridge.AdViewClass, (int)size, _callback, manager.managerID);
30 | }
31 |
32 | internal override void DestroyNative()
33 | {
34 | _bridge.Call("destroy");
35 | }
36 |
37 | internal override void Enable()
38 | {
39 | _bridge.Call("enable");
40 | }
41 |
42 | public override void LoadNative()
43 | {
44 | _bridge.Call("load");
45 | }
46 |
47 | public override void SetActive(bool active)
48 | {
49 | if (active)
50 | {
51 | _bridge.Call("show");
52 | return;
53 | }
54 | _bridge.Call("hide");
55 | }
56 |
57 | protected override void SetPositionNative(int position, int x, int y)
58 | {
59 | _bridge.Call("setPosition", position, x, y);
60 | }
61 |
62 | protected override void SetPositionPxNative(int position, int x, int y)
63 | {
64 | _bridge.Call("setPositionPx", position, x, y);
65 | }
66 | }
67 | }
68 | #endif
--------------------------------------------------------------------------------
/Runtime/Internal/Android/CASViewClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 114154b20c415462486dbcc8a890496f
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/CASBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e04061e903ed54ffd868d36dcf83654a
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/CASFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 44519a76abcb845ba85509b85e7a5545
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/CASInitSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cd2f38c563828458c8e900006c010cd2
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/Unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c9b58cd26d1154e0bb79e62016a2c6b6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Internal/Unity/CASAppStateEventClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | // Used for Editor and iOS runtime
4 | #if UNITY_EDITOR || UNITY_IOS
5 |
6 | using System;
7 | using UnityEngine;
8 |
9 | namespace CAS.Unity
10 | {
11 | [AddComponentMenu("")]
12 | internal class CASAppStateEventClient : MonoBehaviour, IAppStateEventClient
13 | {
14 | public event Action OnApplicationBackground;
15 | public event Action OnApplicationForeground;
16 |
17 | private bool isApplicationFocusChanged = true;
18 |
19 | internal static IAppStateEventClient Create()
20 | {
21 | GameObject obj = new GameObject("CASAppStateEventClient");
22 | obj.hideFlags = HideFlags.HideAndDontSave;
23 | DontDestroyOnLoad(obj);
24 | return obj.AddComponent();
25 | }
26 |
27 | private void OnApplicationFocus(bool hasFocus)
28 | {
29 | isApplicationFocusChanged = true;
30 | }
31 |
32 | private void OnApplicationPause(bool isPaused)
33 | {
34 | // There is a known issue where Unity pauses the app while a full-screen ad is displayed,
35 | // but the application's focus does not change.
36 | // We expect that Unity on expanding the application,
37 | // trigger the focus change first, and then resume the app.
38 | if (!isApplicationFocusChanged)
39 | return;
40 | isApplicationFocusChanged = false;
41 | if (isPaused)
42 | {
43 | if (OnApplicationBackground != null)
44 | OnApplicationBackground();
45 | }
46 | else
47 | {
48 | if (OnApplicationForeground != null)
49 | OnApplicationForeground();
50 | }
51 | }
52 | }
53 |
54 | }
55 |
56 | #endif
--------------------------------------------------------------------------------
/Runtime/Internal/Unity/CASAppStateEventClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f2e21fd2c37e74450809145ff04930bd
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/Unity/CASImpressionClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | #if UNITY_EDITOR
4 |
5 | namespace CAS.Unity
6 | {
7 | public class CASImpressionClient : AdMetaData
8 | {
9 | private static int depth = 0;
10 |
11 | public CASImpressionClient(AdType type) : base(type)
12 | {
13 | depth++;
14 | }
15 |
16 | public override AdNetwork network
17 | {
18 | get { return AdNetwork.CrossPromotion; }
19 | }
20 |
21 | public override double revenue
22 | {
23 | get { return 0.001; }
24 | }
25 |
26 | public override double cpm
27 | {
28 | get { return 1.0; }
29 | }
30 |
31 | public override PriceAccuracy priceAccuracy
32 | {
33 | get { return PriceAccuracy.Floor; }
34 | }
35 |
36 | public override string creativeIdentifier
37 | {
38 | get { return null; }
39 | }
40 |
41 | public override string sourceUnitId
42 | {
43 | get { return "TestUnitId"; }
44 | }
45 |
46 | public override int impressionDepth
47 | {
48 | get { return depth; }
49 | }
50 |
51 | public override double lifetimeRevenue
52 | {
53 | get { return depth * 0.001; }
54 | }
55 | }
56 | }
57 |
58 | #endif
--------------------------------------------------------------------------------
/Runtime/Internal/Unity/CASImpressionClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b7af48cd55a4744ea9f9688cbfed01dd
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/Unity/CASManagerClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d0b7eb30ea04643e0a5f9419ae392f0d
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/Unity/CASSettingsClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using System.Collections.Generic;
5 | using UnityEngine;
6 |
7 | namespace CAS.Unity
8 | {
9 | internal class CASSettingsClient : IAdsSettings, ITargetingOptions
10 | {
11 | public bool analyticsCollectionEnabled { get; set; }
12 | public int trialAdFreeInterval { get; set; }
13 | public int bannerRefreshInterval { get; set; }
14 | public int interstitialInterval { get; set; }
15 | public ConsentStatus userConsent { get; set; }
16 | public CCPAStatus userCCPAStatus { get; set; }
17 | public Audience taggedAudience { get; set; }
18 | public bool isDebugMode { get; set; }
19 | public bool isMutedAdSounds { get; set; }
20 | public LoadingManagerMode loadingMode { get; set; }
21 | public bool iOSAppPauseOnBackground { get; set; }
22 | public bool allowInterstitialAdsWhenVideoCostAreLower { get; set; }
23 | public bool trackLocationEnabled { get; set; }
24 | public bool locationCollectionEnabled { get; set; }
25 | public bool isExecuteEventsOnUnityThread { get; set; }
26 |
27 | public Gender gender { get; set; }
28 | public int age { get; set; }
29 | public string contentURL { get; set; }
30 |
31 |
32 | public float lastInterImpressionTimestamp = float.MinValue;
33 |
34 | internal CASSettingsClient()
35 | {
36 | iOSAppPauseOnBackground = true;
37 | allowInterstitialAdsWhenVideoCostAreLower = true;
38 | }
39 |
40 | public void RestartInterstitialInterval()
41 | {
42 | lastInterImpressionTimestamp = Time.time;
43 | }
44 |
45 | public void SetTestDeviceIds(IList testDeviceIds)
46 | {
47 | }
48 |
49 | public void SetKeywords(IList keywords) { }
50 |
51 | public ConsentStatus GetVendorConsent(int vendorId)
52 | {
53 | return userConsent;
54 | }
55 |
56 | public ConsentStatus GetAdditionalConsent(int providerId)
57 | {
58 | return userConsent;
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Runtime/Internal/Unity/CASSettingsClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f2779ff8abf0a4285a2a74f5d7ea6ac1
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/Unity/CASViewClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 39e10b3a91c254583bcafab69e4a80ac
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/iOS.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 103208a44bfbf41a4b12d28b84bcfe7e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Internal/iOS/CASExterns.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 86d8d32a34af24c5694e38acdebada1b
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/iOS/CASImpressionClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | #if UNITY_IOS || (CASDeveloper && UNITY_EDITOR)
4 | using System;
5 | namespace CAS.iOS
6 | {
7 | public class CASImpressionClient : AdMetaData
8 | {
9 | // Required to free memory only for ( IntPtr )GCHandle.Alloc( instance );
10 | // Native refs are not needed for free.
11 | private IntPtr impressionRef;
12 |
13 | public CASImpressionClient(AdType type, IntPtr impressionRef) : base(type)
14 | {
15 | this.impressionRef = impressionRef;
16 | }
17 |
18 | public override AdNetwork network
19 | {
20 | get { return (AdNetwork)CASExterns.CASUGetImpressionNetwork(impressionRef); }
21 | }
22 |
23 | public override double revenue
24 | {
25 | get { return CASExterns.CASUGetImpressionRevenue(impressionRef); }
26 | }
27 |
28 | public override double cpm
29 | {
30 | get { return revenue * 1000.0; }
31 | }
32 |
33 | public override PriceAccuracy priceAccuracy
34 | {
35 | get { return (PriceAccuracy)CASExterns.CASUGetImpressionPrecission(impressionRef); }
36 | }
37 |
38 | public override string creativeIdentifier
39 | {
40 | get { return CASExterns.CASUGetImpressionCreativeId(impressionRef); }
41 | }
42 |
43 | public override string sourceUnitId
44 | {
45 | get { return CASExterns.CASUGetImpressionIdentifier(impressionRef); }
46 | }
47 |
48 | public override int impressionDepth
49 | {
50 | get { return CASExterns.CASUGetImpressionDepth(impressionRef); }
51 | }
52 |
53 | public override double lifetimeRevenue
54 | {
55 | get { return CASExterns.CASUGetImpressionLifetimeRevenue(impressionRef); }
56 | }
57 | }
58 | }
59 |
60 | #endif
--------------------------------------------------------------------------------
/Runtime/Internal/iOS/CASImpressionClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: df34f70861a0045668a3453c8d3cbda8
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/iOS/CASManagerClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 61c4e8754cb334b2f9db12947e5c04ee
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/iOS/CASSettingsClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | #if UNITY_IOS || (CASDeveloper && UNITY_EDITOR)
4 | using System;
5 | using System.Collections.Generic;
6 |
7 | namespace CAS.iOS
8 | {
9 | internal class CASSettingsClient : IAdsSettings, ITargetingOptions
10 | {
11 | public bool analyticsCollectionEnabled { get; set; }
12 |
13 | public int trialAdFreeInterval
14 | {
15 | get { return CASExterns.CASUGetTrialAdFreeInterval(); }
16 | set { CASExterns.CASUSetTrialAdFreeInterval(value); }
17 | }
18 |
19 | public int bannerRefreshInterval
20 | {
21 | get { return CASExterns.CASUGetBannerRefreshRate(); }
22 | set { CASExterns.CASUSetBannerRefreshRate(value); }
23 | }
24 |
25 | public int interstitialInterval
26 | {
27 | get { return CASExterns.CASUGetInterstitialInterval(); }
28 | set { CASExterns.CASUSetInterstitialInterval(value); }
29 | }
30 |
31 | public ConsentStatus userConsent
32 | {
33 | get { return (ConsentStatus)CASExterns.CASUGetUserConsent(); }
34 | set { CASExterns.CASUSetUserConsent((int)value); }
35 | }
36 |
37 | public CCPAStatus userCCPAStatus
38 | {
39 | get { return (CCPAStatus)CASExterns.CASUGetCCPAStatus(); }
40 | set { CASExterns.CASUSetCCPAStatus((int)value); }
41 | }
42 |
43 | public Audience taggedAudience
44 | {
45 | get { return (Audience)CASExterns.CASUGetAudienceTagged(); }
46 | set { CASExterns.CASUSetAudienceTagged((int)value); }
47 | }
48 |
49 | public bool isDebugMode
50 | {
51 | get { return CASExterns.CASUGetDebugMode(); }
52 | set { CASExterns.CASUSetDebugMode(value); }
53 | }
54 |
55 | public bool isMutedAdSounds
56 | {
57 | get { return CASExterns.CASUGetMuteAdSounds(); }
58 | set { CASExterns.CASUSetMuteAdSounds(value); }
59 | }
60 |
61 | public LoadingManagerMode loadingMode
62 | {
63 | get { return (LoadingManagerMode)CASExterns.CASUGetLoadingMode(); }
64 | set { CASExterns.CASUSetLoadingWithMode((int)value); }
65 | }
66 |
67 | public bool iOSAppPauseOnBackground
68 | {
69 | get { return CASExterns.CASUGetiOSAppPauseOnBackground(); }
70 | set { CASExterns.CASUSetiOSAppPauseOnBackground(value); }
71 | }
72 |
73 | public void SetTestDeviceIds(IList testDeviceIds)
74 | {
75 | string[] testDeviceIdsArray = new string[testDeviceIds.Count];
76 | testDeviceIds.CopyTo(testDeviceIdsArray, 0);
77 | CASExterns.CASUSetTestDeviceWithIds(testDeviceIdsArray, testDeviceIds.Count);
78 | }
79 |
80 | public void RestartInterstitialInterval()
81 | {
82 | CASExterns.CASURestartInterstitialInterval();
83 | }
84 |
85 | public bool isExecuteEventsOnUnityThread
86 | {
87 | get { return false; }
88 | set { }
89 | }
90 |
91 | public bool allowInterstitialAdsWhenVideoCostAreLower
92 | {
93 | get { return CASExterns.CASUGetInterstitialAdsWhenVideoCostAreLower(); }
94 | set { CASExterns.CASUSetInterstitialAdsWhenVideoCostAreLower(value); }
95 | }
96 |
97 | public bool trackLocationEnabled
98 | {
99 | get { return locationCollectionEnabled; }
100 | set { locationCollectionEnabled = value; }
101 | }
102 |
103 | public Gender gender
104 | {
105 | get { return (Gender)CASExterns.CASUGetUserGender(); }
106 | set { CASExterns.CASUSetUserGender((int)value); }
107 | }
108 |
109 | public int age
110 | {
111 | get { return CASExterns.CASUGetUserAge(); }
112 | set { CASExterns.CASUSetUserAge(value); }
113 | }
114 |
115 | public bool locationCollectionEnabled
116 | {
117 | get { return CASExterns.CASUGetTrackLocationEnabled(); }
118 | set { CASExterns.CASUSetTrackLocationEnabled(value); }
119 | }
120 |
121 | public string contentURL
122 | {
123 | get { return CASExterns.CASUGetContentURL(); }
124 | set { CASExterns.CASUSetContentURL(value); }
125 | }
126 |
127 | public void SetKeywords(IList keywords)
128 | {
129 | string[] tempArray = new string[keywords.Count];
130 | keywords.CopyTo(tempArray, 0);
131 | CASExterns.CASUSetKeywords(tempArray, keywords.Count);
132 | }
133 |
134 | public ConsentStatus GetVendorConsent(int vendorId)
135 | {
136 | return (ConsentStatus)CASExterns.CASUGetVendorConsent(vendorId);
137 | }
138 |
139 | public ConsentStatus GetAdditionalConsent(int providerId)
140 | {
141 | return (ConsentStatus)CASExterns.CASUGetAdditionalConsent(providerId);
142 | }
143 | }
144 | }
145 | #endif
--------------------------------------------------------------------------------
/Runtime/Internal/iOS/CASSettingsClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be55105582cc94068bb7c90ae2c69442
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Runtime/Internal/iOS/CASViewClient.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | #if UNITY_IOS || (CASDeveloper && UNITY_EDITOR)
4 | using System;
5 | using System.Runtime.InteropServices;
6 | using UnityEngine;
7 |
8 | namespace CAS.iOS
9 | {
10 | internal class CASViewClient : CASViewBase
11 | {
12 | private IntPtr _viewRef;
13 | private IntPtr _viewClient;
14 |
15 | public override bool isReady
16 | {
17 | get { return CASExterns.CASUIsAdViewReady(_viewRef); }
18 | }
19 |
20 | public override int refreshInterval
21 | {
22 | get { return CASExterns.CASUGetAdViewRefreshInterval(_viewRef); }
23 | set { CASExterns.CASUSetAdViewRefreshInterval(_viewRef, value); }
24 | }
25 |
26 | internal CASViewClient(CASManagerBase manager, AdSize size) : base(manager, size) { }
27 |
28 | public void Attach(IntPtr viewRef, IntPtr client)
29 | {
30 | _viewRef = viewRef;
31 | _viewClient = client;
32 | CASExterns.CASUSetAdViewDelegate(
33 | viewRef,
34 | AdViewActionCallback,
35 | AdViewImpressionCallback,
36 | AdViewRectCallback);
37 | }
38 |
39 | ~CASViewClient()
40 | {
41 | Dispose();
42 | }
43 |
44 | public override void Dispose()
45 | {
46 | base.Dispose();
47 | try
48 | {
49 | if (_viewRef != IntPtr.Zero)
50 | {
51 | _viewRef = IntPtr.Zero;
52 | ((GCHandle)_viewClient).Free();
53 | }
54 | }
55 | catch (Exception e)
56 | {
57 | Debug.LogException(e);
58 | }
59 | }
60 |
61 | internal override void Enable()
62 | {
63 | CASExterns.CASUEnableAdView(_viewRef);
64 | }
65 |
66 | internal override void DestroyNative()
67 | {
68 | if (_viewRef != IntPtr.Zero)
69 | {
70 | CASExterns.CASUDestroyAdView(_viewRef);
71 | }
72 | }
73 |
74 | public override void LoadNative()
75 | {
76 | CASExterns.CASULoadAdView(_viewRef);
77 | }
78 |
79 | public override void SetActive(bool active)
80 | {
81 | if (active)
82 | {
83 | CASExterns.CASUPresentAdView(_viewRef);
84 | return;
85 | }
86 |
87 | CASExterns.CASUHideAdView(_viewRef);
88 | }
89 |
90 | protected override void SetPositionPxNative(int position, int x, int y)
91 | {
92 | CASExterns.CASUSetAdViewPositionPx(_viewRef, position, x, y);
93 | }
94 |
95 | protected override void SetPositionNative(int position, int x, int y)
96 | {
97 | CASExterns.CASUSetAdViewPosition(_viewRef, position, x, y);
98 | }
99 |
100 | private static CASViewClient GetClient(IntPtr managerClient)
101 | {
102 | GCHandle handle = (GCHandle)managerClient;
103 | return handle.Target as CASViewClient;
104 | }
105 |
106 | [AOT.MonoPInvokeCallback(typeof(CASExterns.CASUViewActionCallback))]
107 | private static void AdViewActionCallback(IntPtr view, int action, int error, string errorMessage)
108 | {
109 | try
110 | {
111 | GetClient(view).HandleCallback(action, 0, error, errorMessage, null);
112 | }
113 | catch (Exception e)
114 | {
115 | Debug.LogException(e);
116 | }
117 | }
118 |
119 | [AOT.MonoPInvokeCallback(typeof(CASExterns.CASUViewImpressionCallback))]
120 | private static void AdViewImpressionCallback(IntPtr view, IntPtr impression)
121 | {
122 | try
123 | {
124 | GetClient(view).HandleCallback(AdActionCode.IMPRESSION, 0, 0, null, impression);
125 | }
126 | catch (Exception e)
127 | {
128 | Debug.LogException(e);
129 | }
130 | }
131 |
132 | [AOT.MonoPInvokeCallback(typeof(CASExterns.CASUViewRectCallback))]
133 | private static void AdViewRectCallback(IntPtr view, float x, float y, float width, float heigt)
134 | {
135 | try
136 | {
137 | GetClient(view).rectInPixels = new Rect(x, y, width, heigt);
138 | }
139 | catch (Exception e)
140 | {
141 | Debug.LogException(e);
142 | }
143 | }
144 | }
145 | }
146 | #endif
--------------------------------------------------------------------------------
/Runtime/Internal/iOS/CASViewClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 47dcc8f9e7b9d41a5aa7b4a50b9229bf
3 | labels:
4 | - CleverAdsSolutions
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Samples~/SampleComponents.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e8db02b67b8544bcc8f28febe3b31dbf
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Samples~/SampleComponents/SampleComponents.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3ace5bd38ce8c405aaa0a979f42eb52f
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Samples~/SampleScripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 15aa6da04eb4b4cadb69e9719c0f6453
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Samples~/SampleScripts/CSharpSampleController.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.UI;
3 | using CAS;
4 | using System.Collections.Generic;
5 |
6 | public class CSharpSampleController : MonoBehaviour
7 | {
8 | public Text versionText;
9 | public Text interstitialStatus;
10 | public Text rewardedStatus;
11 |
12 | public Text appReturnButtonText;
13 |
14 | private bool isAppReturnEnable = false;
15 | private bool userRewardEarned = false;
16 |
17 | private IMediationManager manager;
18 | private IAdView bannerView;
19 |
20 | public void Start()
21 | {
22 | versionText.text = MobileAds.wrapperVersion;
23 |
24 | // -- Create manager:
25 | manager = MobileAds.BuildManager().Build();
26 |
27 | CreateBanner(AdSize.Banner);
28 |
29 | // -- Subscribe to CAS events:
30 | manager.OnInterstitialAdLoaded += OnInterstitialAdLoaded;
31 | manager.OnInterstitialAdFailedToLoad += OnInterstitialAdFailedToLoad;
32 |
33 | manager.OnRewardedAdLoaded += OnRewardedAdLoaded;
34 | manager.OnRewardedAdFailedToLoad += OnRewardedAdFailedToLoad;
35 | manager.OnRewardedAdCompleted += OnRewardedAdCompleted;
36 | manager.OnRewardedAdClosed += OnRewardedAdClosed;
37 | // Any other events in IMediationManager
38 | }
39 |
40 | private void OnDestroy()
41 | {
42 | // -- Unsubscribe from CAS events:
43 | manager.OnInterstitialAdLoaded -= OnInterstitialAdLoaded;
44 | manager.OnInterstitialAdFailedToLoad -= OnInterstitialAdFailedToLoad;
45 |
46 | manager.OnRewardedAdLoaded -= OnRewardedAdLoaded;
47 | manager.OnRewardedAdFailedToLoad -= OnRewardedAdFailedToLoad;
48 | manager.OnRewardedAdCompleted -= OnRewardedAdCompleted;
49 | manager.OnRewardedAdClosed += OnRewardedAdClosed;
50 | }
51 |
52 | private void CreateBanner(AdSize size)
53 | {
54 | HideBanner();
55 | bannerView = manager.GetAdView(size);
56 | ShowBanner();
57 | }
58 |
59 | public void ShowBanner()
60 | {
61 | bannerView.SetActive(true);
62 | }
63 |
64 | public void HideBanner()
65 | {
66 | if (bannerView != null)
67 | bannerView.SetActive(false);
68 | }
69 |
70 | public void SetBannerSize(int sizeID)
71 | {
72 | CreateBanner((AdSize)sizeID);
73 | }
74 |
75 | public void SetBannerPosition(int positionEnum)
76 | {
77 | bannerView.position = (AdPosition)positionEnum;
78 | }
79 |
80 | public void ShowInterstitial()
81 | {
82 | manager.ShowAd(AdType.Interstitial);
83 | }
84 |
85 | public void ShowRewarded()
86 | {
87 | userRewardEarned = false;
88 | manager.ShowAd(AdType.Rewarded);
89 | }
90 |
91 | public void ChangeAppReturnState()
92 | {
93 | isAppReturnEnable = !isAppReturnEnable;
94 | appReturnButtonText.text = isAppReturnEnable ? "ENABLED" : "DISABLED";
95 | manager.SetAppReturnAdsEnabled(isAppReturnEnable);
96 | }
97 |
98 |
99 | #region Events
100 |
101 | private void OnRewardedAdCompleted()
102 | {
103 | userRewardEarned = true;
104 | rewardedStatus.text = "User reward earned";
105 | }
106 |
107 | private void OnRewardedAdClosed()
108 | {
109 | if (!userRewardEarned)
110 | rewardedStatus.text = "User are not rewarded";
111 | }
112 |
113 | private void OnRewardedAdLoaded()
114 | {
115 | rewardedStatus.text = "Ready";
116 | }
117 |
118 | private void OnRewardedAdFailedToLoad(AdError error)
119 | {
120 | rewardedStatus.text = error.GetMessage();
121 | }
122 |
123 | private void OnInterstitialAdFailedToLoad(AdError error)
124 | {
125 | interstitialStatus.text = error.GetMessage();
126 | }
127 |
128 | private void OnInterstitialAdLoaded()
129 | {
130 | interstitialStatus.text = "Ready";
131 | }
132 | #endregion
133 | }
134 |
--------------------------------------------------------------------------------
/Samples~/SampleScripts/CSharpSampleController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8da7367c37d1246c89e8aab9b3f09b4f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Samples~/SampleScripts/LoadScene.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using UnityEngine.SceneManagement;
5 |
6 | public class LoadScene : MonoBehaviour
7 | {
8 | public string sceneName;
9 |
10 | public void Load()
11 | {
12 | SceneManager.LoadScene(sceneName);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Samples~/SampleScripts/LoadScene.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2ccbbc5befafc47aeba0ef8cfb8ff344
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Samples~/SampleScripts/SampleCSharp.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 93d52f614545e44c39412d6c5b38aac0
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/.gitignore:
--------------------------------------------------------------------------------
1 | /.vs
2 | /obj
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/CleverAdsSolutions.Common.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Release;Debug
6 | Library
7 | CAS
8 | CleverAdsSolutions.Common
9 | ..\..\Runtime
10 | ..\..\Runtime\CleverAdsSolutions.Common.xml
11 |
12 | False
13 | CS1591
14 | False
15 | {D71A3539-A30C-48AD-9B8A-7119F995D2BD}
16 | 4
17 | 4
18 | prompt
19 | v3.5
20 |
21 |
22 |
23 |
24 |
25 | /Users/stratos/Documents/Environment/UnityEditors/2020.3.44f1/Unity.app/Contents/Managed/UnityEngine.dll
26 | False
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/CleverAdsSolutions.Common.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 25.0.1704.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleverAdsSolutions.Common", "CleverAdsSolutions.Common.csproj", "{D71A3539-A30C-48AD-9B8A-7119F995D2BD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {D71A3539-A30C-48AD-9B8A-7119F995D2BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {D71A3539-A30C-48AD-9B8A-7119F995D2BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {D71A3539-A30C-48AD-9B8A-7119F995D2BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {D71A3539-A30C-48AD-9B8A-7119F995D2BD}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {770D5CCA-AE1E-4406-B2C7-F4FE0C24A290}
24 | EndGlobalSection
25 | GlobalSection(MonoDevelopProperties) = preSolution
26 | Policies = $0
27 | $0.DotNetNamingPolicy = $1
28 | $1.DirectoryNamespaceAssociation = PrefixedHierarchical
29 | EndGlobalSection
30 | EndGlobal
31 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/README.md:
--------------------------------------------------------------------------------
1 | # CleverAdsSolutions Common project
2 | This project contains the source code for building `/Runtime/CleverAdsSolutions.Common.dll`, a shared library used in the main plugin repository. CleverAdsSolutions.Common.dll provides common structure with documentation.
3 |
4 | ## Build
5 | To build `CleverAdsSolutions.Common.dll`, you need to specify the path to `UnityEngine.dll`. Find the path to `UnityEngine.dll` in the installed UnityEditor folder, for example, for MacOS it would be:
6 | ```
7 | Unity.app/Contents/Managed/UnityEngine.dll
8 | ```
9 | Use MSBuild to build `CleverAdsSolutions.Common.dll` with the ReferencePath parameter that points to the path of UnityEngine.dll:
10 | ```
11 | msbuild CleverAdsSolutions.Common.csproj /p:ReferencePath="path\to\desired\UnityEngine.dll"
12 | ```
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/AdMetaData.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System.Text;
4 |
5 | namespace CAS
6 | {
7 | [WikiPage("https://github.com/cleveradssolutions/CAS-Unity/wiki/Impression-Level-Data")]
8 | public abstract class AdMetaData
9 | {
10 | ///
11 | /// The Format Type of the impression.
12 | ///
13 | public readonly AdType type;
14 |
15 | ///
16 | /// The mediated network’s name that purchased the impression.
17 | ///
18 | public abstract AdNetwork network { get; }
19 |
20 | ///
21 | /// The revenue generated for the impression (USD).
22 | /// The revenue value is either estimated or exact, according to the property.
23 | ///
24 | public abstract double revenue { get; }
25 |
26 | ///
27 | /// The Cost Per Mille estimated impressions of the ad in USD.
28 | /// The same value as multiplied by 1000.
29 | ///
30 | public abstract double cpm { get; }
31 |
32 | ///
33 | /// Accuracy of the revenue value.
34 | ///
35 | public abstract PriceAccuracy priceAccuracy { get; }
36 |
37 | ///
38 | /// The creative id tied to the ad, if any. May be null.
39 | /// You can report creative issues to our Ad review team using this id.
40 | ///
41 | public abstract string creativeIdentifier { get; }
42 |
43 | ///
44 | /// Gets the Ad Unit identifier from the mediated network that purchased the impression.
45 | ///
46 | public abstract string sourceUnitId { get; }
47 |
48 | ///
49 | /// The amount of impressions of all ad formats to the current user for all sessions.
50 | ///
51 | public abstract int impressionDepth { get; }
52 |
53 | ///
54 | /// The total revenue in USD from impressions of all ad formats to the current user for all sessions.
55 | ///
56 | public abstract double lifetimeRevenue { get; }
57 |
58 | [System.Obsolete("Renamed to sourceUnitId")]
59 | public string identifier { get { return sourceUnitId; } }
60 |
61 | public AdMetaData(AdType type)
62 | {
63 | this.type = type;
64 | }
65 |
66 | public override string ToString()
67 | {
68 | var result = new StringBuilder("Impression of the ")
69 | .Append(type)
70 | .Append(" ads with ");
71 |
72 | var precision = priceAccuracy;
73 | if (precision == PriceAccuracy.Undisclosed)
74 | {
75 | result.Append("undisclosed cost ");
76 | }
77 | else
78 | {
79 | if (precision == PriceAccuracy.Floor)
80 | result.Append("a floor ");
81 | else
82 | result.Append("an average ");
83 | result.Append(cpm)
84 | .Append(" CPM ");
85 | }
86 | result.Append("from ")
87 | .Append(network);
88 |
89 | var creative = creativeIdentifier;
90 | if (!string.IsNullOrEmpty(creative))
91 | result.Append(" creative id: ")
92 | .Append(creative);
93 |
94 | return result.ToString();
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/AdNetwork.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 |
5 | namespace CAS
6 | {
7 | public enum AdNetwork
8 | {
9 | GoogleAds = 0,
10 | LiftoffMonetize = 1,
11 | Kidoz = 2,
12 | Chartboost = 3,
13 | UnityAds = 4,
14 | AppLovin = 5,
15 | SuperAwesome = 6,
16 | StartIO = 7,
17 | CASExchange = 8,
18 | AudienceNetwork = 9,
19 | InMobi = 10,
20 | DTExchange = 11,
21 | [Obsolete("No longer supported")]
22 | MyTarget = 12,
23 | CrossPromotion = 13,
24 | IronSource = 14,
25 | YandexAds = 15,
26 | HyprMX = 16,
27 |
28 | Smaato = 18,
29 | Bigo = 19,
30 | Ogury = 20,
31 | Madex = 21,
32 | Mintegral = 23,
33 | Pangle = 24,
34 | YsoNetwork = 25,
35 | Prado = 26,
36 |
37 | DSPExchange = 30,
38 | LastPage = 31,
39 |
40 | }
41 |
42 | public static class AdNetworkExtension
43 | {
44 | public static string GetTag(this AdNetwork network)
45 | {
46 | switch (network)
47 | {
48 | case AdNetwork.GoogleAds: return "AM";
49 | case AdNetwork.LiftoffMonetize: return "V";
50 | case AdNetwork.Kidoz: return "K";
51 | case AdNetwork.Chartboost: return "CB";
52 | case AdNetwork.UnityAds: return "U";
53 | case AdNetwork.AppLovin: return "AL";
54 | case AdNetwork.SuperAwesome: return "SuA";
55 | case AdNetwork.AudienceNetwork: return "FB";
56 | case AdNetwork.InMobi: return "IM";
57 | case AdNetwork.CrossPromotion: return "P";
58 | case AdNetwork.IronSource: return "IS";
59 | case AdNetwork.YandexAds: return "Ya";
60 | case AdNetwork.DTExchange: return "Fy";
61 | case AdNetwork.Mintegral: return "MB";
62 | case AdNetwork.Pangle: return "Pa";
63 | case AdNetwork.HyprMX: return "HMX";
64 | case AdNetwork.Smaato: return "Sma";
65 | case AdNetwork.Bigo: return "Big";
66 | case AdNetwork.Madex: return "Ma";
67 | case AdNetwork.StartIO: return "SIO";
68 | case AdNetwork.Ogury: return "Og";
69 | case AdNetwork.CASExchange: return "Ex";
70 | case AdNetwork.YsoNetwork: return "YSO";
71 | case AdNetwork.Prado: return "Pr";
72 | default: return string.Empty;
73 | }
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/AdPosition.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 |
5 | namespace CAS
6 | {
7 | ///
8 | /// Ad Position on screen.
9 | /// ___Left____Center____Right__
10 | /// Top | 1 | 0 | 2 |
11 | /// Middle | 7 | 6 | 8 |
12 | /// Bottom | 4 | 3 | 5 |
13 | ///
14 | public enum AdPosition
15 | {
16 | TopCenter = 0,
17 | TopLeft = 1,
18 | TopRight = 2,
19 | BottomCenter = 3,
20 | BottomLeft = 4,
21 | BottomRight = 5,
22 | MiddleCenter = 6,
23 | MiddleLeft = 7,
24 | MiddleRight = 8,
25 |
26 | ///
27 | /// Service value to continue use previously Ad Position.
28 | ///
29 | Undefined,
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/AdSize.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | namespace CAS
4 | {
5 | [WikiPage( "https://github.com/cleveradssolutions/CAS-Unity/wiki/Banner-Ads#ad-size" )]
6 | public enum AdSize
7 | {
8 | // 0 Index reserved for internal logic
9 |
10 | ///
11 | /// Standard banner size 320dp width and 50dp height
12 | ///
13 | Banner = 1,
14 | ///
15 | /// Pick Adaptive AdSize for screen width but not more than 728dp.
16 | /// Pick the best ad size, adaptive banners use fixed aspect ratios instead of fixed heights.
17 | /// The height of adaptive banners cannot be less than 50 dp and more than 250 dp.
18 | /// This results in banner ads that occupy a more consistent portion
19 | /// of the screen across devices and provide opportunities for improved performance.
20 | /// For full width banners, you can use the .
21 | ///
22 | AdaptiveBanner = 2,
23 | ///
24 | /// Typically, Smart Banners on phones have a size.
25 | /// Or on tablets a size.
26 | ///
27 | SmartBanner = 3,
28 | ///
29 | /// Leaderboard banner size 728dp width and 90dp height
30 | ///
31 | Leaderboard = 4,
32 | ///
33 | /// Medium Rectangle size 300dp width and 250dp height
34 | ///
35 | MediumRectangle = 5,
36 | ///
37 | /// Pick Adaptive AdSize for full screen width.
38 | /// Pick the best ad size, adaptive banners use fixed aspect ratios instead of fixed heights.
39 | /// The height of adaptive banners cannot be less than 50 dp and more than 250 dp.
40 | /// This results in banner ads that occupy a more consistent portion
41 | /// of the screen across devices and provide opportunities for improved performance.
42 | ///
43 | AdaptiveFullWidth = 6,
44 | ///
45 | /// Thin banners have a smaller height, taller banners compared to anchored adaptive banners.
46 | /// The thin banner uses the full available screen width.
47 | /// Pick the best ad size in full width of screen and height 32-50 for Landscape and 50-90 for Portrait orientations.
48 | /// The height of thin banners can be 32 dp for landscape orientation.
49 | ///
50 | ThinBanner = 7
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/AdType.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 |
5 | namespace CAS
6 | {
7 | public enum AdType
8 | {
9 | Banner = 0,
10 | Interstitial = 1,
11 | Rewarded = 2,
12 | AppOpen = 3,
13 | [Obsolete("Not supported")]
14 | Native = 4,
15 | None,
16 | }
17 |
18 | [Flags]
19 | public enum AdFlags
20 | {
21 | None = 0,
22 | Banner = 1,
23 | Interstitial = 1 << 1,
24 | Rewarded = 1 << 2,
25 | AppOpen = 1 << 3,
26 | Everything = Banner | Interstitial | Rewarded | AppOpen
27 | }
28 | }
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/ConsentFlow.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 |
5 | namespace CAS
6 | {
7 | ///
8 | /// Use this object for configure Consent flow dialogs for GDPR.
9 | /// Create and attach the object to CAS initialization.
10 | ///
11 | /// MobileAds.BuildManager()
12 | /// .WithConsentFlow(new ConsentFlow()
13 | /// .WithPrivacyPolicy("https://url_to_privacy_policy")
14 | /// )
15 | /// .Build();
16 | ///
17 | /// By default, the consent flow will be shown to users who are protected by laws.
18 | /// You can prevent us from showing the consent dialog to the user ussing followed lines:
19 | ///
20 | /// MobileAds.BuildManager()
21 | /// .WithConsentFlow(new ConsentFlow(isEnabled: false))
22 | /// .Build();
23 | ///
24 | /// You can also display Consent Flow at any time using the show functions:
25 | ///
26 | /// new ConsentFlow()
27 | /// .WithCompletionListener((status) =>
28 | /// {
29 | /// Debug.Log("Consent flow completed with status: " + status.ToString());
30 | /// })
31 | /// .ShowIfRequired();
32 | ///
33 | ///
34 | public class ConsentFlow
35 | {
36 | public bool isEnabled;
37 | public string privacyPolicyUrl = null;
38 | public Action OnResult = null;
39 | public DebugGeography debugGeography = DebugGeography.EEA;
40 |
41 | ///
42 | /// Create Conset flow configuration
43 | ///
44 | /// Is enabled auto display consent flow if required on Ads initialization.
45 | public ConsentFlow(bool isEnabled = true)
46 | {
47 | this.isEnabled = isEnabled;
48 | }
49 |
50 | ///
51 | /// Override a link to the App's Privacy Policy in the consent dialog.
52 | ///
53 | public ConsentFlow WithPrivacyPolicy(string url)
54 | {
55 | privacyPolicyUrl = url;
56 | return this;
57 | }
58 |
59 | ///
60 | /// Set a listener to be invoked when the dialog is dismissed.
61 | /// The with which the dialog is dismissed will be passed to the listener function.
62 | ///
63 | public ConsentFlow WithCompletionListener(Action result)
64 | {
65 | OnResult += result;
66 | return this;
67 | }
68 |
69 | ///
70 | /// Sets the debug geography for testing purposes.
71 | /// Note that debug settings only work with Test Ad Mode enabled or for .
72 | /// Default value is
73 | ///
74 | public ConsentFlow WithDebugGeography(DebugGeography debugGeography)
75 | {
76 | this.debugGeography = debugGeography;
77 | return this;
78 | }
79 |
80 | public enum Status
81 | {
82 | Unknown = 0,
83 |
84 | ///
85 | /// User consent obtained. Personalized vs non-personalized undefined.
86 | ///
87 | Obtained = 3,
88 |
89 | ///
90 | /// User consent not required.
91 | ///
92 | NotRequired = 4,
93 |
94 | ///
95 | /// User consent unavailable.
96 | ///
97 | Unavailable = 5,
98 |
99 | ///
100 | /// There was an internal error.
101 | ///
102 | InternalError = 10,
103 |
104 | ///
105 | /// There was an error loading data from the network.
106 | ///
107 | InternetError = 11,
108 |
109 | ///
110 | /// There was an error with the UI context is passed in.
111 | ///
112 | ContextInvalid = 12,
113 |
114 | ///
115 | /// There was an error with another form is still being displayed.
116 | ///
117 | FlowStillShowing = 13,
118 | }
119 |
120 | public enum DebugGeography
121 | {
122 | ///
123 | /// Disable geography debugging.
124 | ///
125 | Disabled = 0,
126 |
127 | ///
128 | /// Geography appears as in European Economic Area.
129 | ///
130 | EEA = 1,
131 |
132 | ///
133 | /// Geography appears as not in European Economic Area.
134 | ///
135 | [Obsolete("Renamed to Other")]
136 | NotEEA = 2,
137 |
138 | ///
139 | /// Geography appears as in a regulated US State for debug devices.
140 | ///
141 | RegulatedUSState = 3,
142 |
143 | ///
144 | /// Geography appears as in a region with no regulation in force.
145 | ///
146 | Other = 4
147 | }
148 | }
149 | }
150 |
151 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/EventExecutor.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System.Collections;
4 | using System.Collections.Generic;
5 | using UnityEngine;
6 | using System;
7 |
8 | namespace CAS
9 | {
10 | ///
11 | /// Callbacks from CleverAdsSolutions are not guaranteed to be called on Unity thread.
12 | /// You can use EventExecutor to schedule each calls on the next Update() loop
13 | ///
14 | [WikiPage("https://github.com/cleveradssolutions/CAS-Unity/wiki/Other-Options#execute-events-on-unity-thread")]
15 | public static class EventExecutor
16 | {
17 | private static EventExecutorComponent instance = null;
18 |
19 | private static List eventsQueue = new List();
20 | private static List startedEvents = new List();
21 |
22 | private static volatile bool eventsQueueEmpty = true;
23 |
24 | ///
25 | /// Creation of the Executor component if needed.
26 | ///
27 | public static void Initialize()
28 | {
29 | if (instance)
30 | return;
31 | // Add an invisible game object to the scene
32 | GameObject obj = new GameObject("CASMainThreadExecuter");
33 | obj.hideFlags = HideFlags.HideAndDontSave;
34 | UnityEngine.Object.DontDestroyOnLoad(obj);
35 | instance = obj.AddComponent();
36 | }
37 |
38 | ///
39 | /// Is initialized already.
40 | ///
41 | public static bool IsActive()
42 | {
43 | return instance;
44 | }
45 |
46 | ///
47 | /// Schedule action on the next Update() loop in Unity Thread.
48 | /// Warning! To enable EventExecutor requires call once static method.
49 | ///
50 | public static void Add(Action action)
51 | {
52 | if (action == null)
53 | {
54 | Debug.LogError("Event Executor skip null action");
55 | return;
56 | }
57 | lock (eventsQueue)
58 | {
59 | eventsQueue.Add(action);
60 | eventsQueueEmpty = false;
61 | }
62 | }
63 |
64 |
65 | public sealed class EventExecutorComponent : MonoBehaviour
66 | {
67 | private void Update()
68 | {
69 | if (eventsQueueEmpty)
70 | return;
71 |
72 | lock (eventsQueue)
73 | {
74 | startedEvents.AddRange(eventsQueue);
75 | eventsQueue.Clear();
76 | eventsQueueEmpty = true;
77 | }
78 |
79 | for (int i = 0; i < startedEvents.Count; i++)
80 | {
81 | try
82 | {
83 | var action = startedEvents[i];
84 | if (action.Target != null)
85 | action.Invoke();
86 | }
87 | catch (Exception e)
88 | {
89 | Debug.LogException(e);
90 | }
91 | }
92 | startedEvents.Clear();
93 | }
94 |
95 | private void OnDisable()
96 | {
97 | if (instance == this)
98 | instance = null;
99 | }
100 | }
101 | }
102 | }
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/IAdView.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using UnityEngine;
5 |
6 | namespace CAS
7 | {
8 | public delegate void CASViewEvent(IAdView view);
9 | public delegate void CASViewEventWithError(IAdView view, AdError error);
10 | public delegate void CASViewEventWithMeta(IAdView view, AdMetaData data);
11 |
12 | [WikiPage("https://github.com/cleveradssolutions/CAS-Unity/wiki/Banner-Ads")]
13 | public interface IAdView : IDisposable
14 | {
15 | ///
16 | /// Called when the ad loaded and ready to present.
17 | ///
18 | event CASViewEvent OnLoaded;
19 | ///
20 | /// Сalled when an error occurred with the ad.
21 | ///
22 | event CASViewEventWithError OnFailed;
23 | ///
24 | /// Called when the ad impression detects paid revenue.
25 | ///
26 | event CASViewEventWithMeta OnImpression;
27 | ///
28 | /// Called when the user clicks on the Ad.
29 | ///
30 | event CASViewEvent OnClicked;
31 |
32 | ///
33 | /// Get the manager of the AdView.
34 | ///
35 | IMediationManager manager { get; }
36 |
37 | ///
38 | /// Current ad size.
39 | /// You cannot resize ad, but instead get the new for the size you want
40 | /// using the method.
41 | ///
42 | AdSize size { get; }
43 |
44 | ///
45 | /// Get the real AdView rect with position and size in pixels on screen.
46 | /// The position on the screen is calculated with the addition of indents for the cutouts.
47 | ///
48 | Rect rectInPixels { get; }
49 |
50 | ///
51 | /// Check ready ads to present
52 | ///
53 | bool isReady { get; }
54 |
55 | ///
56 | /// Set the number of seconds an ad is displayed before a new ad is shown.
57 | /// After the interval has passed, a new advertisement will be automatically loaded.
58 | /// This value will override global
59 | ///
60 | int refreshInterval { get; set; }
61 |
62 | ///
63 | /// Disable auto refresh ads.
64 | ///
65 | void DisableRefresh();
66 |
67 | ///
68 | /// The position where the AdView ad should be placed.
69 | /// The enum lists the valid ad position values.
70 | /// Default:
71 | ///
72 | AdPosition position { get; set; }
73 |
74 | ///
75 | /// The AdView will be positioned at the X and Y values passed to the method,
76 | /// where the origin is the selected corner of the screen.
77 | /// The coordinates on the screen are determined not in pixels, but in Density-independent Pixels(DP)!
78 | ///
79 | /// X-coordinate on screen in DP.
80 | /// Y-coordinate on screen in DP.
81 | /// The corner of the screen.
82 | void SetPosition(int x, int y, AdPosition position = AdPosition.TopLeft);
83 |
84 | ///
85 | /// The AdView will be positioned at the X and Y values passed to the method,
86 | /// where the origin is the selected corner of the screen.
87 | /// The coordinates on the screen are determined in pixels.
88 | ///
89 | /// X-coordinate on screen in pixels.
90 | /// Y-coordinate on screen in pixels.
91 | /// The corner of the screen.
92 | void SetPositionPx(int x, int y, AdPosition position = AdPosition.TopLeft);
93 |
94 | ///
95 | /// Manual load the Ad or reload current loaded Ad to skip impression.
96 | /// You can get a callback for the successful loading of an ad by subscribe to .
97 | ///
98 | void Load();
99 |
100 | ///
101 | /// Activate or deactivate the AdView
102 | /// If the AdView is active, it is displayed on the screen and user can interact with it.
103 | /// When you need to hide AdView from the user, just deactivate it.
104 | ///
105 | void SetActive(bool active);
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/IAdsPreset.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | namespace CAS
4 | {
5 | public interface IAdsPreset
6 | {
7 | int defaultBannerRefresh { get; }
8 | int defaultInterstitialInterval { get; }
9 | bool defaultDebugModeEnabled { get; }
10 | bool defaultLocationCollectionEnabled { get; }
11 | [System.Obsolete("Use defaultLocationCollectionEnabled instead.")]
12 | bool defaultIOSTrackLocationEnabled { get; }
13 | bool defaultInterstitialWhenNoRewardedAd { get; }
14 | AdFlags defaultAllowedFormats { get; }
15 | Audience defaultAudienceTagged { get; }
16 | LoadingManagerMode defaultLoadingMode { get; }
17 |
18 | int managersCount { get; }
19 | string GetManagerId( int index );
20 | int IndexOfManagerId( string id );
21 | bool IsTestAdMode();
22 | }
23 | }
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/ITargetingOptions.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using System.Collections.Generic;
5 |
6 | namespace CAS
7 | {
8 | public enum Gender
9 | {
10 | Unknown, Male, Female
11 | }
12 |
13 | [WikiPage("https://github.com/cleveradssolutions/CAS-Unity/wiki/Initialize-CAS#targeting-options")]
14 | public interface ITargetingOptions
15 | {
16 | ///
17 | /// The user’s gender
18 | ///
19 | Gender gender { get; set; }
20 | ///
21 | /// The user’s age
22 | /// Limitation: 1-99 and 0 is 'unknown'
23 | ///
24 | int age { get; set; }
25 | ///
26 | /// Collect from the device the latitude and longitude coordinated truncated to the
27 | /// hundredths decimal place.
28 | /// Collect only if your application already has the relevant end-user permissions.
29 | /// Does not collect if the target audience is children.
30 | /// By default selected in `Assets/CleverAdsSolutions/Settings` menu
31 | ///
32 | bool locationCollectionEnabled { get; set; }
33 | ///
34 | /// Sets the content URL for a web site whose content matches the app's primary content.
35 | /// This web site content is used for targeting and brand safety purposes.
36 | /// Limitation: max URL length 512
37 | ///
38 | string contentURL { get; set; }
39 | ///
40 | /// A list of keywords, interests, or intents related to your application.
41 | /// Words or phrase describing the current activity of the user for targeting purposes.
42 | ///
43 | void SetKeywords(IList keywords);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/InitialConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CAS
4 | {
5 | public class InitialConfiguration
6 | {
7 | ///
8 | /// Get the CAS manager initialization error message or NULL if initialization is successful.
9 | /// Check constants from class.
10 | ///
11 | public readonly string error;
12 | ///
13 | /// Get the initialized CAS manager.
14 | ///
15 | public readonly IMediationManager manager;
16 | ///
17 | /// Get the user's ISO-2 country code, or NULL if the location fails.
18 | ///
19 | public readonly string countryCode;
20 | ///
21 | /// The consent must be requested from the user.
22 | ///
23 | public readonly bool isConsentRequired;
24 | ///
25 | /// Get the consent flow status.
26 | ///
27 | public readonly ConsentFlow.Status consentFlowStatus;
28 |
29 | public InitialConfiguration(string error, IMediationManager manager, string countryCode, bool isConsentRequired, ConsentFlow.Status consentFlowStatus)
30 | {
31 | this.error = error;
32 | this.manager = manager;
33 | this.countryCode = countryCode;
34 | this.isConsentRequired = isConsentRequired;
35 | this.consentFlowStatus = consentFlowStatus;
36 | }
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/InitializationError.cs:
--------------------------------------------------------------------------------
1 | namespace CAS
2 | {
3 | public static class InitializationError
4 | {
5 | ///
6 | /// Indicates that device network connection is not stable enough.
7 | /// Your listener is stored in memory and will be called when initialization is successful.
8 | ///
9 | public const string NoConnection = "Connection failed";
10 |
11 | ///
12 | /// Indicates that the CAS ID is not registered in system.
13 | /// Contact support to clarify the reasons.
14 | ///
15 | public const string NotRegisteredID = "Not registered ID";
16 |
17 | ///
18 | /// Indicates that the SDK version is no longer compatible.
19 | /// Please update to the latest SDK.
20 | ///
21 | public const string VerificationFailed = "Verification failed";
22 |
23 | ///
24 | /// Indicates a temporary problem with the server.
25 | /// If the error could be 100% replicated, please give feedback to us.
26 | ///
27 | public const string ServerError = "Server error";
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/LastPageAdContent.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using UnityEngine;
5 |
6 | namespace CAS
7 | {
8 | [Serializable]
9 | [WikiPage( "https://github.com/cleveradssolutions/CAS-Unity/wiki/Configuring-Last-Page-Ad" )]
10 | public class LastPageAdContent
11 | {
12 | [SerializeField]
13 | private string headline = string.Empty;
14 | [SerializeField]
15 | private string adText = string.Empty;
16 | [SerializeField]
17 | private string destinationURL = string.Empty;
18 | [SerializeField]
19 | private string imageURL = string.Empty;
20 | [SerializeField]
21 | private string iconURL = string.Empty;
22 |
23 | ///
24 | /// The latest free ad page for your own promotion.
25 | /// This ad page will be displayed when there is no paid ad to show or internet availability.
26 | ///
27 | /// Apply this content to
28 | ///
29 | /// Enter the message that you want users to see.
30 | /// Enter a description for the app being promoted. Optional property.
31 | /// Enter the URL that CAS will direct users to when they click the ad.
32 | /// This URL is not visible in the ad.
33 | /// Enter the direct URL of the image to be used as the ad file. Optional property.
34 | /// Enter the direct URL of the icon or logo (Small square picture). Optional property.
35 | public LastPageAdContent( string headline, string adText, string destinationURL, string imageURL, string iconURL )
36 | {
37 | this.headline = headline;
38 | this.adText = adText;
39 | this.destinationURL = destinationURL;
40 | this.imageURL = imageURL;
41 | this.iconURL = iconURL;
42 | }
43 |
44 | public string Headline { get { return headline; } }
45 | public string AdText { get { return adText; } }
46 | public string DestinationURL { get { return destinationURL; } }
47 | public string ImageURL { get { return imageURL; } }
48 | public string IconURL { get { return iconURL; } }
49 | }
50 | }
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/LoadingManagerMode.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 |
5 | namespace CAS
6 | {
7 | [WikiPage("https://github.com/cleveradssolutions/CAS-Unity/wiki/Other-Options#loading-mode")]
8 | public enum LoadingManagerMode
9 | {
10 | [Obsolete("Not longer support, replaced to Auto")]
11 | FastestRequests = 0,
12 | [Obsolete("Not longer support, replaced to Auto")]
13 | FastRequests = 1,
14 |
15 | ///
16 | /// Automatic control loading mediation ads.
17 | /// Provides balanced polling rate of mediation networks for advertising content.
18 | /// Doesn't significantly affect application performance.
19 | ///
20 | Auto = 2,
21 |
22 | ///
23 | /// Same as Auto
24 | ///
25 | Optimal = Auto,
26 |
27 | [Obsolete("Not longer support, replaced to Auto")]
28 | HighePerformance = 3,
29 |
30 | [Obsolete("Not longer support, replaced to Auto")]
31 | HighestPerformance = 4,
32 |
33 | ///
34 | /// Manual control loading mediation ads.
35 | /// Provides minimal impact on application performance.
36 | /// But it requires manual preparation of advertising content for display.
37 | /// Use ad loading methods before trying to show:
38 | /// Reduces memory reservations for advertising content.
39 | ///
40 | Manual = 5
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/MediationExtras.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | using System;
4 | using System.Collections.Generic;
5 |
6 | namespace CAS
7 | {
8 | public class MediationExtras
9 | {
10 | ///
11 | /// Advertising Tracking Enabled for Audience Network for iOS Only.
12 | /// Set the `FBAdSettings.setAdvertiserTrackingEnabled` flag.
13 | /// Value "1" flag to inform Audience Network to use the data to deliver personalized ads
14 | /// in line with your own legal obligations, platform terms, and commitments you’ve made to your users
15 | /// Value "0" flag to inform Audience Network to not be able to deliver personalized ads.
16 | ///
17 | [WikiPage("https://github.com/cleveradssolutions/CAS-Unity/wiki/Additional-Meta-AudienceNetwork-steps")]
18 | public static string facebookAdvertiserTracking = "FB_track";
19 |
20 | ///
21 | /// Facebook Data Processing Options for Users in California
22 | /// Set the `FBAdSettings.setDataProcessingOptions` flag.
23 | /// Values:
24 | /// - "" - To explicitly not enable Limited Data Use (LDU) mode
25 | /// - "LDU" - To enable LDU mode using geolocation
26 | /// - "LDU_1_1000" - To enable LDU for users and specify user geography
27 | ///
28 | /// For information about how to implement Facebook’s Limited Data Use flag in California,
29 | /// visit Facebook’s developer documentation.
30 | ///
31 | [WikiPage("https://github.com/cleveradssolutions/CAS-Unity/wiki/Additional-Meta-AudienceNetwork-steps")]
32 | public static string facebookDataProcessing = "FB_dp";
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Source~/CleverAdsSolutions.Common/Source/PriceAccuracy.cs:
--------------------------------------------------------------------------------
1 | // Copyright © 2024 CAS.AI. All rights reserved.
2 |
3 | namespace CAS
4 | {
5 | [WikiPage( "https://github.com/cleveradssolutions/CAS-Unity/wiki/Impression-Level-Data" )]
6 | public enum PriceAccuracy
7 | {
8 | ///
9 | /// The estimated revenue, can also be a minimum price (floor) for ad impression.
10 | ///
11 | Floor,
12 | ///
13 | /// The revenue provided as part of the real-time auction.
14 | ///
15 | Bid,
16 | ///
17 | /// The revenue is '0', when the demand source does not agree to disclose the payout of impression.
18 | ///
19 | Undisclosed
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.cleversolutions.ads.unity",
3 | "version": "4.0.2",
4 | "displayName": "Clever Ads Solutions for Unity",
5 | "description": "The CAS.AI Unity plugin allows you to easily monetize your apps for iOS and Android using lot of Ads SDKs in mediation via a unified C# API in Unity.",
6 | "unity": "2018.4",
7 | "documentationUrl": "https://github.com/cleveradssolutions/CAS-Unity/wiki",
8 | "changelogUrl": "https://github.com/cleveradssolutions/CAS-Unity/releases",
9 | "keywords": [
10 | "Mobile",
11 | "Ads",
12 | "Mediation",
13 | "Monetization",
14 | "Advertising",
15 | "Android",
16 | "iOS"
17 | ],
18 | "author": {
19 | "name": "CAS AI",
20 | "email": "support@cleveradssolutions.com",
21 | "url": "https://cas.ai"
22 | },
23 | "samples": [
24 | {
25 | "displayName": "Sample of C# integration",
26 | "description": "This sample showcases the basics of how to use CAS Plugin in C# scripts.",
27 | "path": "Samples~/SampleScripts"
28 | },
29 | {
30 | "displayName": "Sample of Components integration",
31 | "description": "This sample showcases the basics of how to use in Scene Components.",
32 | "path": "Samples~/SampleComponents"
33 | }
34 | ]
35 | }
--------------------------------------------------------------------------------
/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f7c2cc459d56c41479c2a08e0cba8c34
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------