Search Issue Tracker
By Design
Votes
0
Found in [Package]
3.0.1
Issue ID
1127423
Regression
Yes
#if UNITY_ADS doesn't return the right result when not on Ads platform (Windows)
This small repro project was ripped out of a customer project.
Repro steps:
- download this project
- open it with unity 18.3, 19.1 or 19.2
- Ads package version should be 3.0.1
- Play the scene
- notice there is no button in play mode
What happens:
- if on windows, the players should always be able to Hunt
- if on Android, the player will have to watch an add first
- #if UNITY_ADS doesn't return the right result so button ends up not appearing at all
In the larger project, i can't build at all with 3.0.1 because the code paths end up calling library functions that won't exist on Windows.
Reproducible on Unity Editor 2018.3.0.a1 and all older versions.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Audio Mixer does not change volume when lowering volume on an Audio Mixer loaded from AssetBundles
- Error “Value cannot be null. Parameter name: key UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)” thrown and Addressables build fails when "Include in Build" is disabled and using Addressables For Android package
- “error CS0433: The type 'CodeBinaryOperatorType' exists in both 'System.CodeDom and 'System" compilation errors are thrown when opening a specific project
- Metal Vertex Shader warning is being thrown when creating a VR Template Project
- Asset database warning is thrown when declaring font variable in the USS text file
Resolution Note:
This behaviour is by design. UNITY_ADS returns false on the platforms other than Android/iOS (even in Editor). If you want to have such behaviour, you need to add UNITY_ADS to Scripting Define Symbols inside Project Settings.