#š±āmobile
1 messages Ā· Page 15 of 1
I was confused with App ID and Interact ID or smth
App id - on all app
Interact ID - only for AD
I have a game that looks perfect on an ipad and then when i change it to a phone it looks horrible ( the art looks bad) can anyone help me fix that?
not if you don't show anything
Looks like you're using Text and not TextMeshPro
is there a solution?
@glossy sluice Did you try resetting scale slider on the player window?
how do i do that
move this up to 100 .. but the device then won't fit on screen, but it'll let you check the quality.
You need to step back and review your settings. Maybe create a test scene with defaults to see how it looks. You might have changed scaling on objects or pixel per unit settings, etc.
is there some guide out here to learn the basics principles of an idle (plays itself) mobile game rpg style?
So everything looks fine on the model in Windows build, but when I switched to Mobile it made this happen to my Normal Maps. Anyone know how to fix this?
Weird part is it isn't the whole model
Not sure if it helps, but I have RPG Quest 2 in the store (free self playing idle RPG, text based) in the store fronts.
It took a lot longer than I anticipated.
I'm happy to answer questions, but not sure if there are resources out there. I just kind of pushed it through
Hi guys, any one could help me get through the android TV support learning? Where I should start and if there a clear complete guide for that (ping me please)
are you talking about the balancing or the game mechanics to keep players hooked?
why i am getting interstial ad for rewarded ad does anyone know this issue.
No one can help you because you have provided no information.
ok here is the implementation.
using GoogleMobileAds;
using GoogleMobileAds.Api;
public class GoogleMobileAdsDemoScript : MonoBehaviour
{
public void Start()
{
// Initialize the Google Mobile Ads SDK.
MobileAds.Initialize((InitializationStatus initStatus) =>
{
// This callback is called once the MobileAds SDK is initialized.
});
}
}
// These ad units are configured to always serve test ads.
#if UNITY_ANDROID
private string _adUnitId = "ca-app-pub-3940256099942544/5224354917";
#elif UNITY_IPHONE
private string _adUnitId = "ca-app-pub-3940256099942544/1712485313";
#else
private string _adUnitId = "unused";
#endif
private RewardedAd _rewardedAd;
/// <summary>
/// Loads the rewarded ad.
/// </summary>
public void LoadRewardedAd()
{
// Clean up the old ad before loading a new one.
if (_rewardedAd != null)
{
_rewardedAd.Destroy();
_rewardedAd = null;
}
Debug.Log("Loading the rewarded ad.");
// create our request used to load the ad.
var adRequest = new AdRequest();
// send the request to load the ad.
RewardedAd.Load(_adUnitId, adRequest,
(RewardedAd ad, LoadAdError error) =>
{
// if error is not null, the load request failed.
if (error != null || ad == null)
{
Debug.LogError("Rewarded ad failed to load an ad " +
"with error : " + error);
return;
}
Debug.Log("Rewarded ad loaded with response : "
+ ad.GetResponseInfo());
_rewardedAd = ad;
});
}
public void ShowRewardedAd()
{
const string rewardMsg =
"Rewarded ad rewarded the user. Type: {0}, amount: {1}.";
if (rewardedAd != null && rewardedAd.CanShowAd())
{
rewardedAd.Show((Reward reward) =>
{
// TODO: Reward the user.
Debug.Log(String.Format(rewardMsg, reward.Type, reward.Amount));
});
}
}
!code
private void RegisterEventHandlers(RewardedAd ad)
{
// Raised when the ad is estimated to have earned money.
ad.OnAdPaid += (AdValue adValue) =>
{
Debug.Log(String.Format("Rewarded ad paid {0} {1}.",
adValue.Value,
adValue.CurrencyCode));
};
// Raised when an impression is recorded for an ad.
ad.OnAdImpressionRecorded += () =>
{
Debug.Log("Rewarded ad recorded an impression.");
};
// Raised when a click is recorded for an ad.
ad.OnAdClicked += () =>
{
Debug.Log("Rewarded ad was clicked.");
};
// Raised when an ad opened full screen content.
ad.OnAdFullScreenContentOpened += () =>
{
Debug.Log("Rewarded ad full screen content opened.");
};
// Raised when the ad closed full screen content.
ad.OnAdFullScreenContentClosed += () =>
{
Debug.Log("Rewarded ad full screen content closed.");
};
// Raised when the ad failed to open full screen content.
ad.OnAdFullScreenContentFailed += (AdError error) =>
{
Debug.LogError("Rewarded ad failed to open full screen content " +
"with error : " + error);
};
}
š Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
š Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
private void RegisterReloadHandler(RewardedAd ad)
{
// Raised when the ad closed full screen content.
ad.OnAdFullScreenContentClosed += () =>
{
Debug.Log("Rewarded Ad full screen content closed.");
// Reload the ad so that we can show another as soon as possible.
LoadRewardedAd();
};
// Raised when the ad failed to open full screen content.
ad.OnAdFullScreenContentFailed += (AdError error) =>
{
Debug.LogError("Rewarded ad failed to open full screen content " +
"with error : " + error);
// Reload the ad so that we can show another as soon as possible.
LoadRewardedAd();
};
}
@lapis tree delete all that !code and share it the correct way š
š Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
š Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
Yeah I'm not reading any of that.
I'd start with checking for the issues on their github and looking for the sqlite3 plugin in the project and make sure it's configured properly
im trying to export to android and i keep getting this error: A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable See the Console for details.
See the Console for details
not really, im talking about the general architecture how to build a game with backend in mind i guess, from what i understand so far, unity can act as a client and i saw there were some already made backend solutions but those come at the cost obviously, so idk what people do in general, i guess that main thing im looking for is "how to design a game to which i can add multiplayer later on". I was also wondering if it exists defined techniques as to how to organize a RPG style game, like how people made frameworks for the web, things like that
I'm having a really hard time building for android on Unity 2022
it gets stuck building scene 0
and resolving android dependencies
I dont even know where to start
i get this but updating doesnt work
if i use highest installed it gets stuck here
for context its a very casual game with small memory and performance footprint
I think nobody knows the solution for this.
could be just a placeholder
What to explain?
It might be just a general placeholder for test ads
i kept the placeholders but its still showing interstitial. i checked admob also there is no error.
is there something to do with ads-app.txt in domain.
if its that the error. then how to put ads-app.txt on domain does anyone know.
Hi
Has anyone had issues with ā installing CocoaPods ā ?
Iām on an Apple M3 pro.
Anyone of you having issues with latest IAP 4.12.0 package aswell ? Google play console is throwing errors in almost every build i upload and users have reported login problems. May in conflict with (Firebase Authentification 12.0.0 or Google Play Games plugin for Unity v11.01 or Level Play 8.1.1) ?
Hi, anyone know how to start configure the Android TV Controls ? like configuring the remote control and gamepad keys ?
hello, can someone help me increase frames in my game?
been trying to clone a project from Domestika and open it with the correct version in Unity, but the entire project keeps loading with blank files and nothing in the editor. I have tried using a new version too and have had pretty much the same result. What could I be doing wrong here?
something like this?
frames++
or maybe you mean optimizations?
https://learn.unity.com/tutorial/introduction-to-optimization-in-unity#
Unityās optimization tools allow you to diagnose common performance problems and refine a projectās design, code, and related assets to maximize efficiency. An optimized project will run smoother and more responsively on your target platforms and devices. This tutorial will help you better understand optimization tools and techniques available i...
will be useful. thank you!
hi, a have a video player with an mp4 which just plays once at the start of my game, for some reason, it works perfectly on the editor but when trying it on a build on my phne it just doesn't play and the app freezes. I suposse it has something to do with the coded but i have no idea what to do.
My game crashing when using android 14 ?? Unity version: 2022.1.23f1
Any explanation ?
Check logcat (and update to LTS, that version is old)
What unity version is LTS that has fixed this problem ? It's not showing for me
the latest 2022lts version, something like 2022.3.36 or something
I downloaded the 2022.3.0 and actually I don't find the 34 API level. How could I add that?
Why did you get the oldest version there is?
There have been 1-2 years of updates
Just get the latest via unity hub
That version definitely has bugs/issues
I find that last LTS version is 2021
And I'm in an old unity hub version since I have problems with installing with the new version.
There also is a 2022 version from last week or so
Maybe fix that then š¤
Maybe if you could try to provide me the version number
Tried a lot of ways that time. best solution for me to downgrade the unity hub
I did...
Okay I will try that.
have you transcode the video yet?
if it is just checking it the box then yeah, i don't know if i should do anything else
i managed to make it work, it had to do with the script it had, i changed it a little and now it works, but i really don't know WHY it works
basically, before i had the next scene loaded as an async process and it changed to it when the mp4 finished, and after deleting that now it works
Need help optimising my project for mobile how can I see if Iām gpu or cpu bound
how can I see if Iām gpu or cpu bound
profile it
Unity hub will install all that automatically. I am not going to dive into making a workaround for a workaround. Fix the original issue, being unity hub
guys does anyone know if i can put 3d objects from blender into 2d game for android? cuz there are sprites in unity and i m note sure if they are convertable from 3d to 2d,did not see useful youtube guides on it.Like can i just change the 2d model to 3d and keep the physics of 2d model?
@pliant relic hi you can use the render texture from 3d camera, or google 2.5 d game on unity
Is it necessary to say I use encryption in App Store if encryption used in API only and I have no idea what kind of encryption?
oh okay thx,i ll check it out
I tried that. Now it's the same thing....
Did you install Unity with android and both submodules via the hub? @tawny wind
Yes
been testing my game for multiple devices recently. hooked a Lenovo tablet to my pc and turned on debugging mode.
For some reason the terrain on it is super low res and text doesn't show, even though everything else in the game works. Game works normally on my main phone and pc built version. Anyone can help me here?
Hi, my idea was to store SystemInfo.deviceUniqueIdentifier to user account for the case if he uninstalled app and lose data to be able to restore his data based on deviceUniqueIdentifier but it is always different after reinstall app on iOS is there way to get uniq number for each iOS device?
everything looks low res cause you exported it as low res. theres option for low medium and high
uncheck low and check on high.
The value changes when the user deletes all of that vendorās apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds using Xcode or when installing an app on a device using ad-hoc distribution. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.
Source:
https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor
I think it might be better if you use Apple ID to save player data instead
Thank you! I got it. - It is changing only because I run build directly from Xcode. Looks like if I distribute app it should be unique for device and same after reinstall.
change the highest level api...
To what? I have 34, 35, etc
And it's Mono, not ilcpp2 š
Okayy it worked when I set it to 34
ok.
I am looking to set up saving games to the cloud for ios - what route would you recommend? I'd like the game restore on a new device to be automatic (like google play services) if possible. thanks in advance!
@fluid marten I use Unity.Authentication services Facebook login to cross platform save in my Android/iOS game. But I didnāt release it yet so donāt know how it will be going. Right now looks like everything is working (tested myself only).
Does anyone have experience with the GPGS API? I did everything this guy does in the video, but I'm not able to log in with Google Play Games. (I'm testing it on the app on my phone, which I downloaded via Google Play internal testing).
#unity #unitygamedevelopment #googleplaygames #login
Hi Guys, In today's video, we have covered how to easily use Google Play Games login in Unity to authenticate players. With this, you can get playerās āNameā, āImage urlā ,āunique IDā and more from Google Play Games and use it to save their progress in Firebase or any other cloud storage.
A...
I think the only difference is that I got the SHA1 without going into the Java bin, I used the keytool command from the home directory.
sounds like the wrong hash if you're using an internal test build. Use the app signing key cert fingerprint
ok. i'm gonna try
I'm trying to build an app using In App Purchasing and Google Play Games Plugin. I needed to upgrade the In App Purchases plugin to use the latest Google Play Billing, as they're deprecating the older version, and now I'm getting duplicate class errors from gradle regarding Jetifier.
I tried deleting resolved packages, enabling Jetifier, disabling, deleting the External Packages resolver and reimporting ... I tried basically everything, nothing fixes this error.
Does anyone know how to fix this?
did you wipe everything the resolver downloaded? sometimes it leaves remnants
thanks, I'll check this out
Could not resolve all files for configuration ':unityLibrary:androidJdkImage'. See the Console for details.
what is this
i tried updating unity, downloading jdk files again etc
but all that was just guesses, i dont rly know what the problem is, even tryed asking GPT but he gave a list of things to try and it didnt work
we're having exactly the same issue after updating to Unity Purchasing lib 4.12 (4.11 had no such problems). This is the kind of duplicate errors I get: > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class android.support.v4.app.RemoteActionCompatParcelizer found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.5.0-runtime (:androidx.core.core-1.5.0:)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.5.0-runtime (:androidx.core.core-1.5.0:)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.5.0-runtime (:androidx.core.core-1.5.0:)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.2.0-runtime (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.5.0-runtime (:androidx.core.core-1.5.0:)
and many more similar ones
What's wrong with Application.targetFrameRate?
When I set 60 I've got 45 (in my 90HZ android)
When I set -1 I've got 30
When I set 90 I've got 70+ (good)
Optimized Frame Pacing is turned off
vsync is 0
I don't get reason of this issue. I used it all time before and have no problem, but now Optimized Frame Pacing was added and etc.?
unity 2022.3.16f1
I got this error when trying to debug why my google play games auth did not work
(FIXED: i used ths comment GitHub Comment)
Anyone know why my app icon won't update? Editor shows everything as changed, but the build has the old icon
Iāve never made an app before so excuse my lack of knowledge but Iāve barely started anything, tried to build the app on my iPhone using Xcode with the iOS built and all I get are build fails and these errors :/
No clue what they mean, any tips?
why whenever i close unity i open it another day or time the ui it just ruins itself?
it was like this
Those aren't the same canvases though. Ones a prefab and the broke one is not.
But hard to say what's happening without looking at how you are setting up your UI. Unity has a pretty wonky UI system and a lot can go wrong with it unfortunately.
Hello, does anyone know what could it be this like pixels in my game, i have tested the same build in different devices and Im not 100% sure but in android 13 works nice, but in android 14 could even look very bad :c
looks like postprocess problem (if you even use it)
is it using urp or built in?
which icon? in the windows explorer or after installed to android?
I solved it. I had to make a different company and product name and delete a registry file for it to work...
@knotty finch @solid lake
Enable "Custom Main Gradle Template", "Custom Gradle Settings Template", "Custom Gradle Properties Template" and "custom androidmanifest" in player settings
I tried that, but let me try again.
resolve afterwards
if still not working try changing your settings for External dependency manager (EDM -> android resolver -> Settings) and enable:
Patch AndroidManifest.xml, patch mainTemplate.gradle, patch gradleTemplate.properties, copy and patch settingsTemplate.gradle from 2022.2
and resolve again. It should generate a "GeneratedLocalRepo" in your asset folder and remove plugins from Plugins-> Android
Execution failed for task ':unityLibrary:generateReleaseRFile'.
> Could not resolve all dependencies for configuration ':unityLibrary:releaseCompileClasspath'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/7.2/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
> Could not find com.google.games:gpgs-plugin-support:0.11.01.
Required by:
project :unityLibrary
When I try resolving, it just opens a window that says "Resolving Packages Succeeded", with no loading (even if I Delete Resolved Packages or Force Resolve)
Thank you very much @urban moon
I enabled "Custom Main Gradle Template" ("Custom Gradle Settings Template", "Custom Gradle Properties Template" and "Custom Main Manifest" were already enable. Also "Custom Launcher Manifest" is disabled and I left it so)
I resolved, then built and I got some new errors. To fix those I had to add "namespace 'com.unity3d.player'" inside the new mainTemplate.gradle and to disable "Optimized Frame Pacing " from Adrnoid's "Resolution & Presentation" project settings.
I resolved again, built again and got again duplicate classes errors.
I wanted to try your 2nd solution (enable "Patch AndroidManifest.xml, patch mainTemplate.gradle, patch gradleTemplate.properties, copy and patch settingsTemplate.gradle from 2022.2") but those are already enabled (see the screenshot with the content of the GeneratedLocalRepo folder).
See the attached txt with the duplicate classes errors I still get.
@everyone can somebody help me with google admob ads implementation?
My problem is the android build. On editor, ads works fine, but when I try to build it for android devices, I get some errors and build fails.
I have updated the unity project at 2022.3.16f1 and admob plugin v9.1.1
it was vulkan :v jajaja ty ;D
Are there still files in your plugins/android folder .aar .jar (plugins) ?
it will be necessary to delete them once. they shouldnt be generated on resolve.
it can be necessary to clear the library folder once too, or fresh reimport external software like firebase.
have you followed all steps exactly like i said.
Yes
according the message you are missing a required plugin. Sounds like your google play plugin is misconfigured or not imported correctly.
It's not, but I can try again
is the plugin inside the GeneratedLocalRepo after resolving
if not the edm settings may still not setup correctly. Check if generate local folder for dependencys is enabled or something like that (not on a pc currently)
And, how am i supposed to update it?
I updated unity editor, it asked if i want to update SDK, and after that, im, getting same error
It's not asking for unity editor update, it's asking for android gradle update
how am i supposed to update it?
ok ill try to read docs ig
Hello everyone I try to upload my aab for first time and i had this problem
I have "keystore" that I make from Unity but I chose Google Play Market Sign App and i have "der" file but now i don't understand what to do with it...
Can anyone help me?
Hey all, just a quick question surrounding debugging android builds from visual studio. I've created a development built, enabled script debugging and when I hit the launch unity debugger from VS I can see my device listed. However, it never actually connects. I get the little cursor loading wheel for a few seconds and then nothing happens
I get no useful output from logcat, I'm about to try setting up another device to see if the issue persists, but if anyone has any thoughts or ideas that would be great
Hi, I successfully published my game on App Store but Google banned my developer account with a reason my game contains Malware what should I do?
Not sure what you want us to do. Ask Google for clarification? Maybe look at your game and figure out what would be considered Malware (assuming you didn't intentionally do something)
I ask here, because maybe there is someone in the channel who already faced similar problem. My app is very clear that the problem there cannot be any malware inside.
Google seems to think so, so you need to convince them otherwise?
i cant make it go android
trying to upload a avi on vrc
and it for some reason i can add modules
anyone know how to get a more detailed error code on android builds?
i wanna see what line of code is failing if possible
game over I try to convince them and got the answer (it is funny coz they review my app 6 days but this answer is immediately) - After reviewing your appeal, we have confirmed our initial decision and will not be able to reinstate your developer account.
Well, then you will need to figure out why they thought so, and then avoid it next time.
I have no next time it is over I cannot create new account and my current account is banned, and they give no explanation
Math game for childrens
Did you collect data in any way?
DeviceID facebook in game ID and saved Player game currency thats all
None of that is COPPA compliant I'd imagine. But tracking the DeviceID sure sounds like malware on paper, to me. There's no reason you need that?
The reason was to find the user in database if user need support but looks like it was bad idea
Typically, especially with a kids game, that would be done with an account owned by the parent, yeah.
Well, I can try to go Amazon or Samsung stores
I'm positive device ID is considered private/ personal data, which requires you to declare it when you're filling out the data privacy forms. I'm also pretty sure you can't collect this sort of data for an app aimed at children
Use the Android Logcat package - install via the package manager. Connect it to your device when running your game, it'll spit out loads of info, hopefully something useful
Have IOS trouble don't work scroll properly or event trigger (Drop, OnBeginDrag) not sure. But it works on Android and WebGl
Seems like event triggers just won't work
are you using dynamics?
Got it, doesn't reveal to me what is triggering the error 
What you mean? I use EventTriggers for snap content such as Drop and BeginDrag. And not use new input system
If turn new input and upgrade event system could it help?
All I'm given. I want more info!
I was just thinking I've had issues with iOS vs android and webgl with the AOT compiler. It doesn't support C# dynamic
Hello, I'm having some build issues that are making me tear my hair out.
Google tells me that I have to update to at least SDK 34. Ok fine, I do that.
When I do that, Unity tells me that I need at least Gradle 8.0. Ok fine, I point the external tools at a local copy of Gradle 8.0.2. No problem.
When I did that, Gradle tells me that I need at least JDK 17. I pointed Unity's JDK at a local copy of JDK 17. Problem! Unity refuses to use anything other than its pre-installed version of JDK 11.0.14.1+1.
Why am I in this Catch-22? And can anyone help me out with it?
I think you'd have to redo the process of installing the JDK through Unity instead of using a local copy. They have extra stuff in their JDK that normal one doesn't include
I tried doing the same thing of pointing Unity's JDK to the one installed through android studio and vice versa and it failed for me
I don't think that'll fix it since it forces JDK 11. Right now I've upgraded the project to Unity 6 because it comes with JDK 17 and am building. That might just be the fix, unfortunately...
I was able to export the project and build it through Android Studio, but the process was... a lot.
Oh man, yeah I haven't messed with v6 at all yet so I don't know the changes
I had to delete and renew all of my gradle template files, but updating to unity 6 worked.
Hi everyone, hoping everyone having a good time, i wanted to ask a few questions
-which unity 3d editor version is the best to use atm
- should we use api 34 or 35 as target api currently?
- and according to the api , which versions of admob sdk, applovin sdk, firebase sdk, etc should we use , im kinda confused cuz i have to upgrade a projects api from 33 to 34 but having some issues
Use the latest 2022LTS, that has the API required to publish apps
Use the latest target API with that (in player settings just use latest as the option)
Not sure about the sdks, haven't worked with them
I have a slight problem because I added the Firebase plugin to Unity as I want to set up push notifications, and now Unity won't generate an AAB for Google, showing that the Gradle version is too low. š¦
Do you know any solution for this?
Urgently, I need help.
My webgl game works on sucesfully on android and browsers from pc.
Also works on older iOs,
but iphone 15 doesnot work and Shows black screen overlay. Only renders Canvas.
Im curious if i should care for app-ads.txt? Maintaining it seems to be extra work, and i dont know if its worth it?
Hey! I'm trying to build for android in Unity 6.0.10f and i keep getting " java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity"
I tried using a custom AndroidManifest.xml and setting the theme, but it won't take. Anyone know why? I don't know where the styles.xml is
Agreed with the above, 2022 LTS is stable. For target API, you want 34+ for Google play, and 32 exactly for Meta. The higher you can go for Google play the longer that version can stay in the store
Hi, devs! We're trying to implement Mobile Notifications on our Android & iOS game. For Android, we've seen an Android Notification Center, which seems to be the only way to customize the icons of the notifications. We are using AndroidNotificationCenter.SendNotification function but it doesn't work (nothing executed). However, Android Notification Center is initialized because we are also receiving ID from the scheduled notification (not sent). Another way is NotificationCenter.ScheduleNotification, and executing this the notification is received, but without the icon customization. What are we doing wrong? This is frustrating!! 
Thanks in advance!
Hi! Does anyone get these crashes on Android after upgrade to API level 34 ?
Did you grant notification permission on Android? Since Android 13, it is required to ask user permission manually in script
Hi @urban moon
I have the same problem with IAP 4.12.2 and Unity 2023.2.20f1
I tried what you say here and deleted the .aar and .jar files inside Plugins/Android folder, I also "Force Resolve" and "Deleted Resolved Libraries" with Android Resolver
And now I have this error:
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':unityLibrary:configureCMakeRelWithDebInfo[arm64-v8a]'.
[CXX1212] D:\Academia de PLC\2023\PLCSimulator\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\cpp\CMakeLists.txt release|arm64-v8a : User is using a static STL but library requires a shared STL [//games-frame-pacing/swappy]
- Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
- Get more help at https://help.gradle.org
BUILD FAILED in 3s
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
How do I fix this? Thanks š
Wait, I fix it using Stefano steps
Now I have no errors during build, but I am seeing errors on Android when running the application.
try Force Resolve and build again
Ty for the response
I did but if I dont "Delete Resolved Libraries" then this error appears:
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class com.unity3d.ads.BuildConfig found in modules jetified-UnityAds-runtime (:UnityAds:) and jetified-unity-ads-4.12.1-runtime (com.unity3d.ads:unity-ads:4.12.1)
Duplicate class com.unity3d.ads.IUnityAdsInitializationListener found in modules jetified-UnityAds-runtime (:UnityAds:) and jetified-unity-ads-4.12.1-runtime (com.unity3d.ads:unity-ads:4.12.1)
Duplicate class com.unity3d.ads.IUnityAdsLoadListener found in modules jetified-UnityAds-runtime (:UnityAds:) and jetified-unity-ads-4.12.1-runtime (com.unity3d.ads:unity-ads:4.12.1)
just realized that 'Delete Resolved Libraries' undoes the changes made by 'Force Resolve' š
Sorry
I think I got it!
In mainTemplate.gradle, I just deleted the dependencies that were causing the problem.
In my case, these two.
I just downloaded unity Remote and am testing my VERY basic game with almost no code and just one asset, yet it's still super laggy. Why would this be?
Hey all, I am looking for a solution for grass on mesh terrain for mobile devices. I am also targeting low-end devices.
because it only streams your editor screen to your device
build and run on your device instead
Is anyone able to successfully build and run for android after unity 6.0.10f?
It's been out for ~10 days, if it wasn't possible to do then there'd be a lot of people shouting about it.
Interesting. I get an instant crash saying my theme doesnt derive from Theme.Compat. I thought it might be related to the unity version as its a brand new project
the newness of a project doesn't matter, it's what is in the project that does
Googling the error will result in a fix.. I've had that error/ a similar one
anyone?
Hey everyone, am I the only one that can't seem to be able to build an apk ? I have some gradle related errors, even though my project is empty (using 2022.3.21)
Here is the error Task :unityLibrary:compileReleaseJavaWithJavac FAILED
Do you mind sending me the full error message??
I updated unity editor, it asked if i
I haven't find the way to ask for permission on Android Notification Center, but I did on the another NotificationCenter. The problem is that the last one does not allow to customize notification icons.
naturally! its:
Hello people!
I have some experience with unity and I have few question :
How is close is mobile developpement to "normal" developpement ? Is it just the input/control part that changes ?
Can I build for android and IOS with the same project ? I know it used to be possible, but the forums online with that question are a bit old, so I'd like a confirmation please
Can I build for android and IOS with the same project ?
Yes, nothing has changed, don't know why it ever would.
@craggy marsh āļø
You'll probably need some android specific bits and some iOS specific bits - when interacting with things outside of the app, so learn about platform code defines
thanks!
is there any type of way to regain a keystore password
Error [AppLovin MAX] Failed to add AppLovin Quality Service plugin to root gradle file.
using unity editor 2021.3.30f1 - works for api33 but not 34
im trying to change my apk build from api 33 to api34 but im recieving gradle issues, and i tried with unity 2022.3.38f1, does anyone know how to make this work
i want to implement Firebase+googleadmob+applovin with api34
can someone help me solve this problem i have tried videos i have tried to reinstall i even downloaded unity into another pc and tried a differenet project the problem still happens
Did you install android and both submodules in the hub?
Put android sdk at latest in player settings
Use installed with unity in preferences - external tools
Yeah they all okay still that didn't work š¢
seems like outdated java sdk, check your openjdk path to make sure it's the right path (unity install different openjdk for every unity version)
Anyone got any ideas on the theme error for android?
Hello guys. I try to develop mobile game but, when i change to android, Unity give me this message: JAVA_HOME environment references a directory (C:\Program Files\Unity\Hub\Editor\2021.3.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK) that does not contain java which is required to process Android libraries.
Anybody known the solution? thanks
im working on a project on unity i want to put it on mobile - first person horror game. i've run into some performance issues. is it a good idea to hire a shader programmer to make the specific shaders wich would be highly optimized for urp project for mobile or do i settle with default urp shaders like lit and simple lit?
does is lag in editor, build, or both
What is this kind of popup called and how do I add one of these to my own game? (It shows up on the bottom center of the screen on android when an app sends it. It seems to be a pretty standard android thing, not an in-app thing)
Aha! It's called a toast notification
build lags on mobile
How show a leaderboard in my project?
would you like your leaderboard synced online or offline? this also isnt a mobile thing
fun fact about android: the default max FPS is 30
set Application.targetFrameRate
Its a leaderboard of cloud Unity a take de valuƩ in a var but i dont know how show
The documentation will tell you.
this new thing with google needing 20 people to opt in to your closed test is so cringe.
I dont see in documentation
official full step by step tutorial
to focus on the part you were looking for, how to take a variable from the leaderboards, an example is https://services.docs.unity.com/leaderboards/#tag/Leaderboards/operation/getLeaderboardScoresByPlayerIds
Need convert JSON and save in a list? @vague violet
up to you?
if you're relying on leaderboards for data storing then this is not the way to go
I dont need storing, only show in a panel
yea its up to you
i dont use unity cloud so idk how sorting the leaderboardw would work if you stored the score as json\
You use firebase or other?
mainly playfab and making my own backend in python flask
making your own backend in flask is a great learning experience, though not very secure
not sure if it works but one way to get around this is by email salting. uldynia@gmail.com and uldynia+1@gmail.com are the same, though many systems will think they're different.
you can invite yourself 20 times š
can I get in trouble for that tho?
wag their finger at me š¦
ive also been publishing to the play store today
my old game got removed because my old website died so there was no privacy policy link
even though the "privacy policy" is a 5kb document "no data collected"
dang. do you gotta get 20 downloads too?
around there yea
i was just using it to test google play store publication
i did alpha release of a bigger game today, waiting for it to get approved
oh as in 20 referrals? no
i did an open test so i didnt see it
oh it doesn't let me do an open test until I have "access to publication" which needs 20 testers opt-in
I think it might be because it's my first publication?
idk if it was the case for me
yeah it's a new thing
its been a while
it is very annoying. They don't have to download it but they have to opt in through the website and I have to put there emails on the tester's list
Does anyone want to create a solid mobile game???
I prefer mine wobbly and with a tacky substance to the surface.
iirc, they also have to keep it installed for the duration too š
https://support.google.com/googleplay/android-developer/answer/14151465
Pretty sure you can also bypass that with a business account though, we haven't had to worry about it.
pain
prefer mine fluid tbh
i marked my acc as business/organisation even though im an individual publisher
it's google's sad attempt on 'curating' new games
apple does this using their own QA team, google want to follow but seems like they are too cheap to hire their own QA team, so they just throw it to the dev instead
yeah I'm trying to use reddit to get people to test lol. I'm at 17/20 atm
fr so annoying
Hey! I have a question :
I'm currently learning to developp for mobile, so I'm watching many tutorials, the usual. The guy I'm currently watching always start his tutorial by reminding I should start by changing the build environnement to android, because he test his games on android.
Can someone confirm that if my games works for android, I just have to change the environnement to iOS and I'll be able to build for iphone without issues ?
no, that is not the case
ah š are you implying that if I want to make a game for ios and android, I'll have to make 2 projects ?
No, I did not imply that whatsoever
Nor is that what you asked, you're leaping to conclusions.
Could you clarify how stuff happen to build on android and iOS ? Do I just change the build environnement ?
Do I just change the build environnement ?
yes
Ok so I did just have to change the environnement to iOS š
You use the same project for multiple platforms. However not everything works on every platform. You may have an old plugin that doesn't support new android or ios, or other issues. ARFoundation is a great example of something built into Unity that intentionally doesn't support the same features on both devices
Typically, I recommend (when using a new engine) to do the following:
- create a basic project
- add the plugins / assets you are expecting to use
- setup some basic scenes
- switch platforms and build test for android
- switch platforms and build test for apple
That will at least get you familiar with the entire build pipeline and let you check the assets and shaders and plugins that you want to use, as well as letting you document your build process.
Later, once you have a better idea of what is stable etc, you won't need to really do that. But by then you'll have reusable templates
Thank you! That's much more clear š I'll keep the advices in mind!
The reason for for the early test is to let you change any plugins that aren't working before getting too far in. It's rarish, like 9 out of 10 will be fine. But it'll be really hard for you early on to redo a shader or rewrite a plugin
your question was
and I'll be able to build for iphone without issues ?
And that will not be the case, you will probably run into issues building iOS because things differ.
Yeah I got that part, it's similar to others good practice from other environnement š
my question was more about getting clarification than a yes/no answer ^^"
Hey guys, how do you build (virtual machine) and test the IOS version of your game without having un iphone ?
I don't mean publishing, really just testing
switch target sdk in build settings from device sdk to simulator sdk
oh that still exist, nice !
And if someone want to test it on an iphone, do I have to have a dev apple account, even if I don't publish on the store ?
I mean on Android I can simply send the apk.
Yes, you do need a dev account for other people to test on iOS
what about side loading it with something like sideloadly?
Apple has introduced a new feature in Xcode 7 that allows you to deploy and run any number of apps on any of your devices, simply by logging in with your Apple ID. You will no longer need a paid Program membership to deploy apps on your own device (and you certainly no longer have to jailbreak your device if you're not comfortable doing so).
I take that back, for others to test the app, yes you need a Dev account.
ok ok, good to know, thanks š
I am slowly working down that road myself. Trying to make a fairly simple app for ios/android. Haven't messed with unity in years though so it is a bit of a learning curve trying to re-learn some of this
im trying to change my apk build from api 33 to api34 but im recieving gradle issues, does anyone know how to make this work
i want to implement Firebase+googleadmob+applovin with api34
can anyone give me list of the versions ill need for each of these versions please
so, after building to iOS, how do i sideload to my iphone? My result was a bunch of files. I'm on windows 11 if that matters
After building in iOS on a PC, you need a Mac. Copy the files over, open in XCode, configure your account signing and other project settings, build and then you can run it on your plugged in tablet or phone. There is supposedly a way to build on a remove server, but I've frequently seen folks having issues with it.
So, no way for free on Windows 11?
Most iOS devs seem to just do all the development on the Mac as that is easier and skips a few steps.
Not that I am aware of, no.
Hello
please tell me, Iām setting up Google Cloud, here in the Concent screen you can fill this out
Do I have to fill this out or can I get rejected?
what is meant by
app logo (you can just take the logo from the console)?
application home page - I don't know what it is, when 0 more builds are uploaded
application terms of servse (is this the same terms-of-use doc)?
and in general, this OAuth Дoncent screen, what kind of beast is this? when is it shown to the user? never seen before
Hi, devs! Unity 2022.3.14 isn't building for Android 34 or Android 35. Any advice in here?
Hi, I'm new to unity development and i tried to create a simple mobile game to know basic mechanics but I don't know how to adapt the game resolution to all phone devices and fix the low frame rate bug (which occurs only when i play the game on a phone, on the unity editor frame rate is ok).
Hey everyone, i'm have issue to build for android. I have error with my gradle. I have Firebase, Google SignIn and Facebook Auth Atm. I'm looking for someone who understand gradle or who is able to give me some direction to looking forward. Thanks a lot
- Unity should have scalable resolutions by default. For UI use the canvas scaler (plenty of guides online)
- For performance, check the profiler while running the game (debug build, autoconnect profiler)
2.1 When using URP disable SSAO for starters, aka use the low quality tier to start
Any reason not to update to the latest LTS?
That's what I finally did, and I was able to build for Android 34. Not 35 for now...
35 isn't required anywhere afaik. Once it is it should be in a Unity update
Yeah I think so!
Hello
I think it's a very common problem when connecting to Google Play Games Services
*** [Play Games Plugin 0.11.01] 07.26.24 8:17:11 +03:00 ERROR: Returning an error code.
System.Action:Invoke()
GooglePlayGames.OurUtils.PlayGamesHelperObject:Update()
I tried to insert both the SHA from my keystore and the sha generated by Google (there are two of them, one is a regular one and the other is an upload) into the OAuth Android client, but it didn't help, it still pops up
should I create 3 different Android clients with different sha? Or could the problem be something else?
- The canvas is ok, the problem is the resolution of camera on GameObjects (already tried with 16:9 and 18:9 resolution, but it results stretched on phone).
- I'm already doing that.
2.1 The game i created is 2D and doesn't have a SSAO setting.
-
Which Unity version? And do you modify the scale of the objects?
With the default Unity templates I never saw stretching. Maybe check the resolution settings in Player settings -
And what does the profiler say?
1.1 Unity 2022.3
1.2 Yes
2. On PC (Editor) varies from 60 to 250 FPS and on mobile varies from 15 to 60 FPS.
Maybe there is another bugfix if it's a bug
If you manually adjust the scale, it's probably a code issue there
For the performance profile it and see
Maybe someone has encountered this and knows how to solve the problem?
you'll need to provide more detail than that. Hopefully there's more info in the android logs
What about with an iPad or iPhone instead of a Mac?
cannot

welcome to apple ecosystem
... well you can't build Android apps on phones/ tablets either..
How to fix this?((
did you whitelist accounts for testing? that's an easy step to miss in the oauth setup
Can someone please help me, I've got this code and the first time it loads an ad, everything's fine, but the second time, RewardedVideoOnAdUnavailable() and void RewardedVideoOnAdAvailable() are never called. Maybe it's the default behaviour since it's not on the playstore yet?
Guys, I have been trying to add Google play sign in(sdk v1, 10.14) to my mobile game. I have done everything, I have correctly setup my app in the play console. Added the correct credentials. Uploaded the .aab on the play console. Downloaded it from the play store and it is showing it needs Web Client ID to do sign In. But if I remember correctly that's for Unity Authentication, right? But I am not using the UGS and unity Authentication. I am just using GPGS, but this error is all I'm getting. Any help please?
Yeah we got that same error with their relatively latest admob :D. My goals just to yank their ads and replace it with my own later this week. Then no more ad integration issues.
hi guys is there anyway to get error log from ios device?
They should be appear on xcode console log iirc
When publishing on playstore, is it required to have an llc or is it okay to publish as a sole prop
Anyone recently have issues using Google's Play Asset Delivery stuff when trying to build with Target API set to 34?
Keep getting messages via logcat that the bundles cant be found so I get stuck on my loading screen and nothing happens on device
Hello everyone, if you are launching your game on Android, how are you finding 20 Beta Testers?
Is there a group for devs, where we can beta test each other's games and help overcome this hurdle?
You can do either but they will require documentation (even a solo prop needs to be registered)
my ad works fine once when i test the game but the second time it doesnt get past the InitializeAds function when i call to initialize an ad after you close ad window. i also tried calling the function on my play again button but has the same results cs void OnDestroy() { // Clean up the button listeners: _showAdButton.onClick.RemoveAllListeners(); adsInitializer.InitializeAds(); }
Hey!
Can someone help me?
I tried making an android game but on build it just gives me gradle failed
it also told you to look in the console for errors, so you should do that next
It's a 100 line error
Should I sent it?
you want me to google stuff for you? No, try solving it yourself and posting the error
Game works everywhere, except on IOS - it freezes after the unity logo, The weird thing is - everything seems to load in the background, the push notifications, Ironsource and etc.
any ideas how to debug this?
logs are basically empty, it all stops after ironsource initialization
read the console in XCode while it's running
there's nothing there, it's normal logs and then they just stop
after ironsource is initialisd
Gonna have to be more manual then to track down where it's happening. First thing to do is disable ironsource and see what happens
yeah, guess so. Thanks
i am experiencing an error saying Gradle build failed, I googled how to fix it, I watched youtube videos, and i havent tried this yet, so i thought it was worth a shot. I literally googled gradle build failed unity error.
lol, there are billions (slight exaggeration) of reasons why you'd get a gradle build error.. like I said in the other channel, FIND the actual error in the console.. and google that line
googling "gradle build unity error" will get you no where
Not the entire error.. just the bit that specifically tells you what is wrong. Which will require you to read it and parse it for the correct bit
2 weeks of being stuck, and you sorted it in an hour by
- reading the error properly
- googling the correct thing
yes
any help please? so i am building a vr project and recently changed laptop now i can't build project and keep getting gradle errors in all existing projects that i used to build.
Bro lemme know how you solve it, I've stick for a week on my work because of this annoying error
How?
if you think the error is "a gradle error", you haven't even begun debugging it
the last guy was apparently stuck on that for two weeks too because he couldn't be bothered to read that text box, or look at what the errors were
š¤¦š¾I've read and don't understand what they are saying, googled the errors and even follow some solutions to these same errors people had but still, I honestly wouldn't ask her if I hadn't done all that because I always get cheeky responses when I ask for help in this server
what error did you google?
"Android resource linking failed AAPT2 error: failed to load include path Android.jar"
"unity android gradle build failed execution failed for task ':launcher' Android resource linking failed
do you have any spaces in your path? What platform are you building on? Have you successfully built this exact config before or were there changes since then? What Unity version? Can you build a stripped-down basic project?
Spaces in my path?
I'm building for Quest 2
Yes I've built it before.
I haven't made any changes, I only updated the firebase database.
2021.3.30f1
No I can't build a stripped down basic project
the path to your Unity project, does it have any spaces in it?
Oh yes
try a stripped down project with a path containing no spaces and see if that builds
Without the privacy policy play store removes them anyways. You should have changed the privacy policy with new website
New editor version, blank project built successfully šš¾, how does that help me find the issue(sorry of my questions seem dumb I'm a beginner)
I'm having some issues that only seem to appear when testing on mobile, and not in the editor. I was hoping anything that worked in the editor would work on mobile, since the game is not performance intensive. What are the potential causes of differences of this sort?
it lets you rule out config/sdk/ndk issues which can be complicated to fix. Did you upgrade your project to the new editor version (better use source control) and try again? The next steps are to start ripping pieces out (or adding dependencies to the blank project) until you figure out which thing is breaking the build
(in my particular case it seems related to Dotween.Sequence.AppendInterval(), i.e. ui elements waiting for specific periods of time with the idea of syncing with other effects)
you'll have to provide more info. The hardware and capabilities are totally different than a dev machine so your hope will lead to frustration. Test early and often
I guess you should never use wait-for-given-time controls then, and always use events?
no, sure you can. There isn't anything that stands out about your case in particular, which is why we need more info
maybe I need to read the pinned thing about mobile performance
So which one do I do? Build the project in the new upgraded editor version? Or add things to the clean project?
unless you've written your code in some weird way that fails at 30 fps, that's probably not your problem
whichever of those is easier
yeah I was just asking to see if there were common theoretical fail points for discrepencies between editor and mobile, since there appears to be several phone-unique behaviours with my game and I'm not quite sure where to start with that besides just arbitrarily changing the implementation and seeing if it works
How do I fix this?
See the Console for details, and then Google solutions to the error(s) there
already did it
Don't you think that maybe posting what the errors are would be helpful?
well the top one in this channel is not understanding that mobile-only sdks only run on mobile, ex: "the ads work in the editor"-type problems. Your code by itself doesn't raise any flags, unless it's somehow frame rate sensitive
are you trying to build with api 32? Why?
to be honest it's my first time using unity, so i'm kinda lost, so I don't know how to answer your question
set target api level to 34 and minimum to 24, then rebuild. Unity might prompt you to download it
where do I set this?
Player Settings > Android > Identification
there is a shortcut to it from the build settings, but it's the Player option in the right window
found it
it worked! thanks!
Does anyone know if an android build on a chromebook with "Chrome OS Input Emulation" disabled will Input.GetJoystickNames() report the keyboard as a connected input device?
EDIT: Tested with the chromebook emulator and yes it looks like a device named "qwerty2" gets connected, however annoyingly this seems to be an emulator specific device.. https://android.googlesource.com/device/generic/goldfish/+/refs/tags/android-platform-12.1.0_r17/input/qwerty2.idc
I added a keystore and thats literally it
I was asked to ask in this channel instead of UITK. Anyone know if there is any setting that would cause the safe zone border? I've done the same setup in a clean project as in Castle Crashers sample, and the sample has this border (not the safe zone script).
Hi,
I'm trying to figure out how to subclass the AppDelegate for an iOS unity project, but running into a dead end. Does anyone know if there's some documentation or similar around this?
hi can anyone help me pls?
https://discussions.unity.com/t/gradle-build-fail-after-importing-google-admob-into-project/1495482
some snippets in this thread were helpful https://discussions.unity.com/t/unity-appcontroller-subclassing/510386/47 otherwise might as well ask here
try again with target api 34
have you check the "render outside safe area setting"?
That's probably it, will check when I have time. Big thanks š
what is this
Could not resolve all files for configuration ':unityLibrary:androidJdkImage'. See the Console for details.
it updated SDK
How do you know, you cant build?
Please dont mention me just for attention. I will roam around channels now and then, like everyone else does. And maybe write down your problem instead of waiting for me or anyone to ask what the problem is.
Ahh you got the easy one
Change your API levels
It will ask you to update sdk before building
I think just don't use the lowest one and instead of using "highest" option select the actuall highest
@unreal fox
lucky you
My problem everyone ignores š¤£
Anyway if what i said doesn't work just make a project backup and reinstall sdk unity whatever
heres my error, i tryed hell lot of things, nothing worked out for me, begging for help
for context im trying to build for android and some unity library jdkimage cant be resolved. for windows obviosly it builds with no problems.
same thing happens in both newer and older version, even when the whole project is just one scene with TMP
Is your username actually "?ura"? You might have a nonstandard char in there that's confusing it
no way
if thats the problem
im gonna break my screen
i do have a wierd ass character in there
My god i think it was the Ä actually
Cause I made a new windows user and it worked
Thank you ā¤ļø
(im gonna break the screen once I finish the project)
It's a nice 160hz 1440p ultrawide but fuck it
How does the "Render Over Native UI" project setting work? I have it enabled and when I build to android, I can still see the os buttons on the bottom when I swipe up. I'm wanting to disable the swipe up feature completely during gameplay in my app
I've tried all the solutions, of course
But the problem was with my version of Unity
I installed another version and it worked successfully
Gg
Hello guys, i struggle with building a game for iOS since i moved from 2021.3.15f1 to 2022.3.34f1. To be more precise it finishes build but when it comes to archive stage (xcode) it fails with error
ld: library 'x' not found
where x looks like my bundle identificator (mygame.dev.testflight)
I wasted 2 weeks trying different things and reading forums, no result
Sorry if I ask, but recently I was trying to publish a game on the app store, however when I try to build it, it displays these 2 errors, does anyone have any suggestions on how I can solve these without having to use an API level lower than 33?
Show the full error message
These 2 are the messages for the Gradle build
And this is the message for the "tool java option"
I can't read those screenshots. Use a paste site: !code š
š Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
š Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
Okay
Just give me a few minutes
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FAILURE: Build failed with an exception.
-
Where:
Settings file 'C:\Users\klaud\OneDrive\Desktop\dad francesco\Side-To-Side\Library\Bee\Android\Prj\IL2CPP\Gradle\settings.gradle' line: 14 -
What went wrong:
A problem occurred evaluating settings 'Gradle'.
Could not find method dependencyResolutionManagement() for arguments [settings_4zuu4ky3256lgd3gcpnnopndy$_run_closure1@63a21259] on settings 'Gradle' of type org.gradle.initialization.DefaultSettings.
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 4s
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
If you google the error message there are a lot of things to try: https://www.google.com/search?q=unity+"could+not+find+method+dependencyresolutionmanagement" You'll probably have to reinstall Gradle: https://stackoverflow.com/a/77865544
Also not a good idea to have the project in OneDrive, it can cause other issues
Thank you so much
Anyone know how t use the "Render Over Native UI" project setting? I have it enabled and when I build to android, I can still see the os buttons on the bottom when I swipe up. I'm wanting to disable the swipe up feature completely during gameplay in my app
You can't disable native navigation
Hello, I'm trying to add an ad integration to my project, but when I downloaded the Ads Mediation package from Package manager, it showed me an Error which said that Unity is unable to find jar in the system path, however, I have it chosen in my external tools. Unchecking the boxes and choosing default paths for jdk, sdk etc. seems to be doing nothing. I also have an error in the console about not finding a jar for Google Play services. Does anyone know what can be the matter here?
Anyone have idea why the Standard shaders have issues on Mobile devices? We see reflective rendering for normal diffuse textures
I see something like this. Any idea?
Hello
how can I Build game on IOS?
I Build the game and I got all this:
You'll need to open the project in XCode on a Mac, configure the project correctly for signing and other specific settings for your project. Then build and run on a device to debug. For larger testing and distribution there are tools like Testflight you can investigate.
ok I dont have a Mac
Then there is no practical path for successful iOS development for you. I'd focus instead on PC/Android.
I've seen workflows using Cloud services for building and test, but the discussions always bring up a lot of issues and limitations. It doesn't appear to be a long term path for success.
the game is for Android
but my friend has IOS he need to try it
The sad truth is Mobile development isn't well-suited for indies and hobbiests.
I am facing this problem when I am trying to build this project after adding Admob
See the console for details
Task :launcher:checkReleaseAarMetadata FAILED
Wrong details. Show the one with the error message
My scroll is suck when I use short and fast swipes
It's just defaul scroll view from unity. Somebody know how to fix it?
Hmm then what does Render over Native UI do? Seems it would render over the native UI, including the nav. But it doesnt do anything at all.
I think it's for when you have the Unity player embedded inside another app so that it shows the other app below the player. But in general no mobile app can disable the native navigation, Unity or not. That would make it possible to lock the user in the app without any way to quit it which the OS doesn't want you to do
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33
This Android Gradle plugin (7.1.2) was tested up to compileSdk = 32
This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties
it's have been days I am about to give up
That's a warning, not an error. If you can't find the error message then post the entire output to a paste site š !code
š Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
š Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
Task :launcher:checkReleaseAarMetadata FAILED
what about this?
!code
š Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
š Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
You're supposed to read the bot message
lol
and that's still the wrong log
Yes, that one
Dependency 'androidx.webkit:webkit:1.11.0-alpha02' requires 'compileSdkVersion' to be set to 34 or higher.
That's the error
So how to fix it š
The same way as all other errors. You type the error message to Google search
But the first thing I'd do is update the editor. There have been 30+ patch versions since 2022.3.6f1
Okay I will try and come back again
wait really?
Yup that fix every thing
bro thanks alot
Now I'm dealing with a new problem but I'm very happy any way
hey guys i need help with building an android project, im getting a gradle build fail after enabling custom main gradle template, but when i dont enable it i get an error the play asset delivery is version 2.0.2 which is older than needed 2.1.0 and it tells me to change it in the main gradle template so i have to enable the custom one to change it
what should i do ?
debug the build error
what do you mean by that
when it says the build failed, look at the error and then fix it
is this on a barebones project or a full project with a lot of moving parts? I would suggest making a simple test project and trying to replicate the error there and then you can fix it somewhere more simple
i get some namespace errors that i dont understand, i can send them here if you guys know about them
sure
without the custom gradle stuff i get this error
and i get this
and i still dont understand the base module thing
i made the changes that this says to do
now im waiting for the build to end in fail so i can send the rest of the errors
i get this pop up
the first one i think can be solved by changing some stuff in the maintemplate.gradle
but the others i dont know
and this happens even in an otherwise blank project?
Im not sure, i havent checked with a blank project. But the gradle build errors started coming after i changed the unity editor version from 2022 to 2023 so i can use play asset delivery with addressables
yeah when I was hitting gradle problems with my app I just ended up starting over and moving the assets in after making sure all the backend stuff worked
In profiling my game on Android, I'm noticing the SendMouseEvents.DoSendMouseEvents() Invoke call is using up about 8% of the available frame time when Timescale is set to 0 and nothing is taking place. This seems quite high for a platform that isn't using mice. I've confirmed I'm only checking Input.Touch in my handling update loop. Is this to be expected? It is confusing why this method is doing a GetRayIntersectionAll every frame.
where can i find this version of ndk. i looked everywhere
can someone please share the ndk file?
Hi there! Iām porting an app to Android for a museum visit thing. Itās supposed to run locally so no need to upload it in Google Play. The application however is a bit of an edge case because there are 8 Go of data in the streaming assets folder, split between addressables for localization, images and films. They all need to be accessed locally. I had to split the binary files in order to be able to build. So far so good.
Upon running the application if I do a normal release build I can open the application on Android without the Streaming Assets loaded as expected. I donāt seem to be able to manage to find the right path to use to actually access the files, neither with Application.streamingAssetsPath, neither with Application.persisitentDataPath; I am using UnityWebRequest to load the files. It works in the editor.
Development build fail to boot on the tablet. This is quite annoying because Iād like to see what the heck is happening in this app. The whole documentation for Android is quite frail and honestly this project also is a shit edge case... Is there something here that I am missing about .obb and files locations in Android? Iāve been struggling with this for 3 days now and have no clue what to do to.
what path are you using with Application.streamingAssetsPath? #1 problem there is not understanding that it's compressed into a file. For the tablet, what does logcat say?
Iām having this coming up at the moment of the crash of the dev build
2024/08/11 11:50:17.745 8340 8340 Error AndroidRuntime Process: com.<company>.<nom_app>, PID: 8340
2024/08/11 11:50:17.745 8340 8340 Error AndroidRuntime java.lang.RuntimeException: Unable to start activity ComponentInfo{com.<company>.<nom_app>/com.unity3d.player.UnityPlayerActivity}: java.lang.SecurityException: com.<company>.<nom_app>: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
2024/08/11 11:50:17.745 8340 8340 Error AndroidRuntime Caused by: java.lang.SecurityException: com.<company>.<nom_app>: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
good, so nothing to do with the obb. What's in your merged android manifest? that will tell you which receiver it's talking about
iām not too sure where to find it. there isnāt anything in the Temp
however thatās the manifest from the android plugin
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" xmlns:tools="http://schemas.android.com/tools"> <application> <activity android:name="com.unity3d.player.UnityPlayerActivity" android:theme="@style/UnityThemeSelector"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <meta-data android:name="unityplayer.UnityActivity" android:value="true" /> </activity> </application> </manifest>
easiest thing to do is export to android studio and look at it there, but with some cli tools you could also extract it out of the built dev apk. That's assuming you can't find the receiver in question in a third party asset/plugin you're using already. I find it easier to look at the final result and then work backwards since so many do some postprocessing on it
right. gosh. i hoped i could avoid android studio so far
but the strange thing is that the normal builds do boot
then in the logcat it complains itās not finding the requested files with my debug log messages (which is okay at least i have somewhere to start)
i find it super strange itās only when i try a dev build that this issue arises
what requested files? Don't you have two separate problems here? I thought it was tablets don't boot, non-tablet boots but streaming assets not found
ok so iāll recap, there are indeed several problems at once
- application boots on tablet on release build, but canāt find the streaming assets folder and data doesnāt load. non streamed assets data does load as expected.
- application runs perfectly in the editor
- development build crashes when opening on the tablet and causes the aforementioned error
- trying "build and run" with a local copy of the install doesnāt work, the files stop copying after a while and the data is incomplete (sorry i hadnāt mentioned this point before)
okay let's start with the first one. What is the path you're using UnityWebRequest with?
So I tried with both Application.streamingAssetsPaths and Application.persistentDataPath
in the current version in the debug itās not finding the persistentDataPath even though I manually copied the files in, I think itās the root of the directory that is messed up
2024/08/11 12:06:05.924 13361 13390 Warn Unity No data found at /storage/emulated/0/Android/data/<com.company.app>/files/Backgrounds/fr_val_01_00.png
from /Android/ the path is correct, it should be returning something
again, streaming assets are actually packed into the apk/bundle itself and it's not a loose file. So hopefully your path starts with jar:file:// right?
didnāt Application take care of adding jar:file:// by itself?
according to the compilation context?
but Iām using a split binary because a single APK file would be way too big, from my understanding it is not to be packed in the bundle itself?
looks like streaming assets are split into the apk expansion files, so you might just be targeting the wrong file. But is this going to work? It seems like you're limited to 2x 2GB expansions? If it's not going on the play store, can you get away with a single apk?
thatās what I am wondering.
Hereās the path generated for the streaming assets and i have no idea how this is supposed to point to the generated .obb
2024/08/11 12:54:45.453 18844 18865 Warn Unity No data found at jar:file:///data/app/~~wwhOrY4UOgmVDPRbUonDBA==/<bundlename>-Y_Hppbqy3qpxbQooJEJw3g==/base.apk!/assets/Backgrounds/fr_val_01_00.png using asynchronous method
this is why i had more faith in a persistent data path where i can just manually copy the assets in on the targeted device, the client only wants 2 or 4 tablets, itās feasible to manually install them all
that's probably a better way to go than a split binary, in my opinion. Android stores the expansions in a special obb dir so the path looks wrong to me. You'd have to look at https://developer.android.com/reference/android/content/Context#getObbDir()
thanks a lot for the link! iāve been sweeping through the logcat and there is an error when i load the .obb in the correct place with the correct bundle name Error Unity Unknown compression method (file zip crc32 : 73736100) When the .obb file is wrongly named (which Unity does), the app just goes over it and doesnāt load the contents, but if itās manually corrected it gets stuck at this error. From what I gathered it looks like it has something to do with the permissions in the manifest. Iāll try to rearchitecture the project to fetch the large files in some persistent path and keep the rest in just one apk. It probably will be much easier for the maintenance team to just change a file rather than ruffle through weird folders.
AH HELLO!
mobile
great
is htere anyway that i can lock the screen orientation on mobile webgl?-?
i am having this error after installing unity ads service . After countless errors of searching, no solutions seams to work. Anyone who previously encountered this error might help?
there isn't an error here. Is it stuck?
Excuse me people, could someone help me with scaling the screen of my project?
Apparently I was developing my game configured for PC when it should be for Android. As soon as you make the change, the screen now appears much smaller x.x
Hi I am encounter this weird unity behaviour and i dunno how to fix already tried restarting and, reseting all layouts and changing to default and nothing is fixing move arrows, tried to search this issue but nothing appears and this issue is constant for all gameobjects, as i tested this only is issue for this individual project, anyone had that issue? Unity 2020.3.33f1
Hey guys not sure if this is the right place to ask this but didn't find any better fitting category. I need to be able to build games for IOS development. Is it realistic to use a Virtual Machine for this purpose? If anyone does so, whats your experience? I wanted to avoid having to buy a mac just yet.
And if so, would running this VM on an external SSD be TOO slow for building a pretty small game? We talking ~~50MB apk
I would say make it cross platform. Make sure it works on android and when the app is close to final also test it on ios devices.
A VM, next to being low performance, often cannot properly build apps due to hardware checks. The best bet without a mac is to set up a hackintosh PC for builds, but this also is very tricky
I've tried with both. Hackintosh did work in the end, but sadly there is no vision pro emulator support on x86 hardware
hi, can i get help on getitin g my project build with facebook sdk
currently using unity 2021.3.30f1
Firebase 12.0.0
Google Ads 9.2.0
AppLovin 6.6.2
Tried updating Unity? 2020.3.48 is the final 2020 lts
not yet i will try that in a moment thanks for idea
unfortunately this didn't fix the issue
So I founded solution and its weird, worth to note that my current project never had installed probuilder and for anyone that have this issue, just install probuilder and open probuilder window and thats fixing everything and pro builder window must be always active bcs if it is closed then this issue come back immediately
I think this works because nothing resets/changes settings of move arrows even restarting editor doesnt effect this, so probably I think any assets/packages that are modifying move arrows should also fix it
Hey, can anyone help me with my game's resolution. I'm trying to create a 2d pixelart mobile game. It looks fine on my game screen , but when i load it to my unity remote it looks super blurry.
Searching it up im getting a bunch of recommendations like pixelperfect camera and setting up my URP. Can anyone give me some tips. Thanks!
Don't use unity remote @dawn pasture
Thats just streams a video
Make an actual build
Okay thanks
If i make an App with integrated gallery and camera function to take pictures in App, they can still be saved in the integrated gallery without the user having to make an account for anything, right? š
Does unity automatically cap FPS to 30 in Android builds?
You can also change remote resolution in preferences!
Yes, you can change it by setting the target framerate in code.
I suggest to make this optional as it kills battery
Yep ill do that
i recently added FPS counter in game, didnt knew that game was running in 30 FPS
I recommend having fps be adjustable in a settings screen. Having tested a couple dozen Android devices, I've discovered that some will experience very large fps drops if you try to set it to -1, 30 or 60. It varies from device to device. Even across a family of devices some will work better at 30 and others at -1. So I've had to make it selectable in game, in hopes the player can improve their own experience. I'm not sure of the cause, and am surprised it isn't a bigger problem for folks overall.
Thanks for saying
Hi everyoneHoping you are doing well, I would like to request some assistance regarding build with fb sdk for api34, I have tried 14.1.0 to 17.0.1 facebook sdk for unity however I have been only managed to extract the build only for api 33 using version 16.0.0 and for api 34 it fails. By having the facebook sdk excluded, the build is successful for api 34 , so if anyone can help out on what the issue could be , id appreciate it.
gradle 7.5.1
google ads 9.1.0
applovin 6.6.1
firebase 12.0.0 (Crashylitcs, Remote Config, Messaging)
firebase sdk 16.0.0 (api 33 pass, api 34 fail)
These are the versions being used.
find the error details in the console
@tired lily can i get little assistence, im really confused on how to deal with this, Thanks alot
None of those are errors. If your can't find the error message, post the whole output to a paste site: !code
š Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
š Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
how do you turn down the verbosity of logcat? I don't want info messages
there's nothing about it in the logcat settings
Filter it so it only shows logs tagged Unity
In the unity android logcat you can right click on the tag to add it
yeah I'm getting a ton of bytecode commands in the log like MoveNext()
my problem is with addressable. it only happens in a non-dev build on android. when I get the initial dependencies it tries to access them before they're done. on second load it already has them though so it works
that's what I'm debugging, at least I think that's what is happening
I guess I'll go to #š¦āaddressables
this is just sdk key missing not causing build issues and i havei inserted the key now, as for the fb sdk well issue hasnt been resolved but the urgency has been dismissed
It's an error so it definitely blocks build
If it still doesn't build then there are other errors
yeah just unity fb sdk compatiblity issues with other sdks
Is it viable to use PBR on the native Quest 2 for small scenes?
Shiny objects are just too good to pass up
I keep getting achievement ID not found for a unity mobile app. Any ideas why? This is an existing app and they have worked before.
hopefully you have a ton more info than that to provide
Yes what's helpful
public class AchievementController : MonoBehaviour
{
void Start()
{
PlayGamesPlatform.Activate();
Social.localUser.Authenticate(success => { });
}
static void UnlockAchievement(string id)
{
Social.ReportProgress(id, 100f, success => { });
}
public static void IncrementAchievement(string id, float progress)
{
Social.ReportProgress(id, progress, success => { });
}
public static void PlayHotseat()
{
int hotseatGames = PlayerPrefs.GetInt("HotseatGames", 0);
PlayerPrefs.SetInt("HotseatGames", hotseatGames + 1);
Debug.Log("Hotseat Games Played: " + hotseatGames);
if(hotseatGames+1 >= 10)
{
UnlockShuriken();
}
}
public static void UnlockKunai()
{
UnlockAchievement("CgkI4buSq8ceEAIQAQ");
}
public static void UnlockShuriken()
{
UnlockAchievement("CgkI4buSq8ceEAIQAA");
}
public static void UnlockUnarmed()
{
UnlockAchievement("CgkI4buSq8ceEAIQAg");
}
public static void UnlockScroll()
{
//UnlockAchievement("CgkI4buSq8ceEAIQAw");
Social.ReportProgress("CgkI4buSq8ceEAIQAw", 100f, success => { });
}
public static void UnlockAshwokenMale()
{
UnlockAchievement("CgkI4buSq8ceEAIQBQ");
}
public static void UnlockFaefolkMale()
{
UnlockAchievement("CgkI4buSq8ceEAIQBg");
}
public static void UnlockDwarvenFemale()
{
UnlockAchievement("CgkI4buSq8ceEAIQBw");
}
public static void UnlockHumanMale()
{
UnlockAchievement("CgkI4buSq8ceEAIQCA");
}
}
UnlockScroll is the specific one I'm testing if it matters.
and are the achievements defined in the play console? are you successfully signed in with pgs? are there any errors in logcat? If you're using the plugin for Unity, normally those constants are defined in an auto-generated file from the resources xml in the play store where you configured the achievements
and this is almost too dumb to ask, but you're testing on a device right?
@tired lily Yes to all except possibly successfully signed into pgs. That's just making sure what's in the Start goes through right?
how do you expect achievements to work if the user isn't signed in?
@tired lily It's not logging in to google play. Any common troubleshooting tips? I've got the plugin installed and set up resources.xml and all that
common mistakes are not signing your apk properly (if debugging locally), not including your local and app signing key fingerprints in the Android credentials, not having your Oauth consent screen published, or if it's in test mode not having added testers
@tired lily I think I had to update my key stuff when I made it live initially, is it possible I broke my debugging environment?
if you're signing with a different key, yep that would do it
Like it's literally a live app with achievements that work, but I can't get them to work at all
In unity/apks
you should have two credentials, typically you would use the upload signing key when building. Check your keystore settings and make sure it's set when you build an apk for testing
And when I push it live, change it back?
your app signing key would be the live build one that's probably working, so another way to confirm is to distribute a bundle on the internal test track
no, you have two credentials all the time
one for bundles that google signs on test tracks + production, one for your local builds which is probably also your upload signing key fingerprint
if you look in logcat, you're probably going to see an error about a fingerprint or certificate mismatch which tells you what's gone wrong
@tired lily It's been so long since I deployed it - I've forgotten where to change it in Unity. I know where to find it in Google Play Console/Cloud
player settings -> publishing settings
@tired lily I get this in logcat.
you're missing some proguard entries, then
enable custom proguard file and insert this text into it https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/scripts/proguard.txt
Hm, tried that - same error.
I tried deleting the whole plugin and re-installing earlier today.
which file precisely did you insert that text into and where?
and you enabled custom proguard in Unity right? Are your android dependencies missing then?
@tired lily Yes, that file appeared after enabling the custom proguard.
How would I figure out if I'm missing android dependencies?
did you use EDM4U to resolve them?
Just the built in dependency manager
depending on the settings, there might be a bunch of .aars in Assets/Plugins/Android or one of the gradle files in that folder will list a bunch of implementation*** text
@tired lily This is all that is in that folder
what happens if you re-resolve?
Nothing. It just says it resolved. I'm installing EDM4U
export to android studio and have a look around then, something's missing
What exactly do I export? I haven't used Android Studio before
tick export project and then open it in Android studio
@tired lily It just works in android studio
Anyone has encountered this error before? I'm on Unity 6000.0.9f1 and using googlegamesplugin 0.11.01
for anyone encountered the above, try following these official steps, at least it can successfully forse resolve the external dependencies now...
still building for a test
https://discussions.unity.com/t/iap-4-12-0-solutions-to-android-build-issues/1503523
What do you guys use to play test your games? Unity Remote 5 or Build them?
Remote just streams video to the phone. It's not much different than playing in the editor other than you get to try how the touch controls feel. If you want to test that it will actually work you have to do a build
Yeah I don't have a reason for unity remote 5. It's editor then build test at the end.
I feel like unity remote is going to have more problems than answers.
hi! I'm getting an annoying issue going from editor to device (android) where my elements are either unsorting depth-wise or being clipped by the camera.
In this case I have a blocking load screen that should appear in front of everything but it's disappearing. The elements in front of it are showing though. I'm actually not sure if it's a depth/buffer format issue, or how I'm displaying the blocking texture that's disappearing versus the text that IS showing
it only happens on the device so it's difficult to inspect
I've had something like that happen, it was being caused by objects or particles too close to the camera and messing up it's occlusion culling. Not sure if that will help you, I've seen it happen on 3 projects on the Quest, and once could never find the culprit.
But you can also try to reduce the min range of culling on the camera and see if that helps. Android also averages the x/y/z a little bit, so something that is fine on the Z plane in editor or PC will clip or block on device.
that's a good point, cheers. is there a way to turn occlusion culling off for just that plane?
the edges definitely sit outside of the camera
What's the error here?
One thing that may (or may not help) is hovering the bubble next to the package version in the second screenshot and read what's written
is there a way to build straight to the device but not run? I need to test my initial load but I hate watching it build
I've never figured out how to easily put a build on the device without running it
small editor script to run the build + invoke adb to install the bundle/apk
I just use adb directly. It'll let you manage installs, pull logs and files, uninstall things etc.
Cheers I'll have a look
I love how easy it was to make the editor automatically advance the build number
what are you profiling exactly? this looks like what I would expect if you were profiling the editor, but using Unity remote
yeah im using unity remote
the game is very laggy
so what's the problem? you can see that it has everything to do with the editor encoding video to stream to your phone. Build to your device if you want to test performance
looks okay, except maybe generating a lot of garbage per frame. Look at it in hierarchal view
A quick question
Does anyone know if RevenueCatās Paywalls are available for Unity?
https://www.revenuecat.com/feature/paywalls/
Hello!
I'm trying to implement vibration in my unity android app but for some reason it doesn't seem to work.
using UnityEngine;
public static class Vibrator
{
#if UNITY_ANDROID && !UNITY_EDITOR
public static AndroidJavaClass unityPlayer = new("com.unity3d.player.UnityPlayer");
public static AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
public static AndroidJavaObject vibrator = currentActivity.Call<AndroidJavaObject>("getSystemService", "vibrator");
#else
public static AndroidJavaClass unityPlayer;
public static AndroidJavaObject currentActivity;
public static AndroidJavaObject vibrator;
#endif
public static void Vibrate(long milliseconds = 250)
{
if (IsAndroid())
{
vibrator.Call("vibrate", milliseconds);
}
else
{
Handheld.Vibrate();
}
}
public static void Cancel()
{
if (IsAndroid())
vibrator.Call("cancel");
}
public static bool IsAndroid()
{
#if UNITY_ANDROID && !UNITY_EDITOR
return true;
#else
return false;
#endif
}
}
I als tried using only Handheld.Vibrate(); but it doesnt work on my android phone and when i run it in the editor it only outputs in the console iPhoneUtils.Vibrate();
check your android manifest and see if it's missing the vibrate permission https://developer.android.com/reference/android/Manifest.permission#VIBRATE
it does have the request
what do you see in logcat when you call this?
the JNI calls in static fields are also suspicious to me
it shows nothing related to vibration
as if i am not even calling it
but i know it is calling it
i also tried using this code: https://gist.github.com/munkbusiness/9e0a7d41bb9c0eb229fd8f2313941564 because aparently since android 8(api 26) the vibration has changed
i tested it on another phone and it works
but i still dont know why it wouldnt work on my phone
i installed a vibrator app and it does aacctivate the vibration
start out by using Unity's built-in function to get things working. You said "have the request" before. What request?
you mean it's defined in the android manifest right? It wouldn't be a runtime permission you request
Hey everyone,
Iām having a really tough time getting a blank Unity project to build for Android (.APK/.AAB) after adding these packages:
Mobile Notifications
In-App Purchasing
Google Mobile Ads for Unity
The build keeps failing, and Iām just trying to set up a project that can use these features without constantly running into errors. At this point, Iām open to using any ad network, notification service, or in-app purchase setup as long as it works smoothly.
Iāve followed several tutorials and even tried some suggestions from ChatGPT, which helped with some issues, but new ones keep popping up. Iāve been stuck on this for a few days now. If anyone has any advice or alternative solutions, Iād really appreciate it!
I've attached the errors I've been getting, I tried on both 2023.2.20f1 and 2022.3.0LTS
Thanks!
easiest solution: install ios build support for your version of the editor in Unity Hub (even if you aren't planning on using it)
I installed IOS build support, the same errors still come up, but thank you for the suggestion.
how long is the vibration?
some android device needs some time before the vibration motor could even rotate, I've seen some device needs at least 200ms or else, the motor fails to rotate
Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-34 Android SDK Platform 34
build-tools;34.0.0 Android SDK Build-Tools 34
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
All licenses can be accepted using the sdkmanager command line tool:
sdkmanager --licenses
Have you tried to run this line on your terminal?
sdkmanager --licenses
i have, i think i did it wrong though
like, i accepted all 7 of them
and then i run it again to see, and it says the same thing as the first time, all seven havent been accepted?
that's weird though as I'm sure I've ever need to accept any sdk agreement before š¤
btw, if you are using mac, did you use sudo?
oh, thats fair, i shouldve said im running Windows 11
for windows, iirc, you need to run cmd as admin to accept the license
Woah, it worked, the other errors are persisting, but it definitely cleared that one, thank you!
Hello everyone, I am making a 3d vampire survivors like game for mobile with features like in app purchases and ads integration, first I have decided to create the prototype of the game, what should be game architecture so that it's scalable ?
How can anyone even begin to answer that question?
Unity is more like component-based architecture, so why not just use that?
What I am actually asking is that what design pattern to follow for the game manager, which has the responsibility of managing menu functions, loading levels, making game paused or unpaused ? I don't know what to use, should I use singleton, service locator or Scriptable objects ?
Hello guys, may i ask if anyone has been using Facebook SDK recently?
I think you are getting ahead of yourself. Each of those serves a different purpose and you should bring them in as needed...
A singleton is just a way to static access monobehaviour objects, otherwise it would just be a static class. It's just a lot better than doing a bunch of FindObjectByType calls.
Script able objects are just a database like method that supports monobehaviours. So it's just sometimes marginally better than using json data for your project, because you can actually drag and drop prefabs etc into it. At the risk of course of not being able to edit them nicely later.
I for one would use SOs for level configurations or character templates etc. I'd use a singleton for the data loader class. Maybe on a game managed with a sub audio manager, etc.
It depends on the needs of the game though.
Is using game manager as a state machine a good idea ?
If it's simple for sure. For complex ones I'd have a level manager
Because that would persist in your intro amd menu scenes etc, and the logic isn't of value there.
Thanks for the help š, maybe I am just overthinking for a mobile game.
It still would be very appreciated if someone could help fix this, I am willing to pay money for your time. Big thank you to the few who have already helped!
Edit: i have made a job posting, disregard this
what other errors do you have? or are you still stuck on the sdk licenses?
Current FB SDK seems very buggy for me. When I built the game, I cant launch it at all. The open button not clickable. After few debugging,
I found that deleting AndoridManifest seems fixed the issue launching the game. But it bring to another issue where the game cannot use any of FB call. If build the game and not deleting Android Manifest at plugin folder will cause the game no able to launch again. I'm suspect something in android manifest could be the problem.
Anyone have solved this issue?
To fix some errors, set android version target to sdk34 (android 14)
UnityEditor.iOS.Extensions.Xcode you should remove this line that's somewhere in your code if you're building an android app (looks like it's in some files of the mobile resolver so not sure if you can, but it should not prevent building your app)
The errors also says that you should accept the licenses for sdk version 34
> Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-34 Android SDK Platform 34
build-tools;34.0.0 Android SDK Build-Tools 34
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
All licenses can be accepted using the sdkmanager --licenses
Hi, anyone have an Invalid configuration request for gameId error?
Ads stopped working in the editor, and in published mobile apps on iOS and Android.
Found the issue, ad blocking was enabled on my router...
Hey, I am using unity 2023.2.8f1, Building for Android SDK 34, my project uses Iron source 7.9.1 SDK, Google Play Games SDK 0.11.01 , com.unity.purchasing@4.11.0 and a few more , every time I upgrade any of them, I get issues with resolver (EDM/External Dependency Manager for Unity) or Gradle builds
for instance, now in resolver it says it successfully done (but resolve and forced resolve), but no AARs or Jars being downloaded to /Assets/Plugins/Android/ folder.
also it throws a few issues like that android SDK 34 not supported in Gradle version < 8.2 (unity 6 < bundled with Gradle 7.3), and when AARS does there (when not manually deleted) they will say duplicate classes errors, etc and wont build.
I am really lost here and tried everything
This is example of when it works ofc (once update, I got only the window above without actual files)
now when I upgraded all, it did resolve but new fun xD:
Those are the errors in console
If anyone has any idea what's wrong, please assists š
not sure if it related to SDK 34 or the upgrade TBH, I am trying Unity 6.0.16 now..
scammers such as "richardchris", please dont even bother..
I was wondering if there's any way we could simulate running the game on lower end (e.g. mobile) hardware in the editor, so we can get a more realistic view of how the game performs, and can optimize accordingly. Having to constantly build and run on target device takes a lot of time. It doesn't have to be super accurate.
Nothing in the editor, I would look at using the android simulators to try and see how it works, but I think there might be problem with the rendering but that will depend on your game if it is a viable option. I would say the "best" way is still to have a few lowend devices to build and analyze with.
Can anyone help me to solve this please? I'm using Unity 6
heyya, I stumble this issue too
you have to upgrade to latest LTS I think (2021.3.43f1, 2022.xx.xx) works for me for now..
Well, after upgradinv to unity 6.0.16f1 it shorta resolved
had to do a few stuff
it wont copy the aars/jars but they somehow exists in end apk..
or atleast the sdks works š¤£
also, needed to update all gradle.properties min sdk to match min of project
in all sdks
they were 6,9,16
and also regenerated all gradle files
idk why it behaves like that, but it works..
I need help to fix my build issue, After several trying the error is same and my gradle version is 7.2.x
That's not an error. Show the entire output
The entire output, not just a small part of it. Use a paste site: !code š
š Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
š Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
!code
š Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
š Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
!code
š Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
š Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
@analog plover š
I said use a paste site. Read the bot message
And show the other error message, the one below this one
Hey guys, I have a problem. I have a perfectly fine and working game on PC build, but when i switch to Android, the camera and everything is weird and broken
Is there a way to fix this?
Weird and broken is not a very detailed explanation of whats going wrong, what you expect and how its looking
do you also use firebase?
nope
what about Unity Notifications?
also not
ok, then i guess you are good to go
So i set the target api to 34, but in google play console it still says that i need to upgrade the target levels to 34, any ideas?
wait for couple of hours
man, updating to android sdk 34 is such a nightmare (especially if you have a lot of firebase dependencies)..
does anybody had a succeed?
i waited 24 hours š I thought it was just changing the api target and that's it
Hi
hello
I am working on a Project for 3 Years now. I sticked to the same Android SDK. I cant update it from Unity hub because its "installed" already and i cant untick the boxes. When i build and install on android, it tells me that it isnt the latest version. Should i upgarde manually or stick to it?
You'll likely need to update it. Android kills off older SDKs periodically to be jerks :D, so you'll want to be on a higher target SDK with them most likely.
But it depends what sdk level it's set at. It's also OK to leave that update until you are ready to start publishing. It most likely wouldn't impact much except for the odd plugin
Thanks Mate
How do I fix this:
Your advertising ID declaration in Play Console says that your app uses advertising ID. A manifest file in one of your active artifacts doesn't include the com.google.android.gms.permission.AD_ID permission.
If you don't include this permission in your manifest file, your advertising identifier will be zeroed out. This may break your advertising and analytics use cases, and cause loss of revenue. Learn more
You can remove these errors by updating your advertising ID declaration
Apps that target Android 13 (API 33) without the AD_ID permission will have their advertising identifier zeroed out. This may impact advertising and analytics use-cases. Learn more
it tells you how to fix it
include the com.google.android.gms.permission.AD_ID permission in your android manifest
Hello, I'm getting a null reference issue in Appopen Ad Google admob SDK for unity AppStateEventNotifier.AppStateChanged += OnAppStateChanged; This is the error when I run on an Android device. please help!
Do two released mobile games with a total of 100,000+ downloads have any impact on finding a game dev job? Whats your opinion, and what has the most impact for recruiters?
It would depend on what you did, who it was for, size of the team, involvement, engine, how much tangible work was yours, the new job you are applying for etc. It is better than not though.
Already did. Turns out it is because the first version of my app on playstore didn't have and even if existing ones do, playstore will always remind u that there is a version that doesn't but u just have to select to ignore the warning and upload it. It will upload sucessfully
And for some reason playstore never provided a way to delete old artifacts so far I am aware of so u will always get that error whenever u are uploading to playstore but since I am already way past that update I just have to ignore it
normally the warning will tell you the version code of the affected version, and you can see that warning appear if you have it on a test track still
It's my 1(1.0.0)
you can release with that warning np, but if you're relying on advertising revenue, having the adid zeroed out will crater your revenue
I am in 20(1.0.4)
do you have a release with version code 1 active on any test track?
I thought ad revenue is separate, I mean isn't that admob thing?
separate how? Advertisers use advertising id to track players. If it's zeroed out because you have a permission issue, advertisers will pay you less because they can't target your users very well
you just need to replace it with a new release. If it's on production, promote an internal test build to release. If it's in a different track (closed etc), promote an updated bundle to that track
To 1.0.0?
the bundle code is what matters. The warning is telling you 1 (1.0.0) is the active release for one or more tracks. If you created a closed test track and never replaced it, that would be one common cause
is there some usual way people do on screen joysticks and buttons? like where exactly do yyou place the buttons and joystick, or do you just do it where it feels best?
Hello. If I use Unity Ads in my game on Google Play Store, will google consider me as "monetise on Google Play" ? It seems they make address public if that happens
Yes. Any ads would mean that you're monetizing the game.
Hello, I faced a problem while converting my project in Unity 2020 version to a mobile version. I went to Build Settings and clicked on Android and a message appeared saying, āYou do not have a license.ā Well, here I got confused, although it was not an error message, just writing, and I went and searched, and when I searched, I found that I had to buy the paid version, even though I was only using the personal version because it is free. Is there another solution other than buying it?
you don't need a license. Check Unity hub and make sure you have a personal license activated (free)
Thx Brother
Asking this here because I'm not sure I believe GPT's answer:
If a dev publishes a small free game on Google Play and App Store, and the developer's revenue comes exclusively from Unity Ads in that game, then does the developer have to pay for Unity Pro license and other royalties if the revenue is higher than $100K?
How do you scale everything in a canvas to fit on mobile devices?
yes
So Unity will take a commission from the Ads revenue from Unity Ads itself, and then will also require Pro license purchase from the developer and further royalties?
Yes, Pro license after $100k and runtime fee after $1 million. They have said that the runtime fee is negotiable if the game uses Unity services.
Great, thanks
Do you also happen to know whether the developer has to declare revenue to Unity if the revenue is lower than $100K?
You only have to declare revenue after $1 million for the runtime fee
Many thanks
Hi there, I am building an app for Android with Unity 2022.3 and the app doesnāt find any file inside of the Application.persistentDataPath. When I do check in the directory from Windows I can see it but itās a folder that is inaccessible from the target tablet and the paths of the internal storage (there isnāt any SD card) that the tablet says is in use does not match the path that Unity generates. Is there any way where I can find the correct path to the application data from the tablet? Itās a Galaxy Tab S6 Lite
what are you trying to do? The way your last sentence is phrased makes me think you're expecting to find files in there that you didn't specifically write
i did write them but i think i got confused at the fact that itās a tablet that has no external storage
but since application.persistentdatapath still points to a storage/emulated path, it actually would need the permission?
i am trying to read files that are in the com.<companyname> file in data and the logcat tells me that the files do not exist even though i can literally see them in the windows explorer
but i have no way to check internally from the tablet because itās not rooted
you don't need permission if it's exactly Application.persistentDataPath, but if you're trying to access something else the OS might not let you
there are some weird edge cases possible, for example you might not be able to list the dir contents, but you can access the file if you know it's there
i am trying to read the file through a UnityWebRequest.Get
now I managed to get at the root on the tablet the location retrieved by the code is correct, but the request fails. It doesnāt fail on the desktop build
iām so confused at this thing
you could try tweaking permissions, but they shouldn't be necessary: https://developer.android.com/reference/android/content/Context#getExternalFilesDir(java.lang.String)
what does your web request look like? might be a protocol issue
the weird thing is that observing the logcat, when i do manually open a file from the folder in the gallery by example, it also throws a lot of warnings not finding it
`` UnityWebRequest www = UnityWebRequest.Get(path);
yield return www.SendWebRequest();
if (www.result == UnityWebRequest.Result.Success)
{
Debug.Log($"Data successfully retrieved at {path} using asynchronous method");
status = 1;
}
else
{
Debug.LogWarning($"No data found at {path} using asynchronous method");
status = 2;
}
bytes = www.downloadHandler.data;``
and this is the warning it logs when i open the files from the tablet itself
does you path start with file://? that used to be a requirement
nope indeed
gotta try this
gosh it works
thank you so much @tired lily ! iām feeling super silly lol
What steps should you be taking these days to make sure your Android game isn't ripped/cloned/modded too easily on Android these days? Does compile using Proguard make any difference and is it worth your time?
(I know it sounds like an edge case, but one of my past games I once mistakenly shipped a broken version where all the IAP was unlocked, and to this date that build accounts for 60% of my DAU in Indonesia, so someone's redistributing it somewhere...)
Also does google play protect etc provide any protection and is it worth looking at?
Finally, does Application.genuine really do anything under the hood?
Sure, nothing prevents a certain level of once you release an APK, it's everyone's forever, and there's only so much it's worth doing if your game isn't a top-charter, but I'd like to avoid making some of my dumber past mistakes...
Proguard is useful to reduce apk size. Application.genuine does some checking to make sure the package name hasn't been changed but otherwise is mostly useless. If you're only targeting the google play store, using play integrity might help. Otherwise, use a server to verify purchases + enforce version checks, especially if your daily users are costing you money
Is it fine to primarily use Mobile Simulator view instead of Game View? Some questions:
- Normally people use 1080x1920 reference resolution for Canvas Scaler, but I can't use that in Mobile Simulator. Is there a specific device screen that's best to use instead?
- Is there a way to get the "Stats" information in Game View to also be viewable in Mobile Simulator view?
- For mobile development you should only be using the device simulator.
- Select whichever device you want, it doesn't matter. I tend to use one that I physically own. It helps to work with 1 device selected, and then swap to others to check everything is ok (that's part of the part of it..)
- The canvas scalar doesn't care about the device simulator resolution. You're adding a REFERENCE resolution, you can use 1080x1920 if you want
Do you personally put the reference resolution to the main device you own? I thought that if we don't put in the same reference resolution as the device we're primarily using, then any UI objects we place may end up being positioned or sized incorrectly, is that not true? As the scene view conforms to the current selected device in the device simulator.
I'd also like to ask if you think using "Screen Match Mode" as match width or height, and "Match" as 0.5, is the best settings to use if trying to support both phones and tablets (portrait only). That's the most common settings being recommended when trying to research online, just want to make sure.
Reference resolution is set to what the designs were made at, not the device.
Supporting both tablet and phone depends on how much UI there is.. the more UI heavy it becomes, you're better off having 2 lots of UI created. (1 for phone, 1 for tablet)
For tablets, many games just don't expand the main UI content fully, and leave some padding around the sides (so it's more like a phone in reality), and only fully expand the background images.
I want to do that approach, but I couldn't find any way to set a max width to the main UI container. For phones, everything can expand fully to the screen space available. Once the screen is in tablet territory (past set max width), we stop expanding and let it stay centered so there's empty space on the sides. Do you know of any solution?
Example phone vs tablet (added red for visibility):
keeping stuck in android build at this stage. Any solution?
I have been waiting for almost an hour one time
CPU?
5 3600
build size?
is it ending?
first time building it?
Yea
Kinda weird stuck in the Mappin File though
usually is in compilation
yeah, just upgraded to 2022 and first time building it in
That's why
once you build it becomes a lot faster
but first time is pain
if it's going to be okay, I'll even wait ten years.
Depending on the build size it changes. More than 30 minutes for a 150 MB build can't happen though
can i see build size before building it?
my last apk build this
There is an asset store package that makes you see all the allocation for Textures, Models, etc. in the build
build report tool right?
I am using it and actually its not more than 200-300mb
Probably something is wrong in project but i will wait and see
Yea, so I would say around 30 minutes
I've never had problems building though. Maybe just once that it was stuck for real.
But in 5 years just once is not that bad
me too but last couple days im trying to install supersonic sdk
I got many errors and solved them but when it came to the build part
a complete nightmare
Nightmares will hunt me tonight
I have been stuck for days (not now, I have actually learnt a bit how to manage that luckely)
Conflicting dependencies found
Classic game dev dream in action
I remember when I have tried messing with Unity's Terrain System on mobile. Almost worst than a Build Failed error.
Nah, I had a problem with firebase and google play. It turns out that both had the same dependency so Ambaraba Cicci Cocco and I deleted one.
But once I would have just deleted Unity
I gave up on installing the firebase SDK, I couldn't stand it
Kinda though if you have Google Play Services too
But it really depends on the unity version
Yeah, agree
Why didnt you prefer UGS?
They did not exist when I created that game
And I dont have to put the credit card into Firebase
*Until I use it too much
So in your next project, will you use UGS?
Nah, I am used to Firebase and until it works I'll use that
Cause i am looking for solution to manage the player datas and i decided on playfab but everyone recommends ugs
I don't care what everyone reccomends (you dont even know if they are paid or not) I just go with what I like the most
You are absolutely right
By the way building a custom server with RESTFUL APIs is not impossible so I plan to do that in the future
At least you pay just the electricity bill and you decide the rules, not a change in terms or conditions of whoever knows.
but wouldn't it be vulnerable to possible attacks?
when we look at it from the security perspective
Why would you attack a server handling leaderboards of a minigame?
And if that was the case obviusly you would have to secure it
I assumed it would be a bigger game since you decided to create your own serverš
Nah, doesn't need to be big, it's just to avoid surprises and at the end of the day is prolly cheaper.
I think it will cost you around 500⬠with other materials.
