Code Monkey home page Code Monkey logo

cas-unity's Introduction

CAS.AI Unity Plugin

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.

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.

openupm App-ads.txt

Documentation

For instructions on using the plugin, please refer to this developer guide.

Sample application

For a sample application demonstrating how to use CAS.AI Unity plugin see The Sample Unity project.

Suggesting improvements

To file bugs, make feature requests, or to suggest other improvements, please use GitHub's issue tracker.

Support

mailto:[email protected]

cas-unity's People

Contributors

andrewkahr avatar jedures avatar mwfiae avatar str4tos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cas-unity's Issues

Unity cloud build ios fails with error after updating casai to 3.5.2 from 3.4.2

Fails with error: [error] [2024-02-09T15:59:49.430Z] - 7.3.35.2.7.4 - INFO: โ–ธ โŒ error: Multiple commands produce '/BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-bvukkiuohmdwhfgxfrghubxkprlu/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/UnityFramework.framework/PrivacyInfo.xcprivacy'
Maybe there is workaround? We are using: Cas.ai, Pollfish, Firebase, Amplitude, Appsflyer, Tapjoy, Unity Analytics

Wrong version CAS 3.8.0

In Inspector define wrong version number

Fix:
MobileAds.cs
MobileAds.wrapperVersion 3.7.3 -> 3.8.0

[Android] API 34 Build error: AAPT2 Unexpected error during link, attempting to stop daemon.

Environment

  • Caused by Ad Adapter: DTExchange
  • Target Android SDK: 34
  • Found in Unity: 2020.X.X, 2021.X.X
  • Fixed in Unity: 2022.3.X

Description

When attempting to build the project with Target Android SDK 34 and Build Tools version below 34.0.0, the build fails due to an AAPT2 error. This issue arises because some dependencies require AAPT2 features that are only available in Build Tools version 34.0.0 and higher.

Unity versions 2020 and 2021 use Build-Tools 30.0.2, which lacks support for the required AAPT2 features.
Unity version 2022 has support for Gradle 7.0.2, which includes a fix for AAPT2 issue.

Build error

An example of gradle build error:

* What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Unexpected error during link, attempting to stop daemon.
     This should not happen under normal circumstances, please file an issue if it does.

Solution:

To resolve this issue in Unity 2020, 2021:

  1. Download AAPT2.
    Download Build-Tools 34.0.0 via Android SDK Manager or obtain just the AAPT2 component from Google Maven.
  2. Override Gradle path to AAPT2
    Add the following line before **ADDITIONAL_PROPERTIES** in Assets/Plugins/Android/gradleTemplate.properties file:
android.aapt2FromMavenOverride=/full/path/to/AndroidSDK/build-tools/34.0.0/aapt2

Replace /full/path/to/AndroidSDK with the actual path to your Android SDK installation directory.
For Windows use file with extension: appt2.exe.

Note

Upgrading your project to Unity 2022 is recommended as it includes compatibility with the required AAPT2 features, thereby resolving this issue.

Can't run or build unity project with CAS package installed for any platform except 'iOS' and 'Android'

When any platform except 'iOS' and 'Android' (for example like "PC, Mac & Linux Standalone" or WebGL) is selected in Build Settings, after importing the CAS package to Your Project, you will get the following compiler error:

Library\PackageCache\com.cleversolutions.ads.unity@546484f78f\Editor\CASEditorUtils.cs(108,17): error CS0103: The name 'CASPreprocessBuild' does not exist in the current context

CAS package version: 2.7.3

Possible solutions:

The menu item in CASEditorUtils.cs should be wrapped inside the same preprocessor directives as CASPreprocessBuild class:

#if UNITY_ANDROID || UNITY_IOS || CASDeveloper

Issues Building in Unity 6000.0.1f1

The plugin cannot build for Android after updating to Unity 6000.0.1f1 as it has upgraded to gradle plugin version 8.3.0 which removed android.enableDexingArtifactTransform=false and replaced it with android.useFullClasspathForDexingTransform=true. Even after making this change the build will fail stating that a namespace needs to be defined for the CASPlugin.androidlib. It seems the library is defining the namespace in the AndroidManifest.xml which is no longer supported in 8.3.0 and instead needs to be defined in the library's build.gradle. This was done on a fresh project in 6000.0.1f1 after following the setup instructions in the wiki.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.