#📱┃mobile
1 messages · Page 10 of 1
string path = Application.persistentDataPath + "/EmployeeData.json";
if (File.Exists(path))
{
employeeDataSet = JsonUtility.FromJson<EmployeeDataObject>(File.ReadAllText(path));
}
else
{
employeeDataSet = JsonUtility.FromJson<EmployeeDataObject>(file.text);
}
this should work right
this is just for loading the file not for writing
right
look at the log and see what your error is
where to look at the log
Unity editor log console with your device selected, or logcat
Does someone have experience using the asset LeanTouch?
does anyone know how can i download the android apk using an qr code?
What apk?🤔
Is there anyone specialized in Android games who can help me?
Ask the question and if someone knows they'll answer
i cant explane my problem in chat
when i want to build come this and when i press to update nothing will be
Make sure that Unity version was installed from the Hub so it can update its modules, also make sure you are actually using android SDK installed from the Hub and all required parts of it.
Yes i download it from the hub
If for some reason it can't update your SDK you can reinstall it. You might need to reinstall entire Unity version for this.
If i delete unity and download it another time will help?
It doesn't matter
when doing a iap product, it asks for a price in the Google Configuration, should this just be the same price that I have set in the google play console followed by the currency, for each product?
How do you all manage bitcode for ios? I get frameworks errors if I have it disabled, but I get can't build bitcode because it also has an error bitcode bundle could not be generated because protobuf was built without full bitcode
Ads/ironsource has become so tedious to integrate
bitcode is deprecated in Xcode 14 so I disable it
if you're referring to the iap catalog thing Unity ads gives you in the editor, that's just so you can export a file to be imported into the store. Doesn't have any effect in-app
(Translate, sorry) I want to ask a question. I am testing banner ad and it is blocking the ui. Is it always like this because it's a test? Should I set the UI to space above the banner? It's a stupid question but I'm new, sorry.
Move your UI. Ads on device use native UI elements that will render on top of everything else
thank you for the answer
I tried, but I get crashes if I turn it off for some reason
random crashes during the game or crash on startup? maybe there is a problem in one of your dependencies
your previous comment sounded like a compile error, not a runtime error
Hi everyone!
I accidentally pressed a button and it installed this.
And as a result I am now getting JSON errors.
How do I uninstall/disable in app purchases from my project?
I have problems with my hands shaking some times and clicking my mouse without intending to. It's kinda upsetting this happened.
No worries, I don't much like that whole process either. Inside of Package Manager, you can change it to Unity Assets, and remove the inapp purchasing from there. It's tricky to setup
Oh thank god! I uninstalled the in app purchasing package, thankfully, but not sure what my next step is.
Awesome, hopefully that should mean no more errors, unless it enabled some other thing on you
Oh apparently I have to do something other than just uninstall the app manager.
No worries, just share any errors you see in here 🙂
supposedly the mere fact this thing is enabled is the problem. I saw someone had to disable the cloud feature by going into some settings and turning it off. Do I have to do that here too?
https://forum.unity.com/threads/how-to-remove-services-from-my-project.559324/
So I'm guessing the entire section here in unity screws people's projects and cannot be handled outside of a text edit?
Ah fun stuff! I hate all the Unity project things it tries to add. This one you can remove too, it's Unity Analytics
ok thank you!
It's basically trying to get you to use their cloud service for data collection
And there is a good 8 or so modules. So hopefully they didn't enable more on you
I'm just so angry because I can't compile my project now until I remove this, that's because I don't have a google analytic id
I spent all night trying to get the project settings properly set up
I'm infuriated
guess I have to screen shot everything then completely wipe my library and settings
Dear GOD why does unity do stupid stuff like this.
I usually use git for most of our projects, so it makes it a lot easier to revert that kind if stuff.
Whst it did is added a bunch if stuff via package manager. So you should be able to remove them in package manager to go back to normal. But it's hard without knowing what they added
it also set a value to true which causes it to look for in app purchasing purchase keys. uninstalling the package doesn't turn it off.
I just found other people with similar complaints but no answer on how to disable it.
WAIT maybe unlinking fixed it
why does my android up lag just from 2 test buttons
like they do nothing they just there and it lags
the most fps it say the "others" eats
Check the hierarchy for the exact details
it is an ar app and i want the apk to download on scanning qr code
That's not really unity related then. You can generate a qr code from url. There are tools for that. If the url happens to be a download link for your apk, that would initialize a download.
ok
I'm trying to start a coroutine for the timer after the rewarded ad is shown, it works in the editor but in the apk the game closes after the ad. In OnAdFullScreenContentClosed it doesn't work at all. How can I do it?
Everytime when I start my app on android I get just a black screen and this error. Skipped rendering frame because GfxDevice is in invalid state (device lost)
I'm trying to set up ads, and I haven't used Unity in a few years, this whole ironsource thing is so confusing. There's 2 dashboards now? I can't find a single piece of code to show how I'm supposed to show an ad. And why do I have "ad placements" in both Unity and iS dashboards? Can someone link me to some documentation on how to show ads?
if anyone has the build grade error being caused by the unity mobile packages like mobile notifications, just start from a fresh project and move your assets in again.
Hello! I'm going to publish a game on the App Store / Google Play, does anyone have experience with some trustworthy mobile publishers? I would like to promote my game for a period of time.
Unity Ads is the ad monetization solution for mobile games. It enables mobile game developers to monetize their entire player base, via ads that are native to Unity-based games. Enjoy watching.
Dashboard: https://dashboard.unity3d.com
Documentation: https://docs.unity.com/ads/en-us/manual/InitializingTheUnitySDK
💙Subscribe to My Channel: ht...
This worked for me yesterday
Thanks for the link, that's the old Unity Ads though instead of the new LevelPlay one, and since its a new project I'd rather use the new one, thanks anyway though!
Do as you wish, the new system is so new that it's very hard to implement
I tried implementing it and wasted a day
Thats fair lol, I might go back to the old one if I also have this many problems
You can join the conversation in #archived-pricing-updates-talk
I crashed the android app via Diagnostics.Utils.ForceCrash(); and it created some files named "tombstone_xx" at location android/data/packagename/files/. Is it okey to be created at android data location? If i search about it it says:
Tombstones are the closest to the metal in terms of information, as they will record details such as raw memory addresses, and as such can be a bit trickier to understand unless you’re familiar with debugging native code. **Again, tombstones require physical access to a rooted device in order to be read.**
ref: https://www.bugsnag.com/blog/how-to-make-sense-of-android-crash-logs/
So there is no way to disable them because it is in SDK?
failed to load libmaim.so
your hardware does not supoort this application
how to solve this error
anyone knows android dev?
Hey guys can someone help me with the Grade Build error?
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.2.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
I try everything and nothing work...
New to mobile development and already failed with starting the game into my phone(android 12) anyone knows something about this error?
pressing on "Build"
Has anyone tried playing with a new Unity 2dCore mobile template? its kinda borked.
hola
hello there got some issues with graphics, my game usually looks like this (first picture, screenshot of youtube video) but when i switch build platform to android it looks like this. anyone got any idea what the issue may be? problem is that the terrain is very very shiny
by very shiny i mean this shiny
What are your mobile build settings / preferences? How do they compare to the other platform settings?
You know what's funny? Unity is threatening to charge heaps more money for their games, and they still haven't fixed the Pixel Perfect displays for 2d sprites. Pixels are NOT being displayed perfectly on the canvas. They are still distorted for android builds.
Resources for deciding Render pipeline for your mobile game!
Introducing BiRP vs URP Benchmark
Would be great if URP settings were shown as well. That is where most performance wins lay for URP (and the default settings definitely are not the best.
IL2CPP also has better performance and should pretty much always be enabled
Yeah, that's pretty much what I saw in the last BIRP vs URP test I did - which was 2021 as well
We benchmarked a touch of a slowdown, good to see it replicated
I did show the URP Settings
so you agree BiRP is just much wiser for mobile?
IL2CPP also has better performance and should pretty much always be enabled
This is for comparing 2 pipelines, not squeezing the best performance for a certain case. So IL2CPP would be not too valid here
I think URP came from good intentions, but became a make-work project. I don't recommend it, and I don't think it solved any real problems. I think performance optimization is better off handled by static batching, good light baking, and shared materials with LOD's and good poly counts. IMHO
Not a certain use case. The default urp settings have settings enabled that don't effect most visuals, but do impact performance.
And if I recall correctly urp had certain optimizations with il2cpp enabled, but not fully sure
Sharing the exact urp settings is crucial with a comparison
I match the birp as the urp setting here
Transparency on the settings specifically for URP would be appreciated still
I di like that you included the project at the end of the test though
Hey, I've created a key for my application but when I try to instal the apk via the APK I still get the Google Play Protect warning what should I do? If someone can link me to good ressource to understand how that whole things work 😅 I somehow can't find it myself.
i suppose this is the right channel for my issue The Crashlytics build ID is missing. This occurs when the Crashlytics Gradle plugin is missing from your app's build configuration.
I've tried redoing the crashlytics onboarding segment again and still no fix
also looked in google for every available forum to no avail
guys, I am trying to make a phone game, i keep getting this error when making the apk build.
i've added GoogleMobileAds to my game. and it works fine in unity. however when i try to create an android build i keep getting errors. Assets\GoogleMobileAds\Editor\BuildPreProcessor.cs(5,19): error CS0234: The type or namespace name 'Build' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?) this is one of them. but i get like 10 or something like that all from GoogleMobileAds.
can someone help me, why cant I make an apk build
i have the packages installed, and the project tymplate is 2d mobile
feels like your missing some stuff to build for android. never had this before. but do u have android sdk installed?
yes
Hey guys, if I allow IAP inside my mobile game do I need to add the apple pay to the capabilities? or is it unrelated?
Is there any way to profile the time between the end of the splash screen and the start of the game? Something is causing my game to hang for about 1-2s and I don't know how to profile this section as the profiler only starts after the hang? Thanks!
What API are you targeting?
Alright anyone know whats going on with Xcode 15 builds now failing since update ?
android and ios
Unity BiRP vs URP Performance Benchmark (Update!)
Now included:
- Unity 2022 (URP 14)
- Comparison between Versions
https://github.com/StinkySteak/unity-birp-vs-urp-benchmark/tree/main
Please help me star the repo 😅
Great for you guys for choosing pipeline for mobile games
Hello , I just published new update on play console , problem is ,users cannot update app they are getting this message :
note :" App must target Android 13 (API level 33) or higher" i fixed this voilation in this update
uninstalling and reinstalling is working ,but update is not working
Hey guys, for the above issue we tried the typical solution of clearing cache, data or restarting device but still update doesn't work.
We can't tell all users to uninstall and install the app again as his cause inconvenience for them.
Is there any setting that we can't do or any solution that we can apply to our app for this?
Hi, how are you? Do you know if the Firebase SDK is incompatible with Android API 33? I can't build the game. 🥺
I tested with an empty project until
Then you get an error you can check
Did you change the target API or minimum API?
Yes, but the mimumum API is what allows people to update or not on older devices.
Maybe share the setitngs you have right now
which settings precisely ?
Minimum and target API
And maybe it can be custom manifest/publishing settings as well
Minimum API level is 22(Android 5.1)
Target API Level is Highest installed which is API 33
No , Unity version is 2021.3.8
Launcher Manifest ?
I do recommend to use the latest 2021 LTS as there have been some bug fixes, and the latest android API is officially supported with the built in android version installed with Unity Hub
Any custom file in publishing can impact compatibility
Oh and make sure both ARMv7 and ARM64 are checked if you use IL2CPP
this is checked
what is the latest official supported API ?
Check docs, but at least the API needed to publish to the asset store
asset store ?
Yes, I asked because I checked and was indicating for files that are created in Android Resolve. I'm doing another test now, I've updated to version 11.5.0. It was in 4 before and maybe this directly influences the problem. I just wanted to make sure in case someone had the same problem as me.
i got this message from google console team , i update the target level api to 33
Yeah android resolve is giving a lot of headaches, hope it helps.
Sorry I meant app store
okay thank you
Anyone have like a guide or article about Admob and unity and gdpr. Its my first time using it and the documentation about gdpr and consent screens is kinda all over the place, not to mention in some places only referring to android and ios and not unity. I'm just looking for a guide that breaks it down, thanks
Hey everyone! I am looking for someone with access to an android phone using an API level of over 28 (Android 9.0 'Pie'). I've noticed on an IPhone 14 my game doesn't pause when put into the background, and was wondering if that's the same effect for newer Android phones (I only have access to an Samsung S8 which runs Android 9.0 'Pie')? I've done a broad search for an answer to this question on Google, but cannot find anything useful. Thus asking the question here... Thanks!
did you enable any custom behaviors on ios? It'll be paused while in the background on android
I'm not sure i have time for that. But you could test it on an android emulator pretty easy if you wanted.
Yeah I second the Android emulator, you can then use whatever version you like
hi , I try to test my game on unity remote but when I connect my mobile with usb to computer I got this message
Unauthorized device detected, Id: RK8TC006T8T, please add debug authorization and reconnect.
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
note : It work in another device , so Idk what the reason
Thanks @Tom & @brazen birch ! I'll try that way.
gradle-launcher-7.2.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease" solution "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease" Hey getting above error while building my game anyone knows how to resolve this issue ?
Scroll down, the actual error message is nearer the end
its a gradle build failed but i dont find the solution
You scrolled to far
is this ok
No, that's too far in the other direction
If you can't figure out which part is the error message just copy-paste everything to a paste site: !code
📃 Large Code Blocks
Large code blocks should be posted as 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 get C# formatting the first line should only contain cs or csharp.
Add a comment with a line number if there is an error message.
```cs
// Your code here
```
Do not share screenshots of code unless requested.
That's not a paste site but ok
This is the error:
Cannot parse project property android.enableR8='' of type 'class java.lang.String' as boolean. Expected 'true' or 'false'.
once i set true and one time i set false but still not working
i have tried using boolean'
You'll have to show what the error message is when you do that
check i set true org.gradle.jvmargs=-Xmx4096M
org.gradle.parallel=true
android.enableR8=true
unityStreamingAssets=true
Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
Android Resolver Properties End
unityTemplateVersion=5
show the error message
when i try to build it show this
the error message in the log, like you sent earlier here
That's still not a paste site but
Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.
this one
When I login players with Google play I immediately get the token and able to log them in, but with apple id it asks user to enter password as soon as they open the game which is kinda bad. Isn't there a way to log them to apple play or something without password?
Does apple game center also require password?
the first time (if they haven't used it before), otherwise it's automatic
Hey guys, I have a tiny problem. My game has a "Start scene" in which a video displaying a bit of gameplay runs in the background. My problem is with a 18:9 aspect ratio (that is used for certain phones) the video looks "squeezed" on the side, I think it is mainly due cause the original video is a 16:9 one. Is there a quick fix for this ?
I'm considering replacing the video with a cut-scene but ... If a simpler solution exists I'll not be against
First you'll have to decide what should happen instead. Either cut the parts that don't fit, or add black bars to the sides
If you use the video player component the options are in the "aspect ratio" property
NItku will i have to change the directory
because the sdk 32.0.0 installed in other folder
Hi I am facing a problem in my project i upgrade my Android SDK from 31 to 33 and I am facing some error. The .aab file is not building and it's showing these errors
I waste my time watching lots of YouTube videos but no help on YouTube
debnit roy did you face gradel build failed
Ya maybe
You know how to solve
cool!
What is android resolver for exactly?
Does a Unity product have it in their documentation? I see it pop up everywhere and so many people get errors from it
Bru the game works perfectly fine in my mobile but i don't know why I get this game rejection and it's saying my game crashes why is this. It work perfectly on my mobile
Check the screenshot and check for any other information
Not every phone is the same, so there can be crashes with other/older devices
Ok let me check 🙂
Ok thank you
did anyone know the how to solve gradle Build failed.
I tested this option but I had to select no scaling. Once again thank 🙏
Only if you share the exact error
same problem ive had for so long
Did you find any solution
Plz if you find plz help me too I am stuck for long time
a few days ago when I had the problem I spent hours looking for solutions and all of them were different but none of them worked
@wise pebble What the exact arror u are facing
Mine showing 32.0.0 corrupted delete and install again from Android studio
I suggest to use the android versions from Unity Hub
wasnt it from a plugin?
google firebase plugin?
Idk, that's why I asked
no one solved gradle build failed . if anyone knows how to solve then Help
9/10 times its either using android SDKs from android studio without knowing how to use them (just use unity hub and select installed with unity in external tools)
Or a custom publishing file they don't understand (either just copying something or using resolve which can give issues)
And using old unity versions
I have latest unity version and I am also a beginner
It says sdk is read only, maybe look into that
I don't know either
Did you use resolve or any custom manifest or other publishing file for android?
Yes
Then that's the issue. Undo those changes and build a blank project to your phone. If that works start adding stuff untill you find what breaks it
You can make a blank project build without any custom files for android
But I have created many projects but I only use unity ads but didn't work on that project
What if I have to use unity ads
Start without
Then add everything step by step
Making a build when possible to check
I created blank project then it is building and if I use unity ads it's start showing gradle build failed
Then you probably missed a step
Paste the exact errors for further help, otherwise I cant do much
Do you use the android versions that come with unity hub? And have those selected in external tools?
Yes
Then the issue lies in the custom android manifest
Mayeb update resolve if you use that and follow the guide that you need exactly
The option setting 'android.enableR8=false' is deprecated. is your error right now
Its in project settings - player - android - publishing
i am curently using android.enableR8 = false
Here are the files causing issues
Then remove that?
i also tried this but still have error
Then something else in the manifest is wrong
No one can fix it for you
Google and follow guides
And start with a blank project and go from there to narrow it down
What
I just said you dont need android studio lmao
Or does Unity documentation tell you otherwise
If you select installed with Unity the android studio versions are NOT used
ok but when i again use ads from unity it will again show this error
i have tried with many project
Then you are probably missing a step
Check the documentation again
Or you have your project in a special (sub) folder like onedrive, program files, documents, desktop, etc
onedevice ? now the project in DriveD
I also see Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.
Maybe reinstall Unity
D drive is good usually
OneDrive ?
i also tryied this
No, do NOT use onedrive to store your project
Anyway, I gotta focus on work. Good luck
did you know anyone who can help this
?
i can export the project any time i want but cant make an apk
if i update the android sdk to 34 will it still be able to run on older devices?
that did work, yey
but when go to install it on my phone (samsung a53) it says there was an error parsing the package
i changed min api and target api from api 34 to android 13 and highest. that fixed it.
This means that only people with the latest phones can play it. The target should be highest installed, the minimum should be as low as possible for your project
shuld i care about this?
i dont care if they pring down whatever app is the problem
Hi guys, i'm facing problems with a build to Android. I'm using version 2023.1.11f
When I try to build i'm getting this
How can I solve it?
I've changed to all previous sdk version I have installed and I still facing the same error when try to build to android. Does anyone know how to fix it?
Oh ok. So the top one shold be the lowest one that i want to be supported?
Yes
i have all of the ad scripts straight from the unity manual, why arent they working ono my device
Hi guys, good day for you all. Did anybody face this problem and fixed?
Hello everyone, I'm experiencing a sound delay issue. I have a specific problem as you can see in this video. When I test on mobile and tap the object that's supposed to produce sound, there's a delay of about 200ms before the sound plays. I'm sharing the link to the video; if you watch it, you'll get a clearer idea: [https://www.youtube.com/watch?v=px43SrrE5GI]. Does anyone have any knowledge or experience on this and can help?
So your Unity game outputs WAY slower audio than other apps even on the same device?
Turns out, Unity adds as much as 79% of the total latency you hear. But not to worry because Native Audio will take care all of it. I have researched into the cause for so long and the solution is right here : http://exceed7.com/native-audio
Extreme latency red...
i am having anissue . I have created game but it is not same in other device UI is fine.
There are several things to consider, MP3s have a natural delay in the codec, so use OGG or WAV. The device compression can also be a factor. As well as how the sound plays, such as load on play.
I don't have unity in front of me to check which specific settings I use, but I'd modify how it loads on play and use a non delayed audio file format
If the sound isn't just a normal audio clip, and using some third party library / mic etc. I can't help
Thank you for your answer. The audio format I use is wav extension. Apart from that, I tried to reduce the latency to minimum conditions by setting the DSP Buffer Size setting to Best Latency from the Audio settings in the PlayerSetting in Unity. However, I could not get enough results here either. Apart from that, I play the audio clip directly from the audio source without any settings. After outputting the mobile output, I record the sound from the microphone (SteelSeries Arctis 7+) through the Audacity program. There is no recording system other than these. As in the video, when I click on the screen at the same time, there is a 200 ms delay between the sound received when I press the screen and the sound output from the audio source. I don't know how to prevent this, I'm not sure if I'm describing the problem properly. This difference occurs when I record as in the video. This difference is a difference according to the phone I am using. Again, I am throwing the relevant part in the video: https://youtu.be/px43SrrE5GI?t=13
So your Unity game outputs WAY slower audio than other apps even on the same device?
Turns out, Unity adds as much as 79% of the total latency you hear. But not to worry because Native Audio will take care all of it. I have researched into the cause for so long and the solution is right here : http://exceed7.com/native-audio
Extreme latency red...
i want my game run same in all devices. what can i do for this
Check logcat for errors
What isn't the same?
Also, you're still using DefaultCompany
the frame in some phones it looks good but in some phone some part of games cut
in i phone
Do they have different aspect ratios?
If so, limit the aspect ratio or (usually better) place all crucial information of the game within the ratio which works on all devices
i don't understand . How to do that?
If you use UI change the canvas scaling
If you use regular 2D either scale the worlds or move the camera back/increase render area
If you want to force 16:9 you can do so in the player settings I think
Okay but the game isn't
Easiest is to lock the aspect ratio
This has been asked on the forums a lot as well, so take a look on google
I think it's in the player settings for android
can you tell me the settings
if you currently making any game tell me the settings you are using
Someone know how to fix it
I am trying to setup ironsource and levelplay in Unity.. but there's an error due to missing gradlew.bat..
I fixed it by copying that file from online into the expected folder.. but that folder and its contents are always deleted whenever I close Unity..
hay, i have integrated ads on my game. i set test mode to false, and try build and run on mobile but when i click to load ads buttons ads are not coming , but if i try game on computer ads are coming
will have to do next, Plz Don't Ignore
have you seen ads on device? ads in editor are fake and don't use the actual mobile sdks obviously
i copy paste from Unity Doc and try to run on mobile while test mode is off . ads not showing on mobile and then i try test mode off then only banner fake unity ads show but no interstitial ads is showing
check logs with logcat
will i have to do other things to load ads without uploading on playstore
well you configured your ad unit ids right?
yes
you don't need to upload to play store unless you're using an ad partner that requires a live app before they serve ads
but when i try test mode on mobile only banner is showing
and logcat says what? are you seeing errors?
again, working on pc means nothing
you are not using real ads there, so you don't know if the config is really correct or ads are being served
check logcat and make sure ads are loading
if you're not looking at logs coming from a device build, you haven't even started debugging yet
Hey, the apple game center plugin requires macos to be built. Does anyone have access to a built version they could share or know where I can find one?
https://github.com/apple/unityplugins
in logcat it show rewarded ad failure
failure to show? failure to load?
you'd still need a mac to build to device, so that won't be very useful to you
I am able to build using cloud build
seems like a straightforward error to me
did you read the red text?
you need to wait for an ad to be loaded before trying to show it
stop your script from spamming that and debug the ad load/ad load failed events
and for interstitial
I don't see any entries in your log for trying to show interstitial, so my assumption is you aren't trying to show them
oh the left screenshot
you are logging ad loads right?
thanks a lot brother
@tired lily i want one more help from you i have completed my game but i want my game run same in all devices
what are the setting that make look same i all devices
you'll have to add letterboxing or something. Devices have differing aspect ratios
scripts or unity have some settings
bro my canvas is working good. YOU can see my UI are fine but that bricks are cutting
did you go to the link?
you need to ... scale the canvas. Or create a dynamic, adjustable UI that will work in other aspect ratios
You can force aspect ratio here. Does add black bars but if you don't know enough about Unity it's fine to make a first version like this
already native aspect ratio
Yes, that's your issue? That every phone has a different native ratio
Use legacy
You need to understand canvases and anchoring in Unity. Specifically what it means to use a reference resolution on the canvas, scale with screen size and have your elements anchored to the corners.
but it works on ui but not on gameobject i think
If your issue is your orthographic camera, then you may want to read this
https://pressstart.vip/tutorials/2018/06/14/37/understanding-orthographic-size.html
thx for providing tutorial , i will try i hope it will work
@neon thicket how you master your game development
any tutorial or anything else?
I've been using Unity for a long time, I don't remember any tutorials I used. 🫣
from where did you start
Over 8 years ago
any games you have on playstore i will play
Not anymore lol. Thanks anyway. Good luck. 🫡
@hazy canyon I only really do small prototypes for fun on my own. I work with Unity at my day job, which is how I make my income. So I don't have the stress of having to release something.
TIL that Unity 2022.3.0f1 doesn't work with xcode15 due to some Apple linker update in xcode. Apparently Unity had a fix in for this and I confirmed that Unity 2022.10.0f1 does work when "build and run"ning from the Unity editor.
I was seeing this error when trying to "build and run" my unity ios app onto my phone...
Showing Recent Issues
Unity.IL2CPP.Bee.BuildLogic.ToolchainNotFoundException: IL2CPP C++ code builder is unable to build C++ code. In order to build C++ code for Mac, you must have Xcode installed.
...which was paradoxical because I saw this error inside xcode 😂. Posting this exact error in case anyone comes to this discord and searches for it to see if anyone else encountered the error and what they did about it (just update to latest Unity version and you should be okay!). TIME TO GET BACK TO THE FONE STUF 🖖
Hi guys! I have a small basic issue. My android device is not recognized in Unity.
Unity Remote does work when I press play but it doesn't show up in devices and also the remote option in the resolution settings for the game tab says Not Connected
Anyway I can fix this or should I just get over it?
Hello
a few days ago, I had a problem with unity not building a small project I followed on youtube for android, now it works. The problem is that on my phone, the framerate is awfull and I don't know how to optimize it so it doesn't get lagspikes there. Any advice?
Are you using the Animator?
I rememember a long time ago when I last used Unity the issue was the Animator component. Try Using Animation or code your own.
I am not using animator. There are no animations in the project. I just put some sprites, made a few lines of code then checked if everything works as intended, wich yes, it works
Besides those lines of code I'm not sure there's animthing to optimize but am not an expert by any strech of the imagination.
Maybe paste here those lines of code
Can anyonone help me with this, i cant build my game and ive been trying for over 3 hours. Theese are the errors (Unity 2022.3.10f1):
A pop up that says: TOO MANY ERRORS
EDIT: THIS SHIT SUCKS, IVE BEEN TRYING TO DO THIS FOR LIKE 5 HOURS NOW
errors:
Anyone has experience with Unity's various 3D batch rendering APIs?
I tested both BatchRendererGroup and Graphics.DrawMeshInstanced but there is apparently a whole family of iterations that happened in-between.
I'm wondering if any of the other combine Graphics.Draw's ease of use with BRG's improved performance.
And/or if there one specifically designed for mobile somewhere.
Someone know how to fix this?
Guys Plz Help Ive Been Stuck On This For A While And I Promised My Friends They Can Test Play My Game
Anyone know any good assets or videos that help with super basic multiplayer functionality for mobile?
Nothing real-time like an FPS, super basic stuff, like sending serialized objects that let you see what items another player has equipped or make guilds and such
Remote play is not the best and not widely supported afaik.
Make sure USB debugging is enabled on your phone maybe?
Otherwise just use builds
-
do you use the unity hub android module and both submodules?
If so, in external tools check 'installed with unity' -
Do you use any custom android publishing files? That is often the issue
I made it work. Thank you
Do I need to have a company registered to publish a game that has rewarded ads and IAPs?
Asking because on Google I found conflicting answers.
On Google Play*
I don't think play requires this, but your country might.
I'd recommend talking to someone from your country who specializes in this
In some countries you need to register a company to get payment (for tax reasons)
if someone knows how to fix this gradle shit then i would be greatful
i dont know why ads initialized in testing on computer but not initailized in mobile
this banner ad
- yes
- No
@sleek eagle I didnt do anything. the build just said no
yes i did add the android mudoules from unity
So it's a blank project?
im try build but it wont work @sleek eagle
Hi everyone. I'm using Admob SDK to display banner ads. But when banner ads show up, my game got this black bar, how can I fix it?
\
is that snip from the editor?
No, this is from Game, I look at editor but can't find that bar.
by "Game" you mean you took this screenshot while running on an actual device showing an ad and not the Game tab in the editor, right? Your cropping is suspicious
No, I cropped this from Game window in Unity, and real device got this problem too. This's full screenshot when I show banner ads
And this is when I turn off banner ads show code, it's look normal
can you show a screenshot from an actual device? The editor ads are faked obviously. The black bar might be a weird safe area issue. There's an option in android to only render inside safe area, is that on or off?
and by actual device, I don't mean Unity remote because that's not your app running on a device
here's 2 screenshots from Redmi Note 5 Pro (1080x2160)
and here's the code to create BannerView:
_bannerView = new BannerView(_bannerAdsUnitId, adSizeAdaptive, AdPosition.Bottom);```
are you sure this is the banner's fault? it looks like maybe the buffer isn't being cleared every frame so there's some kind of smearing happening. I would be messing with presentation options
I noticed that if I use AdSize.Banner, I still got 2 black bar at the top and bottom:
Maybe, I look at banner prefab in GoogleMobileAds/Editor/Resources/PlaceholderAds/Banners. I found a prefab name ADAPTIVE, and I tried to make a clone of it, inside ADAPTIVE have an Image, and when I don't add Button component on Image, it's return to normal, but when Image have Button component, that black bar is show up.
okay this gets lost on a lot of people. Everything you see in the editor is faked and approximated regarding ads. You aren't running the mobile sdks in the editor. Normally ads are shown in a webview, but in the editor ad companies just slap a placeholder prefab in front of the camera to approximate where it will go. All ad testing MUST be done on a physical device
those prefabs are NOT used on the device (hence the "PlaceholderAds" name)
Now I'm patching a development build on my Redmi Note 5 Pro, wait for my result, but I think that black bar still here.
What are your camera clear flags (built in) / environment type (URP) settings?
showing eror unityads not initialized 2. A Banner is already in use, please call destroy before loading another banner 3. Banner_Android Placement Banner_Android failed to fill!
Show initialization code. You remembered to initialize the sdk right?
@tired lily
and what does that log? don't try to load banners until it finishes, so rewrite that first script
what do i correct @tired lily
make that line for me if you can plz @tired lily
interstitial and rewarded are working only this is noy working
well error 1 is a race condition because you don't wait until the sdk inits before trying to load stuff obviously
error 2 is self explanatory, fix it as it tells you
error 3 means there weren't any banner ads available for display. If there aren't any ad networks willing to supply you an ad, you get the no fill error. Banners are very low value to begin with, so a lot of the time ad networks just aren't willing to spend money to have them displayed. Implement an exponential backoff when you get a no fill error to try again later
so what do i correct i am begginer check which line is causing this error
or nothing is the problem bcz ads are not available
the entirety of your Banner's Start needs to be moved
sorry did not understand
you can start loading ads once AdsInitializer.OnInitializationComplete has been called
As expected, it's still here, and now it look weirder than before :v
did you ever check the camera settings?
Okay, after change camera projection, Its look like before.
Here's my camera settings
If I patch a development build, it's run as I want, like this one:
But if I build an APK, and the version on store, it's got that visual bug
weird
did you try modifying any options under Resolution and Presentation in android project settings?
Here's my Resolution and Presentaion in Android Project Setting
Hey everyone, does anyone know why I have this grey screen before the unity splash screen? Other apps would show the app icon and then transition to the unity splash screen
Even another Unity game of mine does the correct thing, shows the app icon with a slight zoom transition, fades it out and then shows the splash screen
(This is what I expect it to look like)
It's a feature apparently?? https://issuetracker.unity3d.com/issues/android-mobile-a-black-screen-with-a-logo-appears-before-the-splash-screen 😭 It looks so much worse...
Steps to reproduce: 1. Open the attached “1577825_BlackScreenOnLaunch” project 2. Open the “SampleScene” scene 3. Open the Build Set...
Hey anyone knows the best resources for free assets for unity game development and also for commercial use . Please let me know . Any leads will be helpful
As answered already: Unity asset store
Does anyone have a solution for getting an Identity Token from Apple to use for authentication? I just want the token. And please don't point to lupidans solution on github as that no longer works with Sonoma (latest mac version). Thanks!
When my phone dies and my app is running, my save files are lost/corrupted/cant be loaded. Anyone know why this might be happening?
Maybe make periodic auto saves and write it to a 2nd file. If the 2nd file is finished you can write it to the 1st file. If the 1st file corrupts you always can read the 2nd file as a backup
When power shuts down a save can be partially written, making it corrupt
I have a game which can only be built on apk 33+ but my phone can't install it then how can I download the apk file to go lower
Thanks
target sdk to 33, min sdk to something lower (22 or 23 to target the most devices)
With apks it doesnt really matter if its compatible when you download it, that only comes into play when you try to install it.
Ive tried quite a bit on unity ads based on their documentation, i cant seem to get ads to pop up on my phone, everything works fine in the editor
Yeah the problem is its not compatible
Hi guys, do you know how to implement a power save mode such as below? This game is made in unity also, i want to copy that feature:
When i press it, it becomes like this and the game running in background:
Add the UI over everything, put the target refresh rate very low (5-10?), if possible disable all renderers and animators, make sure the gameplay pauses if applicable
Ohh so its like your just gonna overlap it? Thanks for the idea! :)
I think so?
That's how I would do it
Using multiple scenes also could work and give a bigger boost (maybe leave the scenes in the background and just activate and deactivate them, but havent tried that yet)
Cool bro 👍 might work
keep in my mind the deltatime bug is still present on android
can i use them for play store without any issue or i have to write cradit
We have a game which has IAP which we released about 8 years ago. Now we need to update on Android due to 64-bit requirements, but the old IAP framework we used in like unity 4 at the time is since long deprecated & dead. Now we see that we could perhaps use the Purchasing package which ships, but it seem to want to enable Unity Gaming Services. The problem is that we don't want all extra bullshit & data collection, we just want simple cross platform IAP, is this at all possible with Unity Purchasing?
Click on the last error and look in the additional lines of the console. There are 3 more errors causing the problem that are embedded there
Hi guys!
Does anyone know if is it possible to debug the app build in the Android Studio Layout Editor?
because i have added the unity ads and i have tested that and ads was working good in unity editors nd when i upload the game in Google play store the ads was not workin can any one help me out
can any one help me out
You need to provide some actual error information as well. And look it up first too
I would test if you can build an empty project correctly.
I would expect those files to be marked read-only, since they're in Program Files.
i would check that those files actually exist
Guys I am getting this error
UnityEditor.BuildPlayerWindow+BuildMethodException: 6 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <7fef092428a04dc89d2aa6ad3ce5d856>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <7fef092428a04dc89d2aa6ad3ce5d856>:0
I am using 2021.3.19f1
i dont know what happpning i turned off unity ads test mode still showing unity test ads
did anyone know why this is happning
Hey! I've just joined and i'm new to unity. I'm looking for someone to be a learning parter, someone with a bit of experience who I can bounce questions/ideas off of! I'm making a very special birthday gift that i'm super excited about. I can't offer anything in return, so I understand if there is nobody available. I do have a lot of coding experience, but it's in other languages, mostly Javascript and HTML/CSS.
Hello, I'm trying to use Java source plugins, as single files in the Assets/Plugins/Android folder, and I can't figure how to import android or androidx to get access to Toast or annotations. Any idea?
Hello, I'm adding Google Play Game Services 0.11.01 to my game in order to add Leaderboards and Achievements but after several attempts with different errors I am completely stuck with this. Any ideas what can i try?
Okay moved forward a bit and now im getting this error when building:
AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.games.PlayGames
java.lang.ClassNotFoundException: com.google.android.gms.games.PlayGames
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:454)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.access$500(Unknown Source:0)
at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:126)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
Caused by: java.lang.ClassNotFoundException: com.google.android.gms.games.PlayGames
... 9 more
at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x00000] in <00000000000000000000000000000000>:0 2
when building or during play?
IS it normal for an Android app built with unity to try to "interact" with every app on my device? Logcat shows hundreds of lines that look like interaction: PackageSetting{<myapp>} -> PackageSetting{<some other app>} BLOCKED. why would this happen? surely this isnt normal?
looks like you've deleted the wrong jar file.
you can try android dependency resolver to solve this (if it's still exist)
already tried but still getting the issue
during play, at the beggining I´m connecting the player to google play services and the error shows up
Hello guys! So I'm currently having this error that tells me my Android SDK Build-Tools component is not found despite me having the JDK, SDK, and NDK installed and I'm also able to see them checked and active through the external tools tab in the preference window, what should I do?
It could possibly be due to minimizing the apk file. Then adding the corresponding proguard file should help.
Hello everyone! Could anyone who has had experience with Unity development and deployment to iOS systems please lend a hand?
My Debug.Logs are all turning into Debug.Log(Object) rather than the usual strings as shown in Unity Editor's Console
If anyone has experienced this before and managed to find a solution please let me know as this is a big blocker for our project!
Getting this warning when i run my project on android device and terrain textures are not loading
anyone help me
hey i have a problem and maybe someone can help me, I tried to do something basic to see if i can conect my iphone to my macbook, The project works on my macbook camera, but when i try connecting it to my iphone, when i launch what i have built on my phone it doesn`t activate the camera, it simlply shows me this
this is my .plist file
you didn't include code, but are you requesting permission to use it? https://docs.unity3d.com/ScriptReference/Application.RequestUserAuthorization.html
there is no code, https://www.youtube.com/watch?v=Z4bBMpa4xWo this is the link i have been tring to follow
In this Vuforia Engine augmented reality tutorial you’ll learn how to create Image Targets using both the method through the developer portal and directly into Unity using Instant Image Targets. This easy-to-use and popular target type makes it simple to create powerful AR experiences for books, posters, and any other flat image.
Before gettin...
well I haven't worked with this sdk, but your first debug step is to try and access the web cam yourself. You need user permission to do this, so check the link and make sure you're asking permission + seeing the device
I'm going to guess that they are expecting you to do this yourself
I am building a RTS type game for mobile, but the assets/models I am using are really detailed
The camera view is really limited, so i want them to look a bit lower quality
Ref: Camera view
just want to reduce the apk size as a whole
you can override texture import settings for mobile to scale them down
these ones?
that would work, but applies to all textures. No, the texture import settings for each texture
oh, these ones?
I will also try appyling to all of them to see how it works
yes
Hi devs.
I've recently completed a LevelPlay integration tutorial for my game, and I've successfully implemented ads. However, I've encountered an issue specifically related to banner ads.
I've created a video demonstration to showcase the problem.
Initially, everything works as expected on the first app load. However, when the app loses focus (e.g., going to home, clicking on the banner to open browser, etc.) and I return to it, the banner disappears, and none of the expected actions function. Interestingly, there are no error messages in the console, and the IronSource callbacks do not report any issues.
I hope you could help me or at least share any information that might help to resolve this issue.
I'm working on a patch for an Android game. I also switched from Unity Ads to Google AdMob using the Google Mobile Ads Unity Plugin. I got everything set up in AdMob (at least I think I did) and imported the latest package. I wrote this code for initializing the package:
private void InitAds() { MobileAds.Initialize(initStatus => { }); }
However, when I run it in a build in Android Studio, I get the attached exception when it tries to initialize. I've tried everything from changing managed code stripping to resolving Android dependencies, but still can't find a solution.
Anyone know whats causing these warnings? It's from a 1 second looping video. https://gyazo.com/2cc989776535a0f1a45fecba4ce5026e.mp4
It seems to happen whenever the audio plays from that video. I've been playing around with settings all day trying to fix it. Is there a certain audio codec / setting in Handbrake to solve this or something?
hi everyone, I've been struggling to resolve android dependency nor building android apk for a few days.
anyone exp with android please guide me, it's on my new PC, I can basically recreate the problem by creating a new project (2022.3.10f1), adding "FireAnalytic.unitypackage" from "firebase_unity_sdk_11.5.0". Which added "External Dependency Manager 1.2.177". Then I do Asset/External Dependency Manager/Android Resolver/Force Resolve.
it failed at 0% with the following log (txt).
I'm getting a Gradle build error after trying to integrate Google Play services, I'm using the plugin "GooglePlayGamesPlugin-0.11.01.unitypackage",
The error output is quite large, but the key error seems to be; Could not find com.google.games:gpgs-plugin-support:0.11.01. Required by: project :unityLibrary
I'm following this guide https://developer.android.com/games/pgs/unity/overview, it's a bit convoluted - it starts simple, you click "Get Started" and it takes you to a page that says to first "set up Play Console for your game", oh sure, I'll just go do that... oh it's a several page document with many steps... part of which tell you to "open the Android SDK manager and verify that you have downloaded the following packages", this implies Android Studio is already installed, which it's not, because Unity Hub handles a local install of JDK with each Unity engine install. I'm worried if I install Android Studio it's going to install its own version of JDK and update my Environment variables to point to that, and screw up my Build process even further.
Here's the full error output FWIW
Unity version 2021.3.0f1
You don't need to install Android Studio.
Have you done the 'Android Resolver'? It's under the Assets file menu
Yes I just tried it, it says everything is resolved. Also I think that runs automatically.
I've now upgraded the project to 2023 LTS and getting a different error. But the team wants me to try again with the latest 2021 LTS so I'll start over with that and probably have different issues to post about tomorrow...
Googling this part of the log
Could not find com.google.games:gpgs-plugin-support:0.11.01.
Gave me a result I've looked at before, which is this.. I vaugely remember having to do this
https://discussions.unity.com/t/resolution-failed-failed-to-fetch-the-following-dependencies-com-google-games-gpgs-plugin-support/252676/2
The issue was that my GooglePlayGamesPluginDependencies.xml was pointing to a directory that did not exist. This comment’s fix worked for me: open the file Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml change line Packages/com.google.play.games/Editor/m2repository to Assets/GooglePlayGames/com.goo...
Thank you, I didn't happen across that specific page when searching for the error (maybe cause I was using DuckDuckGo, who knows) I'll definitly try this tomorrow.
Wondering if anyone has a solution to this AudioSampleProvider Buffer Overflow error? I searched around all day and came up with almost nothing on the issue.
Back again, this time it's a different error. I reverted the project to the latest from our source control, so wiped away any changes that I did prior.
I upgraded the project to 2021.3.31f1, added the Google Play plugin "GooglePlayGamesPlugin-0.11.01.unitypackage" and now I get this very verbose error:
(Any suggestions @fallen compass ?)
Whole error output attached
Getting desperate now, just following the Unity manual's advice to export the project as a Gradle project and build from the command line
https://docs.unity3d.com/2021.2/Documentation/Manual/android-gradle-troubleshooting.html
you should have multiple entries in your console. The log you posted doesn't say what the error was
look through them and find the one with more details about the failed step
hi
im trying to set my google license key in app purchasing but it says im not authorized to set up,, can some one help me with it?
Go to Android resolver & use force resolver then make build
if that didnt works then change gradle
The last couple of times I've installed LTS 2022.x the Gradle versions haven't updated correctly from Unity, leaving me with Build Errors. Now you appear to be having an error specific to this plugin. It may not be applicable. However, to fix my error I've had to go under PlayerSettings(Android Tab)->Publishing settings, and check Custom Main Gradle Template, then when you exit and try to rebuild it says your version is out of Date, do you want Unity to download a new one? After that completes it always works. I tried manually installing Android Studio and pointing Unity to where it installs the Android SDK and Gradle with no luck. But letting Unity update itself always does. It may not help, but thought I'd toss it out there.
- Are you using any custom hlsl blocks?
- Is Unity and shader graph updated?
- Any other errors?
Want to optimize meshes for Unity Android. My mesh are taking 2.1M Tris and 6.1M Verts and taking about 2 gb of ram when test by profiler.
Kindly help?
- LOD them (there are LOD baker tools)
- If they are large cut them up so frustum culling can work
- Check what exactly is taking up memory. Most likely texture data takes a lot more ram than just the mesh data
And test what the performance issue is.
Is it the tri count, is it CPU, is it textures, etc
I reduced texture resolutions and they are not taking that much. It's the mesh that take 1.9 GB of Ram and slowing down the game
Can you send a screenshot of that?
And do you use the memory profiler? Then you can see more specific data
There is a memory section in the regular profiler and a full on memory profiler
Each of your meshes has many submeshes. Check if these are needed.
What you can do:
Make sure to remove any unneeded meshes
Put the index format on auto unless it gives issue
Enabling mesh compression might help (test it)
For optimize mesh put it on everything unless it gives issues
And in the player settings you can try to use optimize mesh data (see screenshot)
Each mesh has low quality submesh I think for LOD
Ah got it, then try the steps
And I see in the profiler that most of your time is spent in a script, so I don't think the meshes in memory give the performance issue
I'd suggest to look into what is actually taking up performance and not just memory
What's the recommended process for releasing a mobile game with ads you can remove if you pay a small fee? Do you release the beta on Google Play for testers WITH the ads incorporated? Does the ad component even work when testing the app? Thanks!
I'm currently involved in a project where I'm integrating Unity as a library into an Android application. I've encountered an issue where a black screen persists for a notable duration (approximately 20 seconds) before the initial game scene is loaded. Interestingly, when I built the application as a standalone version, this lengthy waiting period was not present. Through searching online and experimenting with various approaches, I have attempted to resolve the issue as follows:
- Implementing background loading (with preload) for all game audio.
- Omitting preloaded shaders.
- Retaining only one scene in the build.
The third strategy significantly reduced the duration of the black screen. Is there a method to lazily load the scenes upon the application's first launch to minimize this waiting time?
does anyone know which unity uses keyAlg and keysize to generate keys?? rsa and 2048? Or is this not important for Google Play?
Hey guys, sorry I had to cross post this from #archived-code-general since I'm not getting response from there. Have any of you faced this issue before:
I'm using Firebase Cloud Messaging in my game. Using that, when a player challenges their friend, their friend will get a push notification from the backend with extra payload data attached to it. In Android this is working fine. But in iOS, I'm getting the push notification but when the app is opened on clicking it, I'm not getting any payload data from the notification.
I have noticed that the event:
Firebase.Messaging.FirebaseMessaging.MessageReceived
is not fired in the game because I have added a log in the event listener which is not printed. What could be the reason? This was working fine when I used Firebase v10.7.0. In this version, I have updated to v11.4.0. I tried upgrading to v11.5.0 and downgrading to v11.0.0 but still the issue persists.
I just use https://www.lastpass.com/features/password-generator to create passwords for the keystore
Do I need Google Play integrity protection for an app that isn't online or anything?
Hi everyone I have an issue with my Android app
I built it with the IAP SDK and first did a UDP test wich worked fine
Then I changed the store to Google Play, no other change and after building the game the performance drops with no apparent reason
my game freezed whenever i attach the debugger in visual studio on android
stopping the debugger makes the game continue again
Hi, how to update gradle to 6.7.1 version? I have this error
Thankyou, and thank you @brazen hazel as well, I'll try both your suggestions. I'm going to document them as possibilities to try at least. Because do you know what worked for now? And reproducilbly so... (like, I can revert from source control, and do the same thing again, and it works); when I'm getting this error, I do the export option, let it make the Android Studio project, and then completely forget about that and just run a normal build again. And it works!! Every time!! 🤷
Yes I've since realised that "warning" is actually just a warning, but it's displayed in the Console as an error, it's the first error, so it's naturally what I looked at. What I've since learned is, when there's an error, that "warning" just gets included in the output as an error, so whenever I see it, I need to look down to the next "error" to see what the real "error" is. In this case, it was Could not find com.google.games:gpgs-plugin-support:0.11.01. And the fix I did is in my previous comment above this one
Yeah, building could certainly be better. It was outright broken for iOS for much of 2022.2x
Hello everyone, does anyone know how to set an icon in the DefaultIcon field in Player Settings?
Texture2D[] icons = PlayerSettings.GetIconsForTargetGroup(BuildTargetGroup.Android);
icons[0] = icon;
PlayerSettings.SetIconsForTargetGroup(BuildTargetGroup.Android, icons);
this is how it installs LegacyIcons in one of the cells
Hey all...is there a way to wake up a sleeping device using Unity? There's a timer that goes off after a certain amount of time and I want a noise to sound when it's done and the phone's asleep.
(Would this be a use case for the mobile notifications package?)
(or a reason to use application.runInBackground?)
running into this error when building to iPhone from just the basic ARCore template. I have selected all relevant options for iPhone/ARKit development. This should be as easy as hitting build and launching the game, as is what happens with the tutorial im watching. Any solutions? Solutions online talk about deleting files with terminal, but I cant seem to figure this out.
🗃️ Documentation
Android platform
iOS platform
Device Simulator
Mobile Notifications
Adaptive Performance
Android Logcat
📚 Resources
E-books
- Optimise your mobile game performance
- 5 major pitfalls that could sabotage your mobile game’s success
- Best practices from successful mobile indies
Webinars
💬 Forums
🗺️ Roadmap
If WhatsApp notifications cause lag to my game does it mean my game is just poorly optimised? With so many different types of phone how do you work on your game so that a phone won't over heat?
Have you optimised it?
Have you profiled it?
tons of meshes having to be rendered, lighting having to be calculated on every single mesh
look at your draw calls and bring them down
Is there any way to build the game out to iOS without having a Mac?
Online services that build it for you. Otherwise, no.
are there any way to control audio stream type on android?
Does anyone know how to get IAP localized price and currency code?
I'm using this:
Product product = storeController.products.WithID(productID);
string price = product.metadata.GetGoogleProductMetadata().localizedPriceString;
if(price == null)
{
price = product.metadata.localizedPriceString;
}
Debug.Log("Google price" + price);
return price;
Does it is the right way? Because I see sometime it not fetching price correctly.
Hello! Recently I found out one of my games has been removed from the Google play. I'm very new to this kind of things, and I didn't really understand what was the problem and what could I do to fix it. I'm really not very good at English, so that is difficulting me to understand the situation. Thanks for the attention!
They dont like what you used for advertising plugins and have removed your app
Specifically it's saying the Unity Ads needs to be updated to version 4.0.1 or higher
Hey! Unity keeps adding emulator-5562 to my list of devices every couple hours, which creates a CommandInvokationFailure to be thrown whenever I try to test with an android device. Does anyone know how to stop this?
In this way, I can get rid of the offline device and Unity will deploy to my phone with no issues for a few hours. When Unity begins failing to connect, I'll know the emulator device has reappeared.
bro is it nesassery to define licsence for the game to publish on google play store
As I understand, yes. I hope this might be relevant for you: https://developers.google.com/android/guides/opensource
i am a indie developer i dont know about lisececes any problem if i am not using these
But I don't use ads in this game...
I'll see if there's a plugin activated that I didn't use
Thanks!
Yeah that happened to me too. It's supposedly added by the android runtime for any emulators, I don't have any installed however and it keeps coming back
I ended up just adding a flag to all my ADB commands to ignore any offline devices. I'll look up the flag later and share it with you.
I’m having a weird issue where sometimes my app has a portion across the middle of the screen where it is not detecting input. Like there is something blocking touch or raycast or something, none of the buttons or scripts can be interacted with via touch. The strange thing is that deleting and re-installing the app seems to fix the problem and it is quite a rare issue, it has only happened twice in maybe 30 installs… both times on iOS not sure if it’s a iOS issue, TestFlight issue, or Unity issue… the bug eludes me but it is preventing me from launching because I can’t have a bunch of players who have no input
Hi - I have a very old Unity project that I'm upgrading to 17.1 to avoid having to port the UnityScript code. I'm then looking to build the project for iOS. From my understanding, I need XCode 14.1. Will the build created by Unity 17.1 still be compatible with XCode 14.1 or am I going to run into issues?
is there any common causes why my unity freezes for several minutes when I change the build target from windows to android?
hi guys im using this script to save data but now i want to reset the player data .. but i cant find the saved data.xml .. how can i reset the player data please help.. im not good at scripting
Hello! I tried using unity remote 5 earlier in another phone, and it worked, every time I connected my phone to my computer, an alert would pop up in my phone saying if I wanted so the computer charges, transfer photos or files. I used to click so the computer to transfer files and it would work. But since I bought a new phone, when I connect the new one to the computer that alert just won't pop up and unity remote 5 just wouldn't do anything. My phone is a Redmi Note 10 pro, with the android version at 13. Anyone knows how to fix that? Thanks for the attention!
Hey, so Android 14 has broken my dev (mono) builds on my device (unsure about production il2cpp yet). I'm getting this in logcat:
Dynamic lookup for intent failed for action: com.google.android.gms.games.internal.connect.service.START
JNI_OnLoad called
CommandLine:
Shutting down VM
EXCEPTION: main
Process: ..., PID: 16075
java.lang.RuntimeException: Unable to start activity ComponentInfo{.../com.unity3d.player.UnityPlayerActivity}: java.lang.SecurityException: ...: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
I can't tell if the "dynamic lookup" is the error, or if its the next part. I've checked the apk in Android Studio, and every reciever has a exported field. So I'm not sure whats causing this. any ideas?
Okay I've found this one activity in the generated manifest without an exported tag. How can I change this though, as its from google play games?
looks like google play billing library 6.0.1 has an update that should fix it, which version are you using? https://developer.android.com/google/play/billing/release-notes#6-0-1
Sorry for the late reply, but I don't think I'm using the billing library, these are the only aar files after resolving android libraries:
An update, I found another manifest file in the unity project and found the NativeBridgeActivity, added the exported tag... and still the exact same error. Completely stuck
it might be a runtime registered receiver
https://developer.android.com/about/versions/14/behavior-changes-14#runtime-receivers-exported
so editing the manifest wouldn't be enough
Oh I see, that would explain why it only stopped working in android 14
I do have some native code which calls some android java classes for custom haptics, ill try disabling that coz thats the only thing I could think of
Okay that didn't fix it, neither did an IL2cpp build. Is there any other way I could figure out what would be doing one of those runtime recievers?
I'd start by looking at the release notes of all native plugins you're using, because that should be fast and easy. Then either strip down your project or create an empty one and start adding things until you figure out which one is causing it
Okay thank you, I'll try that now
when building for mobile, how do you prevent unity from automatically stretching out sprites to different aspect ratios?
im not talking about the canvas, but game sprites themselves
for example, if my game is in 16:9, i want it to be in 16:9 at all times, with just blank space on the side on android or something
hi, I have a problem with an android project on unity, in this photo, it is my game tab, my elements on it are well positioned, they are all UI images of a canvas
and this photo is when I play on my phone, the elements are smaller, or are not in the right place, how do I resolve this problem?
Try the safe area asset from the unity asset store
Safe Area Helper i think it's called. It should work if they're canvas elements
Did you set the position of the ui correctly? (scale with screen size, ect)
is there another android publisher than google play or not?
Thanks for all your help. Just found the issue...... it's with Unity itself lmao. Checking development build causes the crash but unchecking it does not. So at least I can continue development for now even if its without dev builds
When doing UI for mobile, use the device simulator.
Don't anchor any UI elements to the center, anchor to edges and corners.
Set the canvas scalar to scale with screen size.
Remove 'for nintendo switch'
woudl you say it's the norm to precompile shaders on mobile?
guys can someone help me ... what are the steps to make android builds... i still get erros when making builds
I have the latest LTS version and the android sdks of installation are installed
i dont know what the problem is
This only works in game mode but not in simulator mode. How do I fix this?
transform.Rotate(Vector3.forward, rot);```
First you'll have to decide how it should behave in a mobile device
guys, I can't build a game on android.. every time i get the same errors above.. can someoen tell me what to do
You'll have to show the full error
ok 2 mins
how do i send the errors... first error alone is like 100 lines
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.
Yes. This is the error:
C:\Users\yusuf\OneDrive\Desktop\Cross\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity\androidnotifications\UnityNotificationManager.java:165: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
^
symbol: variable TIRAMISU
ok will try it now
@analog plover THANK YOU IT WORKED!
I do have a problem though, I installed the advertisement legacy package, yet i cant see the ads under services in projects settings.. can someone help me set up the ads?
(videos on youtube dont show such a thing)
Does anyone have advice on what mobile measurement partner (MMP) you would recommend? (Appsflyer, Singular, Adjust, etc.)
i also dont get it i think in the new version they remove that feature we can directly control from the unity deshboard but my ads are working
Hi guys! using inapp purchasing 4.9.3 is enough to keep safe with the requirement of play store about " November 1, 2023 version 4 will be deprecated and any updates to existing apps will first require you to migrate to PBL version 5 or newe"
What is the preferred way to test if a player has already purchased a non-consumable product?
hello, I need some help pls.
I have finished my game and when I test it on my mobile it crashed, so I connect it with logcat and this is the logs
I don't know what I should do with these
2023/10/16 21:25:37.105 29942 30017 Warn Adreno-GSL <sharedmem_gpuobj_alloc:2736>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
2023/10/16 21:25:37.105 29942 30017 Error Adreno-GSL <gsl_memory_alloc_pure:2614>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
2023/10/16 21:25:37.106 29942 30017 Warn Adreno-GSL <sharedmem_gpuobj_alloc:2736>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
2023/10/16 21:25:37.106 29942 30017 Error Adreno-GSL <gsl_memory_alloc_pure:2614>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
2023/10/16 21:25:37.108 29942 30017 Warn Adreno-GSL <sharedmem_gpuobj_alloc:2736>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
2023/10/16 21:25:37.108 29942 30017 Error Adreno-GSL <gsl_memory_alloc_pure:2614>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
2023/10/16 21:25:37.121 29942 30017 Error CRASH *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2023/10/16 21:25:37.121 29942 30017 Error CRASH Version '2021.3.8f1 (b30333d56e81)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
2023/10/16 21:25:37.121 29942 30017 Error CRASH Build fingerprint: 'HONOR/ANY-LX2/HNANY-Q1:13/HONORANY-L22CQ/7.1.0.157C185E63R2P1:user/release-keys'
2023/10/16 21:25:37.121 29942 30017 Error CRASH Revision: '0'
2023/10/16 21:25:37.121 29942 30017 Error CRASH ABI: 'arm'
2023/10/16 21:25:37.123 29942 30017 Error CRASH Timestamp: 2023-10-16 21:25:37+0300
2023/10/16 21:25:37.123 29942 30017 Error CRASH pid: 29942, tid: 30017, name: UnityGfxDeviceW >>> com.kmdeveloper.clone <<<
2023/10/16 21:25:37.123 29942 30017 Error CRASH uid: 10110
2023/10/16 21:25:37.124 29942 30017 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xd8
2023/10/16 21:25:37.124 29942 30017 Error CRASH Cause: null pointer dereference
2023/10/16 21:25:37.124 29942 30017 Error CRASH r0 00000004 r1 00000004 r2 00000000 r3 00000000
2023/10/16 21:25:37.124 29942 30017 Error CRASH r4 dfc262e4 r5 f0b8cdec r6 dfc26394 r7 00000000
2023/10/16 21:25:37.124 29942 30017 Error CRASH r8 dfc24040 r9 f0b8c950 r10 00000000 r11 f0b8cc5c
2023/10/16 21:25:37.124 29942 30017 Error CRASH ip f0b8c950 sp b068b538 lr cd7d353f pc cd87f742
2023/10/16 21:25:37.125 29942 30017 Error CRASH backtrace:
2023/10/16 21:25:37.125 29942 30017 Error CRASH #00 pc 0017b742 /vendor/lib/egl/libGLESv2_adreno.so
this is the logs
pls is it possible to use my windows pc to build my game to ios app store?, am planning on diving into the IOS App store market since google play store is trash at the moment but i dont own a MacBook...so is it possible
I think this will be helpful to you. you can use virtual machine.
https://www.youtube.com/watch?v=FdyuY1FhtqE
This video will show you how to develop an iOS app in Windows and then easily transfer the project to a Mac virtual machine.
Note: you should already have a Mac Virtual machine already set up with Xcode and Unity installed and your developer settings linked to Xcode.
those warnings about running out of gpu memory are probably a good place to start
OSX performance in a vm on windows is pretty abysmal just heads up
any idea why 3d game gets very pixelated and low quality in android mobile build? I have already checked basic quality settings and player settings.
Do i have to install unity in the Virtual machine?
Cuz in the tutorial it seems the guy has unity installed in the Virtual machine, i thought I only needed a file to put in xcode
i bumped up the DPI
How do I let the user upload a music file from their device (wind/and) from the start scene and then use it as a BGM in my game scene?
I can't find anything on the net
i want to get into mobile development. any tips where to start from? any good tutorial or something like that?
Depends what your previous experience is.
In general Unity Learn has multiple pathways. I highly recommend those to get a good foundation to build from.
In Unity mobile development is mostly the same as any other platform, except you'll be using touch instead of keyboard inputs.
ok tyvm
I didn't try that before. but I think you have to install unity in the virtual machine
What went wrong:
A problem occurred evaluating project ':launcher'.
Failed to apply plugin [id 'com.android.internal.version-check']
Minimum supported Gradle version is 6.7.1. Current version is 6.1.1.
How to fix this?? Unity version is 2020.3.33f1,
stopped assembling the build almost out of the blue, just for my version of unity 6.1.1 gradl is listed in the unity docks
How to update gradle version?
might be a stupid question but is this considered 3d? no its 2d right?
If the characters are sprites instead of 3D models then it's 2D
If the environment is 3D it could be considered 2.5D but doesn't look like it
Hello there, I had answered this previously for someone. Unity fails to download the latest Gradle until you go to Edit->Project Settings->Player->Android Tab-> scroll down and check Custom Main Gradle Template. Then when you go to build it should popup a window asking to update the Gradle version.
When in IL2CPP I get
Error Unity Could not produce class with ID X
how can I know what class it's talking about? Can't find anything on google!
Send the full error(s) and when you get the error @rotund jungle
And update Unity to the latest bugfix version if you're on an old version
how can i import model at runtime in unity for mobile
currently my code only work for PC
Is your problem with reading a file on mobile or just the importing?
yes it cant read file on mobile
Where is the file you want to read?
Maybe this helps: https://forum.unity.com/threads/load-file-in-android.890344/
i want to make a game similar to idle heroes and afk arena. can anyone recommend me a way to start learning how to make a game like that?
how to get your game to mobile
I know this isn't code related but i need help, i've been trying to figure out why i can't build my mobile game and keep getting this error.
I'm getting a similar problem did you manage to find a fix?
You'll have to show the entire error message
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-33 Android SDK Platform 33
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
For people who may face the same errors in the future,
The problem was there is no licences file in /Users/username/Desktop/2019.2.9f1/PlaybackEngines/AndroidPlayer/SDK.
So I copied the file from /Users/username/Library/Android/sdk and paste it to the unity directory above.
The errors was successfully addressed.
I wish nobody wasted their time anymore because of this error.
I don't have those directories
There are other answers on that page
If they don't help, there's even more here: https://www.google.com/search?q=unity+"Failed+to+install+the+following+Android+SDK+packages+as+some+licences+have+not+been+accepted."
i keep getting this error in my cmd
nvm i got it
Thank you for your help!
@analog plover spoke too soon
still doesn't let me build
> Failed to install the following SDK components:
platforms;android-33 Android SDK Platform 33
The SDK directory is not writable (C:\Program Files\Unity\Hub\Editor\2022.3.12f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK)
I'm really on my last legs with this.
https://pastebin.com/75d3PT42
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
So after all the work i put into making adds with ironsource they are making me move to tipalti ?
I have low fps 5-8 in an empty scene on android
testing on an old j5 samsung - so low spec.
Still 5 years ago could build and easily get 60 fps
maybe time to install an older version of Unity
Is URP not compatible with mobile?
Okay, just tried a build with 2019 - steady 30 fps. Go figure.
The hell’s Tipalti?
Why is it that when object’s are enabled through object pooling that they still lead to frame drops?
@spare mortar
can someone please help me, i keep getting this error when i try to build my game to android
https://pastebin.com/75d3PT42
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Probably missing some settings from newer Unity versions tbh. A few fps different is possible, but 3-6 times as much doesn't seem plausible
Set the target API level to automatic if it's not there already.
Also, do you use the sdk and ndk installed from Unity Hub?
And do you use any custom android publishing files?
API level is on automatic,
yes i just used the basic install from unity hub
and i don't use any custom android publishing files that i know of.
Is installed with Unity checked in preferences - external tools?
And what is your unity version?
2022.3.12f1 LTS
opening the project rn
Looks good. Can you screenshot the publishing tab of the android player settings as well?
And the min/target sdk section while we're at it
Could you try setting target to 32 or 31?
If that doesn't work I'm out of ideas tbh. Maybe try the forums as well for support
it's actually so annoying i've tried everything
all i want to do is make a basic game for when im boring lol
i've built it i just want to get it on my phone ;-;
i don't know what i could be doing wrong
@sleek eagle do you think downgrading my unity version would do anything?
Owh you already got the apk out of it?
Very unlikely, but anything is possible haha
no i mean the game is developed yeah
i can build to my pc but not to mobile
(╯°□°)╯︵ ┻━┻
I thought as in making a build. Got it.
I'd give the forums a shot
been there
spent a whole day trying stuff
@sleek eagle question, does pressing these matter?
before i had it on Current Platform
apparently going back to 2021.3.16f1 works and it built
Not really
Nice!
Maybe file a bug report for it? Then it can be fixed in the future
how do i do that? i've never done a bug report
In the editor (preferably the version with the bug) click help - file bug report and fill out all info.
Also reference which versions do and don't work
Hello there, not sure if you fixed it, but I've seen a number of folks (including myself) have issues with the Gradle version error. Unity fails to download the latest Gradle until you go to Edit->Project Settings->Player->Android Tab-> scroll down and check Custom Main Gradle Template. Then when you go to build it should popup a window asking to update the Gradle version.
Thanks for your suggestion, I'm going to try it out rn!
Yeah please let me know if it works for you. I spent days trying to install Android Studio, other Gradle versions and whatnot. This is the only thing that seemed to work.
yeah i installed Android studio to see if that would fix it, I used CMD to accept all the licences and nothing was working.
@heavy wraith Okay i've got unity open where about in Android Tab do i find it?
it should be at the bottom in the last section. Its a check box.
yah
hmm... I don't believe I had to do anything else to get the popup to update. Let me play with it a bit here.
what version of unity did you use?
2022.3.10f1
Basically every time I've upgraded since 2022.1 its broken my ability to compile for Android
So I go through this process of fixing it
Heh
You'll experience 500,000x more frustration than this in your journey. Just be warned. Game dev is for the self-flagellating types.
Make sure all of that looks similar under Preferences->External Tools
Ok so we figured it out...
Turns out you have to put the min and max Android SDK to the highest.
And then when you build it will detect it needs to update the Android SDK.
Then you can turn them back down if needed.
Not sure if doing a Clean Build changes anything but thats what i did and it worked out ^^^^^
Hello! Does anyone know if event triggers work on mobile? Because it works totally fine in my computer, but doesn't work at all in my phone. And the problem aren't the buttons, in my phone I can see that they're being pressed because the color changes, but nothing else works, any solutions? Thanks!
I've had no problems with them. I do know that there was some raycasting issues on mobile vs the editor/windows, but that was just how the engine wasn't properly blocking raycasts with the UI.
so what do I do?
What kind of phone are you using? What version of Unity?
How have you implemented the event system?
I'm using a redmi note 10 pro, with unity 2021.3.15
thank you so much for the attention
No problem, just bringing up my project to compare.
What does the button script look like?
For the right/endright functions.
Oh. I see you have pointer up/down, I generally have those as OnClick().
So you are trying to do one function when it is depressed and another when it is released?
Yeah, but I nees to know when it clicks, and when it stops clicking
yes
because of some inconvenient, I had to write it in 2 codes
I am concerned a Pointer device isn't the same as a touch/click device.
I'm reading up on it.
cc is the reference to the code in the right
that could be it
You have an EventSystem object in your heirarchy for this scene right?
yes I do
You might skim that to see if something jumps out at you.
Perhaps add some debug statements in the trigger to see if those get called?
When I debug on Android I can still get the debug.log messages
I assume you are doing Build and Run with the device selected to automatically push the APK to it and connect the debugger?
do you mean in a build?
my phone for some reason don't detect my computer
when I plug it to the computer, it just charges, I can't use unity remote 5, or build and run directly
I have to build the apk normally, and then download it on my phone via mediafire
Have you turned on USB Debugging and Developer Options on your phone?
yes
Your chances of successfully developing will be very low if you can't debug live. Hmm.
In my old phone, when I connected to the computer, it asked if I wanted to only charge the phone, or if I wanted to transfer files or images, that way unity remote 5 worked.
Hello, has anyone had a problem with IAP in Apple Store recently?
My IAPs are correctly loaded when I run the app in TestFlight, but the same build does not load the IAPs in the store version, what is pretty weird. It should behave the same way in both environments, I guess
I've read that upgrading the IAP version from 4.9.3 to 4.9.4 should do the trick, but it didn't work for me ):
Does anyone know if it's possible to access and use Airdrop features on iOS through unity?
And if not, is there some standard similar feature or set of features that can be used (NFC or something)
For sharing files such as text files, images
you can access any native features via custom plugin. I would try to find an asset first, and if you can't find a free/reasonably priced one you can build it yourself: https://docs.unity3d.com/Manual/PluginsForIOS.html
Thanks I will look more into this
Yeah, I was wondering about that, y’all think it’ll affect stuff too much?
does anyone know why my game looks normal in the editor but when i build it, it stretches it all out?
its in 16:9 portrait
change the editor drop down "16:9" to your phone resolution or something similar and see the change in unity
you need to learn how to use the canvas scaling tools int he canvas
and scale the canvas by screen width
install an apk emulator. I installer android studio and installed an android emulator... and changed the target android version
The problem has been fixed already but thank you
It's not just the canvas its scaling the whole world, because some of these objects such as the black bars are just 2D sprites with colliders
Unity on mobile and graphic "tiers". would make sense to have a shader collection per tier for pre-warming purposes? I assume is a waste to have shaders for all the tiers always in memory correct?
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Could not load custom lint check jar file C:\Users\flyup.gradle\caches\transforms-3\457c9aefd699be970997b92c211894aa\transformed\androidx.annotation.annotation-experimental-1.3.0\jars\lint.jar
java.lang.UnsupportedClassVersionError: androidx/annotation/experimental/lint/ExperimentalIssueRegistry has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
what am i doing wrong
Has anyone found a solution for this?
Hello! I'm currently trying to add two buttons to my mobile game. I saw some videos of people using event trigger, and it worked for them in their mobile, but in my mobile the buttons don't do anything. I am sure that the buttons are being pressed because of the color changing, but nothing else really happens. Does anyone know another way to know when the button is pressed and when it is released? Thanks!
Check for errors with logcat.
Maybe you mis the event system?
Does it work on PC?
there are no errors, I have an event system, and it works for me on my pc
How did you check for errors?
I've been running into some weird rendering issues specifically on Android 14 devices recently. These lines appear on almost every 3d object and move with camera movement. There's also flickering of lighting and reflections when the camera moves. I'm using URP with my project. I've checked lighting, reflection, urp pipeline settings and haven't figured out what might be causing this. I'm using 2022.3.12f1
on the console, right?
You can see logcat logs in the console, but checking logcat can also be very helpful, since sometimes it shows more errors from the system
YOu can use the logcat package
Does it still happen if you disable all shadows?
Can you share the URP settings as well?
Ok thanks! I'll try that
question, i want to make a swipe.. and detect all the objects that my swipe go through
like if you have a 2D object with a collider, i want to know what function(s) that help me detect that object
[note: I am using the input system]
Hi everyone !
I have a very annoying bug with my app : I need the users to take pictures in order to use the app, but on Android 13 and iOS 17, the camera is black, and the pictures taken are also black. It works fine on other versions of the OS.
I've searched unity forums, Google etc but i can't find answers to this problem.
I run on 2019.4.40, and I need the picture to be taken within our interface, not with the native camera.
Do you have any idea what is happening ?
Thank you ! 
Here's my URP settings. I disabled shadows and reflection probes which helped with the blinking when the camera moves. The lines still appeared until I disabled most light sources in the scene. No issues running in editor, iOS, or Android devices < API 34
Only thing I can think of is maybe trying Forward instead of Forward+?
Otherwise maybe post on the forums as well
Definitely a weird issue
Also if the project is small a bug report might be nice
Wow using forward instead of forward+ fixed it!
Could you file a bug report for it? It's obviously a bug and should be fixed
Will do!
Recreated in a fresh project using forward+
Say I implement unity ads and it works on build but not showing actual ads just unity logo, when will the actual ads show up in build. How does the game know its a Google play build and not just a test?
You used to have to put the app ID from google play in the ads dashboard - don't know if this is still the case
I’m thinking of making an android game, would I be able to use my IPhone for Unity Remote for testing? I’m using Windows 10 and I don’t have a working android phone
I suggest to setup the project in a way that you can test in editor with mouse and maybe keyboard inputs (also means you can easily port to PC if needed)
Unity remote can be very unstable and usually is not a great way to test your app
It's also just streaming a video to the mobile device
Thanks for the advice
When I first build my game to my android I overall get 60fps but when I simply force close the game and play it a couple more times, it starts to overall drop in fps and never seems to be able to go back up to a constant 60
Check the profiler and make sure you're not using an old unity version
I’m using 21
Which release exactly?
2021.1.0 is like 2 years old by now. You could try the latest lts version
Oh is that considered old haha
Could you explain why would that have a negative impact on my game when built?
There are bugs in older versions which can be fixed now
Especially android was in a rough state a bit ago
After all this if it turns out its that imma gonna lose it
I read somewhere I was ill advised to update unity when building a project as it can further lead to game project issues
Stuff changes, especially if you are doing major updates. But within the same yearly release issues are smaller, and within the same bugfix version there are very little issues.
It's also bad practice to make your project in a way that you cannot upgrade anything (;
Yeah I agree, when profile I get stuff like gfx.sophomore which a little challenging to find what exactly is causing the problem
Sounds like vsync issues or high GPU load.
Maybe give the frame profiler and/or renderDoc a go
Frame profiler? will looking at the gpu profiler help?
GPU profiling helpt a little bit, but doesn't give enough info.
I meant the frame debugger btw
How is frame debugger different from profiler
It shows all draw calls made to the GPU.
But renderdoc shows more GPU timers
If I’m looking for 60fps do I have to make sure that my time step is 0.016777
No, that's for physics/fixedUpdate
It's either a bug or a performance issue if you cannot maintain fps
Honestly I’ve been struggling for weeks, I’ll try to optimise, patch it. It would run at 60fps the first time I run it but each time after it will just drop to 40. So It makes it so hard to work out what’s wrong
That's why you can use renderdoc and other profiling tools
also logcat for errors, maybe there is an error being looped
could be thermal throttling if you're just barely managing 60 fps on first run, normally you leave 35%ish headroom in frame budget to account for the device slowing down
im trying to run it on a s10 android which is only a 4 year old phone, my game is not that intensive either, what do i do about older phones
How does renderdoc work?
Google documentation
it's not too hard to do something that performs horribly on mobile devices so "not that intensive" isn't very useful. Profile your game and see how much time it's taking per frame, especially gpu. 16.7ms is needed for 60 fps, so you're aiming for somewhere around 11.5ms
exclude the time the gpu spends waiting on refresh obviously
I would not recommend 60 fps on mobile, the majority of phones get too hot to be fun experience after a few hours of play.
but then 30 always feels so chooppy
You can try 45, as a compromise
Where can i install, JDK SDK and NDK just did a version update and the 3 files dont seem to be there
Sounds like (maybe) thermal throttling. The GPU is warmer than it should be, so it is slowing down the game. And it may not speed back up after.
The last fully stable version of Unity we tested, and our QA team cleared, is 2021.3.14f1. But sometimes small bugs like a platform specific issue can sneak through the versions. So getting a formal stable build you can rely on is important. We also support a large number of platforms, so we need it more stable than usual
In other words, I'd also try a few unity versions
But profiling is the best idea
Why not make it user selectable with a warning for heat?
I personally always set games on mobile to 30 for longer battery life and lower heat, but the option is nice
Appreciate it, I’ve updated to 2023 and I’ll try to profile it today and see what I get
I don’t mind doing it at 30 it’s just when playing it feels a little choppy even though I’ve set it and it’s running at a constant 30 fps it just doesn’t seem as smooth
If you start out in 30 it's a lot less noticeable. That's why you give the option for those with high end phones
Don't ever put your mobile game on 30 fps
Trust me, been there, it's better to put it on cap 60 fps for smooth gameplay.. People don't really get bothered and it's not like the phone will overheat to a point of explosion.. Nope
The only downside can be the battery but again most mobile devices comes with strong battery capacity so it won't be an issue
I appreciate everyone’s answer but I’m getting different answers here I’m lost rn haha
Yeah I ll add an option where people can change
Having been focused a lot on profiling here lately for a mobile 2D game, there is a massive performance difference between Android devices released in the same year, and between Android and iOS devices. I'd argue some of the newer iPads rival my desktop for performance, while the kid's Android tablets are potatoes despite things like 8-core CPUs and 2GB+ of RAM. It takes some trial and error to identify the cause of slowdown on a given platform. So, it is not relevant to say "This thing is only X years old this should work better"...
Good performance can usually be obtained, but much care needs to be taken to approach it properly.
One example is with URP 2022 LTS, I can get 60fps with a 10k tilemap and 100 NPC sprites running around. But add a single point light and it drops to 30fps. Add 3 and its at 10fps. A different Android device from the same year can handle hundreds of point lights without sweating. So, I recommend going with unlit shaders, no normal maps, no point lights, etc on lower end devices. Then you can enable things on higher end hardware. Physics is another area you can get into trouble with on mobile. Its a learning process and you just gotta keep at it. Tough when you are an Indie with limited access to devices for sure!
thanks for the feedback these are some really good points ill keep them in mind
hey, so I've updated to 2023, gone into the project settings and make the quailty very low, could you help with making sense at whatt the profiler is trying to tell me here?
You got a quite high tri count and a moderate amount of setpass calls/draw calls
Most likely a GPU issue then.
Again you can find more info in render doc as it shows all the render passes. Otherwise try different optimization steps like changing shaders (to mobile shaders for built in and simple lit or baked lit for URP), add LODs if needed, etc. Trying native renderpass and using vulkan with graphics jobs could help as well depending on the exact issue
I cannot help much more without being involved in the project
Owh if you check the render thread in the hierarchy you see post processing takes a while, so take a look at that first
Thanks ill kepp that in mind, after the update my game is running like ass now, cant even get to 30fps
how do i change a shader to mobile shader?
On the material look at the shder drop down. You use URP so use Simple Lit!
Yeah 2023 is not the best for production. But if you tune the URP settings and post processing you can get good performance as well
great....
Would it be a good idea to hide objects and test and enable them one by one, to see which is casuing the problem
Unless you do something very unusual it's most likely not 1 object.
And as I said, the render thread points towards post processing
sorry, where can i find render threads?
In the first screenshot
wdym by takes a while, im trying to understand how i can spot issues
it also looks like you profiled the editor play mode, ideally you profile on your actual device
I did that was the profile while running on my android
It takes 28ms
when looking at the hierarchy am i looking at time ms or self ms to be less than 0.016ms or is it a different value for 30 fps
Look at the screenshot and check the render thread, or in hierarchy change main thread to render thread
does this mean my bloom is whats cuasuing the lag?
ahh i think it might of been
im going to be very angry with my self if it was
ive turned it off and have 60fps on the s10
im going to freak
okay but i do have a lot of glowing stuff, so how do i bring that back?
You can tune the bloom settings for better performance (but lower quality), or you can use 3rd party bloom tools from the asset store.
Bloom basically has to render the screen multiple times, which sucks on mobile GPUs
I see okay. Thanks for all your help btw
You're welcome👌
anyone who can help with shader variants filtering to optimise the number of shaders permutation?
Does any know how to fix a scene that crashes when loaded on an android build apk?
dont load anything at once
Is it possible to intergrate a unity game into reactnative?
Is it possible to intergrate a unity game into reactnative for ios?
Yes
Could not find com.ironsource.sdk:mediationsdk:7.5.2.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/sdk/mediationsdk/7.5.2/mediationsdk-7.5.2.pom
- https://repo.maven.apache.org/maven2/com/ironsource/sdk/mediationsdk/7.5.2/mediationsdk-7.5.2.pom
- file:/C:/Users/ThinkPad T460s/Documents/Games/2048/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mediationsdk-7.5.2.jar
- file:/C:/Users/ThinkPad T460s/Documents/Games/2048/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mediationsdk.jar
Required by:
project :launcher > project :unityLibrary
does anyone know how to fix this gradle error?
Guys I'm so lost. Is it even possible to make it so that you can send notifications in-code to other app users
Because all the tutorials I've seen are about timed/delayed notifications after closing the app or whatever
guys, i am using the new input system on mobile platform, and i want to detect my finger going through objects.. how do i do that
Hey is someone familiar with unity ads? Because I tried implementing ads into my game and they show up in the editor but not in the final build and every video on this topic just shows how they work in the editor and they never confirm if it works in the build
Be more specific. Your finger never moves through anything.
I think you can just do raycasts?
idk how to explain, think about it like in one of those matching games where you need to move your finger across three gems of the same color... how do I detect those gems with my finger moving
Probably raycasts?
how do i use a ray cast based on my finger's position
That's very basic.
Google unity raycast 2d mobile or something
And maybe check out Unity Learn for the basics as well :p
alright sure,
maybe i should 😂
Worked
Hey guys, I had some questions regarding mobile keyboards.
First, I was trying to move my chat frame upwards as the virtual keyboard opens in mobile phones, I couldn't find any ways to know the size of the keyboard. TouchScreenKeyboard.area doesn't return anything useful and the code pieces here https://forum.unity.com/threads/keyboard-height.291038/ didn't help either.
Second I wanted to call a function to send my message whenever the user clicks on the Done button, The On End Edit action on the input field triggers when the user clicks on the Done button or when the user closes the keyboard. Is there any ways that I can check if the button was pressed or not?
I'd be grateful if anyone could help with these problems.
Hi, I wonder if someone has an experience with texture formats on mobile like .tga/.bmp and question is, did you have any problem with that type of formats like addressables, unpacking and applying textures by shaders?
Right now in a project we are using .png/.jpg
I've seen in some project(also mobile) that requirement for textures and because of that I'm wondering
When you build a project Unity will change it to a better format. So PNG and TGA both are lossless, so both will be compiled into the same texture when you build (and PNG is a lot smaller, so that's more recommended for my productions). So as long as the images are lossless, it does not matter which filetype they are in Unity afaik
JPG is already compressed, meaning the image goes to 2 compressions steps, potentially lowering quality.
On android ASTC is the best compression, but ETC(2) has more compatibility on very old devices.
Got it, thank you very much
Hello, my app has a rewarded ad feature sometimes the ad never loads until I restart the app a few times. I was wondering if there was a fix or anyone has encountered this problem before?
Any help is appreciated