#📱┃mobile
1 messages · Page 4 of 1
i've now tried both solutions combined, it doesn't work, im getting this error:
pls dont ignore
please let me know if you're still here trying to help me
I've posted a stackoverflow question for my problem: https://stackoverflow.com/questions/74745443/gradle-error-when-building-unity-project-for-android
Sorry, busy day over here. Stack overflow is the best place. The error is the same, for some reason Gradle isn't installing the SDK tools you need. It's not an easy one to explain over discord
Gradle errors are always fun and cryptic at times. To make it worse, some versions of unity ship with broken Gradle installs. So it can be quite frustrating until you get an abnormal amount of experience with gradle
i get that, is there any way i can fix the correct gradle install (maybe by reinstalling unity or by installing different version)?
Yeah, a few sections up, folks are tackling the same problem. You can customize a Gradle properties file to specify the settings. Or manually run commands to install the missing SDK to Gradle. But it's just hard to explain over discord
btw, do u think i can delete this folder
It's one of those things that takes a few seconds in person but a lot of text online
yes, but there were no answers in the stackoverflow questions
No I mean someone had a very similar problem in here yesterday in the #📱┃mobile chat
this is maybe a lot to ask, but can you try using teamviewer to fix my problem?
oh k
or just like any way that its easier for you to explain to me?
if you tell me exactly what to do, i could probably do it
Hey everyone, getting this weird error when I try to build:
(21,70): error CS0234: The type or namespace name 'AndroidExactSchedulingOption' does not exist in the namespace 'Unity.Notifications' (are you missing an assembly reference?)
(21,9): error CS0103: The name 'NotificationSettings' does not exist in the current context
But I am not sure why:
I am building for android using this API:
if you're still here, pls explain to me your solution
if you have time ofc
you don't have the right version of the unity notifications package, based on the docs you need 2.1+
I think its solved, just need to test now and see 🤞
I'm trying to debug a crash stack trace from google play console using
[path omitted]\android-ndk-r25b-windows\android-ndk-r25b>ndk-stack -sym "C:\Program Files\Unity\Hub\Editor\2020.3.33f1\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\mono\Release\Symbols\armeabi-v7a\libunity.sym.so" -dump [pathtocrashstackfromgoogleplaytextfile]
the input text file starts with
pid: 0, tid: 0 >>> [appname] <<<
backtrace:
#00 pc 0x00000000000f74da /vendor/lib/egl/libRBGLESv2_adreno.so (rb_vbo_getptr+38)
#01 pc 0x00000000000b5fb3 /vendor/lib/egl/libRBGLESv2_adreno.so (stream_buffer_object+46)
#02 pc 0x00000000000b64f3 /vendor/lib/egl/libRBGLESv2_adreno.so (core_glFlushMappedBufferRange+518)
#03 pc 0x00000000004a0d1c /data/app/[appinstallpath]/lib/arm/libunity.so
...
and I'm getting an output of
********** Crash dump: **********
(and no further output). Any idea what I'm doing wrong?
Got a real weird one here: I own a Google Pixel 3 and Pixel 6a. I have a tiny project that runs at 240fps on my PC and 60fps on the Pixel 3 but when I put it on the Pixel 6a, it runs at 15fps. I've tried setting Application.targetFrameRate to 240 and 60, didn't fix it.
Two oddities I've noticed in profiling: 1 - The game actually runs faster when I'm tapping the screen and interacting. Once I stop, it slows down again. 2 - When I hit the multitask button to change active application, it begins running at 60fps.
I can provide profiler information if anyone thinks it'll help them diagnose it.
I have no clue what's causing this
any help?
im trying to add ads to my game using mediation but it doesnt seem to load
Hey folks. I am developing in Unity 2022.2 in Windows for an iOS target, move over the folder to my Mac, and compile in XCode and deploy. But this workflow only works about 70% of the time. For reasons I cannot explain, sometimes the Windows build process adds an IL2CppOutputProject in the folder, and then XCode barfs in its build process with unhelpful error codes. The builds that succeed are when Unity does not make this folder. I cannot determine why, as the build options are rather straight forward. Figured I'd ask and see if anyone had ideas?
did u like sync ur unity hub with ur dashboard? prolly bcuz of that
I have logged in in unity hub, It says my game IDs in project settings but whenever i try to open the code editor its completely empty
can u send ss , that might help
which part exactly do you need ss at? project settings?
yea
alright am loading the project
oki
did u try logging in , in the services section , in project settings
i had similar issue with my game when adding ads , that helped me out , idk much more than that though , but with the ss provided , i am sure others can probably help u out
i logged in an selected the organisation aswell
okioki
i might be wrong but , u kinda dont need to touch the ads section if u are using mediation , check the mediation window if everything is looking oki there
Doesn't look like you installed the Ads package...
You have to hit the install button...
I've got Advertisments with mediation from package manager
Ill send you a screenshot once I get on it
I may have to look at it tomorrow after I get up...
if u are not using admob for this game , try uninstalling it once , the warning should probably go
the game id the game is asking for might be the one for admob
these are my settings from the dashboard
eh ill just get rid of mediation
doesnt seem to work with me
okioki , sorry i couldnt help much , a noob myself
its alright i think my project is cursed haha
but hey AdMob works fine now
aside from mediation
Hi maybe this is the right place to ask. Does anyone here know how to go about creating something like prisma 3d app?
I had to google what it is, but it wouldn't be too hard to replicate technically just a lot of time to duplicate the feature set.
There are probably open source alternatives for Unity you can download to get started with
We've built a few modelers and sculpters for VR. It's mostly just time consuming getting good UX the first few times around.
Something like this has the base functionality
How do u guys save your level progress , like i wanna save which levels are unlocked , which are completed so on .
Should i use multiple dictionaries<string,bool> or something else , really need help figuring this out
@wild spruce I usually have 4 classes. A master data class for loading/saving serialized files
It has 3 sub classes, User Settings and Session data.
Session data resets automaticslly every launch (it tracks how many enemies you killed this session for example)
Settings data is for all users and levels, contains things like volume. It auto loads and saves on launch.
User data is what stores all the individual achievements and level things for that specific save game. It is manually loaded when they select a game save slot.
In your case, I'd probably store a list of Levels and their Success stats in the UserData. That way you can create multiple save games and users. I personally wouldn't use a dictionary, I'd use a custom class as a LevelDescriptor, with the LevelName as probably an enumerator. This way you can track more such as coins collected, and other metadata
That's awesome, thank you!
Thanks a ton , really
Can anyone tell me what to do i am getting this error while uploading the abb file on playstore
Anomalous Permission Usage
Your app is requesting permissions which are used by less than 1% of functionally similar apps:
android.permission.GET_TASKS
Users prefer apps that request fewer permissions, and requesting unnecessary permissions can affect your app's visibility on the Play Store. If these permissions aren't necessary, you may be able to use alternative methods in your app and request fewer permissions. If they are, we recommend providing an explanation to users of why you need the permissions.
Note: This guidance is based on a comparison with functionally similar apps, which change over time as new apps get published and existing apps change behaviour. Therefore the warning may change even if you don't change your permission usage.
It's a warning, not an error
why are you requesting that permission? remove it from your manifest
i cant find the permission in my manifest
i searched entire solution there is nothing like android.permission.GET_TASKS
do you have any third party package that might be adding it? export to an android project and see what the merged manifest looks like
yeah in android studio i was able to see the permission
but i think i can edit from there
cant*
you can't, but now you have confirmation that it's being added. Are you sure you don't have a postprocessing script somewhere? and it's not in a custom android manifest?
let me check
cant find anything
i checked all the manifest file present in the project and there is nothing
then there is a postprocessing script somewhere editing it when you build
what is postprocessing script?
so i found the scripts tried to comment out the code written on in and still the same case
did you do a clean build to the new folder? Maybe it is being added in more than one place
Why do you have scripts adding this permission in the first place, though?
Not sure i am just updating the existing project
Will it create any problem because its submitted and after that its showing this
The warning tells you what the consequences are
So i have a static scene (like the level is made and the camera is static on the scene) as i see that the different android phone have different resolution so how i can i make that scene dynamic?
Suffering from a bug in 2022.2.0f1 for compiling Android IL2CPP, seems like it throws clang: no input files on Linux, any solutions?
ok it seems providing a local installation of the same NDK fixes the issue
hey everyone, is samsung store supported with unity IAP ? I updated my Unity IAP and in the doc I find no documentation for samsung
whereas in version 3 it had a dedicated section
apparently it works out of the box if I understand the documentation correctly
sorry for the late reply, i fixed it by upgrading to the latest LTS Unity version
Hey Unity Game Devs! Gameboard (https://lastgameboard.com) is giving away Gameboard Dev Kits to indie devs who are interested in developing multi-user, tabletop games! We have a robust Unity Pre-fab to take advantage of Gameboards functionality (Dev Guide :https://lastgameboard.atlassian.net/wiki/spaces/DC/pages/757530631/Gameboard+Developers+Guide), and can provide example code to help you take advantage of our multi-user interface, object identification and companion device networking. Please email tim@lastgameboard.com if you are interested in applying to the program!
This isn't really a space for ads or self promotion
so when i play my game in the editor the camera is correctly displayng but when i export it to my phone, its like shrinks the view horizontally so to keep the resolution to the correct aspect ratio
basicly how do i make it respect the width and change only the height
it respects theheight and changes the width
i want it to simply respect the horizontal and change only the vertical
people with all kind of aspect ratios will play it
so im asking just to make it flexible on one axis
What's actually the issue... the UI?
You should be using the device simulator for mobile regardless
Maybe, and bear with me here... you should share screenshots of the issue 🤔
i dont want to show the game, so let me put it simple
imagine a sphere, on PC the sphere perfectly fits in the view,
I'm out then
on my phone the sides of the sphere are cut from the view
i think thats very simple explanation
you have to understand that i dont want to share the idea
no one is going to care enough to steel your idea
well sure but still
is it possible for variables to be tampered when it is installed on android ?
It sounds like you just want to move the cameras depth manually based on the screen horizontal. There are a lot of ways to do that, but that's the quickest way to do what I think you want to do. Pure guess though as no real info or context was shared.
You probably want
Screen.width and transform.position.
And simply push the camera back on the Z axis, multiplied by the screen width/height ratio (to counteract the Unity view scaling) and multiplied by the perfect test screen width divided by the actual screen width (device difference)
Or buy this maybe
https://forum.unity.com/threads/camera-fit-screen-handler.393154/
thanks i think this might be it
Does anyone know how to get touch input without generating garbage collections?
I get this spikes when tapping the screen, with also the GC Allocs
The way I currently get touch input is: if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began) { Some Code... }
(I've also tried using a panel covering the screen as a button)
I'm getting an odd crash on some Android devices, anyone has an idea what the cause might be?
Usually a graphics issue
Which unity version?
Which render pipeline?
OpenGL or Vulkan?
I think its the GetTouch(0) part. No way around it. Maybe with the new input system, but not sure.
400B of garbage is nothing to worry about tho
Hi, my game is lagging alot on the android platform because of the high resolution, what can be done to get all the resolutions suitable for the device so the player can choose from it? I tried (Resolution[] resolutions;) but it's getting the current resolution only, thanks.
In URP you can use the render scale to do this, while keeping UI at the proper resolution
Have you profiled it to be sure that it's the resolution?
Oh thanks, I look into that, but I mean what resolutions should I add for the players to choose from? SD, HD, and FHD? For example these definitions will not look well on a tablet, so how can I get the best resolutions for the current device? Or should I list all the possible resolutions? Thanks
Yes it's lagging even on simple main menu scene with just buttons.
ok.. and _what did the profiler show _??
I don't yet understand the timeline view very well.. if you click this you can change it to the raw something, which IMO is clearer to understand
Also, if you click on the rendering section, that will give some details down below that might be useful to you
That's the scene it has nothing in the Update only buttons which execute simple functions, It's running on a Samsung Galaxy s8 with 1440 x 2960
Then it's not a resolution issue. Do you use urp?
If so, is maybe bloom and ssao are on?
@wise lily
Yes I'm using URP, but in this scene there is no post-processing applied and it's lagging
Thanks!! It's a lot faster, I didn't know that SSAO needs a lot of power
It's like 20 times faster!
Yepp
It sucks on android sadly
I complained already but it won't be exclused in balanced sadly
Yes I'm using it for imported 3d models on runtime it definitely makes things better.
I'm checking the asset store there is a bunch of SSAO effect may be made better for android
OpenGL, but I don't think this is a graphics issue.
The crash only happens after we introduced some audio related features using NativeAudio, and the stacktrace points to audio related things too.
can you help me. I will build a apk fore android but thies are the errors
@terse reef
@solid quest Do not ping users into your questions. #📖┃code-of-conduct
Hello, I have a problem, I want to put a video in a scene as a splash screen and the video plays in the editor but when I do the build for android it doesn't play, does anyone know what it could be? I get this error in logcat:
For native list with temp allocator, is it better to create it again or clear it?
For example for a list with 100,000 members
and at least for private methods, I want to pass value type arguments as ref type. I would like to use ref instead of in although arguments are just inputs because I will be sure there is no defensive copy at all, any suggestion?
can Unity build on any older android version or is it limited? I would for example want to build on Android 6 with unity 2021
You cannot build for lower than the lowest API in the player settings afaik
Less then 0.5% is on android 6 iirc
Well, as it says, are the video shaders included?
omg yes it this hahaha, anyways thanks
so this means I can build for Android 5.1 at its lowest?
Hi all, does anyone in here have experience in writing plugins, or java code into the plugins folder for starting activities etc?
better to just ask your question
Hi all, im somewhat confused by how we setup activities in Unity. I am using the direct java code in the plugin folder. My understanding is
- extend
UnityPlayerActivity(egmyActivity extends UnityPlayerActivity) , setup your main activity in the manifest to point to this newly extended activity. - In this java class you can add your own methods and it allow you to invoke
startActivityForResultand be able to deal with those results. - Allows me to be a little smarter and call out to other activities.
With multiple activities I want to invoke, I am am confused with the steps on having this work and then get me back to Unity.
- Ideally I would like each activity in it's own java file.
- When it's like this, I suspect I can then launch each one from the main extended activity (launch from
myActivity) eg:
public static void NewActivityLauncher(Activity activity)
{
Intent myIntent = new Intent(activity, NewActivity.class);
activity.startActivity(myIntent);
}
So now, from that additional activity I am say popping up a dialog and hopefully getting the results and going back to Unity.
- Is this the right way to do multiple activities in Unity?
- Once I launch the extra activity, how could I get
myActivityto be fed the results and go back into untiy? Is the process more likeactivity.startActivityForResult(myIntent), overrideonActivityResultinmyActivityand then return back to Unity (or call Unity to run some method and pass back the results) ? - Also, if I passed in additional arguement to
NewActivityLauncher, how would I pass them to theNewActivityclass when starting the activity?
wuld you guys say that pooling is essential for mobile games
like i destroy and create alot of objects
imagine 100 machine guns
shooting 10 projectiles/sec
with spawn effect, projectile and hit effect
Pooling is essential for any game
pleas help me
this all sounds fine to me. You can put your java files directly into Unity and they'll be included in your android studio project (ex: Plugins/Android/[reverse-com]/YourActivity.java). Interop with Unity can be done with https://docs.unity3d.com/ScriptReference/AndroidJavaObject.html and https://docs.unity3d.com/ScriptReference/AndroidJavaProxy.html. You may need to put any resources you need (layout etc) into a .androidlib under Plugins for your new activities
you didn't show what any of the errors were
hey, Im super new . looking to learn about creating a mobile card game. any examples that i could play around with anyone knows of? Thank you in advance ^^
Expand the middle error and show the full message
Guys, I tried to send live notifications from using "Firebase" to my Unity App. ı dont have any console error or Firebase errors, but I cant send notifications to my android device. Who has an experience about this situation ?
This refers to https://stackoverflow.com/questions/9170832/list-of-java-class-file-format-major-version-numbers Unity 2021.3 uses JDK 8, you need Unity version which targets JDK 11, which currently is only supported by Unity 2022.2. Or you can export gradle project instead and open in some newer Android Studio and compile there
so can i update the current version of unity and still keep the progres?
and hpw can i export gradle project
how*?
In build settings window, there's Export Project option
that might be too mutch for me to comprehend
I can't install apks built with target api 31 -33 in android devices, it works fine in versions below., i tried some solutions but doesn't work, i going to install unity 2022.2.1, in this new version is the problem solved?
Set the 'Target API' as "Automatic (highest installed)"
Hi! How to make button movement top down 2D smooth when ponter enter?
Do you absolutely NEED the latest xcode (14) in order to publish an IOS app to the app store? Or will xcode 13 be enough, and be able to build apps for the latest IOS versions?
13's enough (for now)
does anyone know if GfxDeviceGLES::InsertPluginTextureUpdateCallback(void (*)(int, void*), UnityRenderingExtTextureUpdateParamsInternal&) is ever invoked for non-plugin (internal unity) uses? I'm trying to track down a set of crashes and I've noticed some of them seem to have this in their stack trace and am wondering if perhaps it could be some kind of plugin? that said, I only see libunity.so and gles calls above it
hey do i have to show the local currency icon near the price tag for in app purchases?
or can i just show the price amount without currency?
like this:
Gotta look for localization packages I guess @proud urchin
UI is not activating in android initially , it only activates after the player collides with something
how to fix it , it works fine in pc build and editor , but this issue happens in android build
We need more info.
Tried updating unity? What kind of canvas? World space?
If you want to fix it maybe add debug logs as well?
the canvas was set to screen space camera , now changed to screen space overlay , now it works . have been figuring out since 4 hours , just to know it was just one setting to change
Imagine me, I have an Issue that has taken me 20+ hours and made no progress at all
If anyone wants to help here it is (Is a 2d platformer), any single movement in my android build has a stutter each 3 - 4 seconds but it can be without it for ~15 seconds it happens in a even a new project, It is not exclusive to physics. I have an fps counter and it seems pretty stable 58-60 fps. A square moving by translate using deltaTime, and you can see the "micro jumps". With the player moving using physics same, it is even more visible because of the camera.
Is the kind of thing "You just have to check this box'' solution but I'm pretty sure it is not that simple, I've tried almost everything inside my comprehension and people's internet comments
so if anyone has had this issue and solved it please, pleaseeee help
Thanks love to everyone
I've tested it on PC and some android devices it has only happened on those
You have no idea what just happened
What is GC
garbage collection
I also thought that
but
God came to me and told me
almost but thats not true
set the target frame rate to 61
solved
i am getting these errors , please help
things i tried :
restarting project
changing api levels
enabling custom gradle in player settings
none of them worked
any help would be greatly appreciated
did you read any of the errors?
yea but idk what's causing them or how to solve them
if i dont check the release option , it doesnt give the txt and zip files for play store and if i do check it , it gives errors on build again
if i uncheck release , it builds without errors
hello , i did share a build of my android game , however , it shows as harmful file
is there any reason to stop that , i'm not gonna publish is in playstore but i'm gonna publish it in TapTap and Itch.io (i litteraly dont have the money for google play console)
No, there isn't.
Side loading an APK outside of an official store will show that warning.
i did sideload a game from itch and it didnt weird
My game fps is so low on mobile, like 25~40 frames with drops . what to do ? 😦
Run the profiler @forest tide
How i would know what makes fps low when the game is on mobile
It does run good in editor
PCs are faster than phones generally and phones have tiled GPUs
Run the profiler to get more insight and apply optimization techniques and get the settings right
Without a lot of info or access to the project it's almost impossible to help with performance for an outsider of the project
I'm making an infinite runner game like , so i don't think that i can use occlusion culling or baking light so i'm left with realtime lighting and using LOD alongside with combine meshes
Check out dynamic batching, atlassing, if you use urp use simple lit (or mobile shaders if you use built in), etc.
Many more things to do!
Dynamic batching is to check the static box right? if so then i already did that alongside with using simple lit shader except some other materials
No i doesn't .
Huh?
Read up on static batching and dynamic batching
If something moves, use dynamic
you'll need to show the errors if you want help with them
your description sounds like a proguard issue
are you using a custom android sdk or jdk in stetings?
i didnt change anything there , its the one installled with unity , i asked someone else they said the .txt and .zip files arent necessary for google play
so i built it without checking the release option , it built fine then
thanks a lot still
yes, you can bake light even on prefab and use it on non stationary (moving) objects.
someone even has made a package for it (while, I need to manually bake and script it in the past..)
https://github.com/nukadelic/unity-lightmap-prefab-baker
hi, im trying to make a player move by a joystick but also jump if it touches the screen. But when the joystick is being moved by itself the player should just be moving but unity reads it as a touch input and makes the player jump constantly. is there any way to write a simple if statement to make the joystick exclusive from screen touches?
nevermind i fixed it
Anyone with experience in working with the Playfab SDK here?
Hi guys, can someone please help me make my swipe movement smoother? I'm trying to do it like in this game to move the pole: https://youtube.com/shorts/8Myh92qRXJs?feature=share
Here is my code: https://hatebin.com/flcdygqtpq
why doesn't it work?
PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, Il2CppCompilerConfiguration.Release);
Change Mono to IL2CPP
It is still Mono
hi how do i adapt the resolution of a game to fit any screen and look normal?
Depends on the game.
The canvas can be scaled if setup right and UI elements can move with anchors
You could also add black borders on phones to force a 16:9 ratio, but this is not an optimal experience
do you have a tutorial on how to set it right>
?
ty
Always use the device simulator too, not the game view, when working with mobile
Hi All, I hope this is the right place to ask this but I'm having some problems with my FPS when building and running my game on android. Everything works fine on my PC, so I decided to run the profiler while running the game on mobile and everything is running around 1000FPS which is great, except the VSync under CPU Usage is causing my game to drop to like 15 FPS. And when checking what parts of the game are using the most CPU time I get TimeUpdate.WaitForLastPresentationAndUpdateTime. I don't understand why VSync is causing this issue because I turned it off in Settings>Quality. I'd really appreciate it if anyone knows what's going on
Vsync is hardware managed on mobile. So it is basically always on
I am guessing it's a GPU issue as with most mobile games
That's a shame. It's a really simple 2D pixel game that I'm running with no shaders, lighting or any fancy so I don't see why that would cause any issues for the GPU. I've also tried lowering the compression quality of my images but that doesn't improve anything
Correct, compression is just how much storage and/or ram it uses.
Without more info I cannot help much, but maybe look into texture atlassing if it's a 2d game. That way you could decrease the amount of draw calls
By that do you mean store all my sprites in 1 image? Because that's pretty much what I'm doing. All the assets are in a single sprite atlas for each level and I just tell unity where each individual sprite is in the atlas
Then check the frame debugger. To see how many draw calls you got
Should be a small amount for mobile games
And check stuff like post processing
And enable IL2CPP and other optimizations if not already.
https://youtu.be/7S6QQKtvNo8
Thanks for the link man. I'll check that and the frame debugger out
Is this a debug profiler from your device or your pc?
It's from my mobile device
Are you setting the app to a framerate target at some point?
And is the GPU part showing you something?
Where could I find the "GPU part"?
On the overview part I get GPU:--ms and under rendering I get this
That does look super lightweight.
Yeah which is why I'm confused that it seems to be a GPU issue
Does your game feel as laggy as the profiler shows?
Yeah, but most of the game is static. It's only when a scrolling animation happens when changing levels, and when clicking on an object that opens a UI dialogue that things start to feel lagy
For my moving animation I'm using Vector3.MoveTowards and I'm multiplying my speed by Time.deltaTime. As for the UI most of it is already instantiated but disabled and if I ever need to allocate some new resources I use an Object Pool design pattern. So going from PC to mobile shouldn't really cause any lags
Not sure I asked ths already, did you set targetFramerate at some point?
Yeah I set it to 0.016667 or something like that, basically 60fps
Well, try to remove that line and test again. Maybe your device just cant handle it?
I tried setting it to 1/120 and 1/30 as well but that made no difference
I haven't done anything with rendering pipelines. This is pretty much just a new unity game built of the default 2D template
What device are you testing on?
One Plus Nord with a snapdragon processer and 90Hz refresh rate
That should be fast enough. Maybe try another version of unity, backup your project first. But such a simple project does not sound like the actual issue.
one thing, if you google, you get this. the video might help: https://forum.unity.com/threads/profiling-on-android-device-get-spikes-of-20ms-on-vsync.1026589/
Thanks. There is a new update for the Unity editor that's just released so I'll update to that. And I'll check out the link when I get back to work tomorrow 👍
Yeah, sometimes it is just a buggy version of unity. Be sure to test with a not beta version too, just to avoid weird bugs noone ran into or similar 😄
Did you try the snapdragon profiler to measure gpu work loads
What are the best practices for collecting gameplay data in real-time?
Some options I'm considering:
- PlayerRefs to batch then send chunks over the wire as .json
- Send over HTTP and retry failed sends
- Maintain a TCP connection during gameplay to live-feed data
analytics?
does anyone know why Application.targetFrameRate = 120;
Locks the fps at 90 when my mobile has 120hz display with 18gb ram? (I am doing in a empty scene no way there is bottleneck for cpu or gpu) Is this a unity issue or is there another setting I need to change?
@tawdry scaffold Don't crosspost in the future. This isn't a coding question either, but seeing as it's already been discussed, leave it in #💻┃code-beginner.
they told me to ask here
Yet it's continued in #💻┃code-beginner. The point is, you discuss your issue in one channel. If you move, then actually move the conversation.
Connect the profiler to see if it's not a bottleneck somewhere
I still search for a possibility to build my Unity 2D Game for the Rasperry Pi (Linux ARM)
Is there any addon or mod for Unity to get a build option for that?
Sadly unity has no linux arm support and isn't planning on adding it (while 2023.1 does have windows arm support...)
windows arm, but no linux arm? I though Windows would be even way less known and used for ARM than Linux.
Yep same
You can post on the forums and maybe it gets seen and reconcidered.
Also add a comment on the platform support roadmap
how hard is it? many peoples mean it would not be that hard to change the backend export
Hello, one question, how can I open a map app to see a route? For example, if I have a label with a route that when pressed opens it, if I can open it with Maps, Google Maps or Wise, this is for IOS.
url scheme or universal links
Oh, do you have an example of this? I've been looking all week and I haven't found something that does the same for me. A selector appeared to see which app I open the route with.
Has anyone here managed to get Cloud Save working with Google or iOS authentication?
Any time I import the google play plugin I'm getting build errors for android.
there is some documentation: https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html#//apple_ref/doc/uid/TP40007899-CH5-SW1 https://developers.google.com/maps/documentation/urls/get-started https://developers.google.com/maps/documentation/ios-sdk/urlscheme
You might not be able to do anything about the selector if there are multiple apps that can handle the scheme. I thought on iOS, it was always the first installed app but my memory on that is a bit fuzzy
oh okay I will prove this links ,thanks for anything
Hey guys, I've been trying to have IAP on iOS for hours (got it working on Android, it's also working in editor with iOS target).
I get this in Xcode:
AP Exception catched: Unity.Services.Core.ServicesInitializationException: You are attempting to access UnityServices.State from a non-Unity Thread. UnityServices.State can only be accessed from Unity Thread
I suspect it is because I'm using an async void to initialize IAP (it's called by the Awake function):
async void Initialize(Action onSuccess, Action<string> onError)
{
Debug.Log("Initializing Unity Gaming Services");
try
{
var options = new InitializationOptions().SetEnvironmentName(environment);
await UnityServices.InitializeAsync(options).ContinueWith(task => onSuccess());
onUGSInitializedDelegate();
}
catch (Exception exception)
{
onError(exception.Message);
}
}
This initializes UGS, then calls a delegate that initializes IAP. I've been trying many ways, but I can't find another way to init IAP after UGS (and if I don't wait for UGS to be initialized, I get an error too).
I've also tried initializing IAP in the onSuccess callback, but I get this error:
UnityEngine.UnityException: get_persistentDataPath can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
at (wrapper managed-to-native) UnityEngine.Application.get_persistentDataPath()
at UnityEngine.Purchasing.UnityPurchasing.Initialize (UnityEngine.Purchasing.IStoreListener listener, UnityEngine.Purchasing.ConfigurationBuilder builder) [0x0001d] in /Users/user/Documents/Unity/Projects/Kurv/Library/PackageCache/com.unity.purchasing@4.5.2/Runtime/Purchasing/UnityPurchasing.cs:24
at IAPManager.InitializeUnityPurchasing () [0x00027] in /Users/user/Documents/Unity/Projects/Kurv/Assets/Scripts/Services/IAPManager.cs:35
UnityEngine.Debug:Log (object)
IAPManager:InitializeUnityPurchasing () (at Assets/Scripts/Services/IAPManager.cs:38)
InitializeServices:OnSuccess () (at Assets/Scripts/Services/InitializeServices.cs:64)
InitializeServices/<>c__DisplayClass5_0:<Initialize>b__0 (System.Threading.Tasks.T
Im sure there is a simple way, but I can't find it
Alright so I initialize UGS in awake, and IAP in Start, it seems to work. However, on my iOS device, I get: UnityIAP: Received 0 products
I have a sandbox setup but it doesn't work
anyone been having loads of crashes from there GP console with this error
JNI ERROR (app bug): global reference table overflow (max=51200)global reference table dump:
the stack trace always ends in libc.so but also a lot of libart.so in it
Any idea why I get these random spikes? Happens like every 15-30 seconds, cant' figure out the reason (Deep Profile on Android)
if i had to make a guess its the garbage collector
Gfx.WaitForPresent --> The main thread is ready to start rendering the next frame, but the render thread has not finished waiting on the GPU to Present the frame. That's what it indicates, but why does it happen once in a while, and it's not actually happening every frame?
Oh :/
Then the garbage collector graph should show something, am I wrong?
i was just guessing that from the spikes of GC allocated every few frames
though would put the cursor right on the spike and see what is going on in the player loop
Yes, yes, I also have when into that, and reduced a lot, jump is still creates garbage though
Ok!
In terms of garbage, I'm using a pool and caching everything reasonable, so garbage as I have profiled is like 0.6kb every jump, everything else is garbage free, idk if it's a lot
The jump is triggered often, like once every 1-2 seconds
So, the garbage collection happens 3 frames before the big spike
I'm not sure if it might be the reason, like I'm aiming for 16ms, so 0.39ms shouldn't be much, compared to that other spike in rendering produced by gfx.waitforpresent
I took my Raspberry Pi and installed Windows 11 ARM on it, then I compiled my 2D Unity Game for Windows ARM, but I always get a "Failed to load Mono" Error Meassage, if I try to run the .exe
apperantly is the build tools
so
i see
i have a bunch of them
do i need them all?
can i delete anything under 30?
i dont think ill be using them
I downloaded androidNDK file externally from browser and idk where should I move it into the file..its showing missing in the external tool
You didn't show the full error message.
But my guess is that it is either missing build tools or can't find them. Unity and Android can struggle with things in non-english folder paths.
Anyway, so it sounds like Unity can't find files - and your fix is to delete more? Those SDKs are installed via the Android SDK installer and we're added by projects that had a different min SDK setting.
Delete them if you like but I'd expect that to break things.
Hi 👋 My IAP localization keeps being rejected in App Store Connect, I don’t know why (I have no details from Apple). Did anyone have the same issue ?
I am wanting to use my app in popup/split screen view, but when put into popup view and minimized (into the little circle tab) it keeps crashing. Any idea why? And am I able to prevent that?
been a long time since I make games for appstore, but try checking your plist file and see if your item ID is listed there
should my canvas scaler be set to match width on locked portrait ?
depends on your UI design
Hi hi
I just successfully build my apk through my unity editor on laptop
Then i uploaded it to google drive
But once my smart phone downloads it. It doesn't installed automatically
And i can't find it on my directory
Once this done just nothing happen and there are no trace for my apk
Maybe download from the gdrive app instead of link @woven marlin
Oh i just split 64 and 32
???
My built APK won't launch and just crashes immediately instead. I got this issue only after I installed the Google Play Games Services plugin in to my project. Does anyone know what to do about this?
Check the logs @wispy bronze
The logs? Like in Android Studio or something?@sleek eagle
I don't use android studio.
If you use build and run and enable autoconnect profiler you can see logs etc in unity (even without debug build you can see the logs with logcat)
Thanks for the advice! It seems it's an gradle issue. Hmm...
^^
Elaborate, what's happening? Which error?
Ughhh, tbh honest I didn't pay attention too much lol
I deleted my plugin, I want to know the difference without it
And then I will download it back
I know that this was quite a few days ago but I finally found a fix to my problem and thought I'd share it here just in case anyone is dealing with the same issue. After trying different frame rate values in edit>project settings>Time nothing worked, but once I set the framerate to 60 using Application.targetFrameRate and replaced Time.deltaTime with Time.fixedDeltaTime everywhere it fixed my issue and everything now runs supper smooth
How do i only get one value out of the gyroscope?
Did you imported to duplicate class with google? Just delete one of them
Hello friends, i build an apk as a bundle of google it‘s just white file on my imac. So what do i have to do to upload on google store?
@glossy sluice Thanks, I fixed this about a day ago😁
So with the Unity Starter Assets FPS Controller I got the FPS Controller in my game, and on my smartphone.
But the Move sprite to move around forward and back, stays in place where it is, and so does the look pad sprite.
I noticed from Playing Call of Duty Mobile that the move sprite, and the look pad sprite appear anywhere on the screen depending where you place your finger on the screen, on your smartphone.
Can you adjust the settings on the FPS Controller in the Inspector panel to make the sprites appear when you place your finger on the screen instead of the move and look sprites being fixed in one place on the screen, like a joystick float
If not is this something that has to be coded in C# for the sprites to appear on the screen when the player presses their finger on the touchscreen on their smartphones?
https://youtu.be/dAdYlDvEHUY found this
https://youtu.be/TPzOgMfoCGY in this YouTube video a guy called Hoosan talks about what I am trying to do at 3:55 in the YouTube video, he talks about Add Event to make the sprites move to a specific area on the screen when
the player presses the touchscreen.
I have been on this problem a loooong time and I am worried that I cannot do it, can anyone help me?
I want to explain to you how to make a fixed and floating joystick
.
.
ACCESS PROJECT FILES & SUPPORT THE CHANNEL:
https://www.patreon.com/unitycity
.
.
Please Subscribe for more videos:-https://www.youtube.com/channel/UCvOVDwdcBwioZn8km2DXd6g?sub_confirmation=1
Twitter:- https://twitter.com/city_unity
Facebook:- https://www.facebook.com/UntyC...
In this unity tutorial, you'll learn how to make a joystick touch control for our player movement in a 2d top-down game.
Touch control is an important component for mobile games. We will first add our joystick UI into the game and add a C# script to it. The script allows the joystick to move to the position of the user touch and return back to...
hi
Does anyone knows whats causing this? Im using the unity generated manifest file.
How can I drag the screen on mobile?
I have a top down game that I control the camera with wasd on pc, how can i drag the screen on mobile with touch controls
also pinch to zoom in and out
Also another question why is my small game so big when I bulid it and my project like 10GB
Hello friends, i build an apk as a bundle of google it‘s just white file on my imac. So what do i have to do to upload on google store? Please help
Upload it to Google Play like normal?
Probably many guides on YouTube for touch controlls and pinch to zoom etc
Depends on your project. Some script is turning it off
The library folder is cache, which is used to accelerate development etc.
Only stuff in the Assets folder can be included in builds.
And only the content which is used will be included and even shaders and engine code could be striped if not used
It was only the translation that was being rejected, I resubmitted and it worked 🤨
Sorry I should have deleted the post it is fixed thx tho
Trying to get my game running on an iphone with unity remote 5 (I'm using unity on windows). Unity does find the phone and I have Itunes open which also finds it. I already managed to get the game run on my phone once, but ever since then it did not work again for some reasons. I am getting this message that I don't understand and it might be the reason but idk. Any help would be appriciated.
Are you sure everytime you plug it in you allow it
are you refering to that box that pops up asking me wether or not I trust the pc?
Hi, how to fix this problem?
@vague pilot
yea
Well whenevr it did pop up I said trust but recently it has not popped up again
Try turning both your computer and your iPhone off other then that I dont know why it would not be working sorry
just keep trying to unplug it and plug it in and make sure you trust it also remember to put it on play mode
Well it just asked me to trust and still doesn’t work when I run it. Yeah imma try to restart all devices now. Thx for your help though
Hi, trying to finish my 1st commercial game and I can't pass the build point so I can upload it to google play for the testing phase.
If I lower the targeting API level from minimal 24 to target level 30 the build completes with no issue, but google play does not allow any app below target level 31.
Build fails when targeting API level 31
I'm using Unity 2020.3.2f1 and installed android SDK build tools 30.0.3 with Android Studio SDK manager.
In publishing, settings:
enabled AndroidManifest.xml and added: "android:exported="true" in the activity section.
enabled LauncherTemplate.gradle and specify "buildToolsVersion '30.0.3'"
enabled MainTemplate.gradle and specify same "buildToolsVersion '30.0.3'"
I also tried opening my project with a newer unity version 2020.3.25f1 but then I get over 650+ compiler errors. So this is a dead end.
I am stuck here I need help 🥺
Hi, trying to respawn my player after he dies. It works fine and the player respawned but isn’t visible again why?
What do you mean visible?
Seems like a #💻┃code-beginner question btw @glossy sluice
Id say try the latest 2020 lts. The compiler errors might be an easier fix then you think
First of all congrats on finishing a game second of all based on my experience I had to install another unity version So maybe try that.
My friend it’s easy: go to android studio and click on configure
After clicking go to sdk and apply api level 33. After this you go to your project under player settings in publish settings api 33. Then build again. Unity will show and ask you if you want to update your sdk just click yes and that’s it
Hi again, so I need to upload my game on google play store but first I have to upload url with my data. I don’t have this. Any advice?
Hello there
I've been getting this error for the last 2 days now, I'm trying to build .aab file for my game to be uploaded to the Google Play Store. I've checked on YouTube and have corrected the key passwords, but I'm still getting this error. Please help me, I'm pulling out my hair!
guys what is this? I mean, of course everyone would want their game to be of high quality then why is this meter/checkbox?
I am making an android game (it's just a small 50mb board game satisfying) so should I make the android quality as ultra?
It tells you what to do. Look in the console for more info
You can remove the ones you don't need. For me with VR I have 1 preset for quest 2, 1 for pcvr medium and 1 for pcvr ultra.
Higher quality presets are heavier to run and certainly not all devices can run on ultra. A game shouldn't run at 15 fps on ultra if it looks the same at low but at 60fps. Make sure that if you pick one for android you still disable all the features you don't need (like realtime reflections etc)
how to disable these and can you list some of the important ones here. I dont have much idea.
Just go though what's there and see if you need it and run the profiler when you build to your device
Please forgive me, I'm sort of new to all this , but I don't really understand what the console is saying
I'm guessing it has to do with the Advertisement Legacy Package?
I think so yeah. At least something ad related @bronze aurora
Hi again, so I need to upload my game on google play store but first I have to upload url with my data. I don’t have this. Any advice?
Where can I get it?
Hi, i have a question, why after implement AdMob my app build start crash
look at logs, could be a lot of things
HEY I FIXED IT!!!!
I just had to delete everything relating to Unity Ads and the Ads package
I guess I'm going to have to monetize my game using Unity Ads with Mediation, so if anyone has any videos on that that'd helpful lol
Is there any idea?
Can you translate?
Hi again, so I need to upload my game on google play store but first I have to upload url with my data. I don’t have this. Any advice?
- create a privacy policy
- upload the privacy policy to a website
- paste the url to your privacy policy into that box
https://support.google.com/googleplay/android-developer/answer/9859455?hl=en
https://support.google.com/googleplay/android-developer/answer/10144311#safetysection
Hoping for someone to help a bit on my question: So I have a touch screen computer. Does Unity's Game Testing Window just not recognize touch screen commands for testing out touch screen coding when making a mobile game?
they might be interpreted as clicks. Unity remote is normally how I test device controls/sensors in the editor
Unity Remote?! Well now I feel stupid I don't know what that is
Actually, is there any way I can bother you with clarification on the encoding to using a touch screen to "tap" an object in Unity? Since you seem to have experience in that.
What do you mean, tap? I assume Unity is interpreting your touches the same way as mouse clicks, instead of touches. You'll need to use the touch api instead
https://docs.unity3d.com/ScriptReference/Input.GetTouch.html
I read that touch screen controls are no longer synonymous with mouse clicks as of 2019. Before 2019 you could just click "get mouse down" and a tap on a touch screen would also be read as the same thing
now apparently I need to encode "touch screen controls" to get a simple screen tap
and I won't lie I've been struggling.
I tried doing this to one of my objects, but either it didn't work or Unity's testing window doesn't detect taps. If this is correct code pls let me know:
void Update()
{
if (Input.touchCount > 0)
{
//do something here.
}
}
if that syntax is correct then I guess I only thought it wasn't because I wasn't testing it properly. As I said above I don't know anything about Unity Remote
are you using Unity remote to test now?
nope, I actually need to learn more about unity remote
is that syntax correct if so then YAY I just need to use unity remote
OH so I download Unity Remote on my phone?
if you're testing touch controls specifically, yes. Otherwise use Input.GetMouseDown and make sure Input.simulateMouseWithTouches is true
Oh
Input.simulateMouseWithTouches is something that is new to me. Ok so where do I make sure that is true?
ok so then I am probably doing ok with my game - and the touch control probably works then is what I'm gathering, I just apparently didn't realize the regular unity interface doesn't allow for my touch screen monitor to test touches
if you didn't disable it, it should already be true. But that would be one reason you wouldn't be able to use mouse down, if you were reading some kind of guide that had you shut it off
No, I just read a news report with a Unity Website that said "Unity is disabling all touch screen inputs with the Mouse as of 2019. When you program mouse clicks they will no longer be the same as touch inputs afterward. You will have to encode touch inputs to make them work with the game from here on out."
maybe the editor just doesn't like touch screens. I'm surprised it doesn't work if you switched to OnMouseDown and see nothing though
I'm using this code: if (Input.GetMouseButtonDown(0))
should it be Input.OnMouseDown then?
your website is probably wrong then, as I'm using OnMouseDown and similar in a number of games on 2021.3.11f1 and it works fine on mobile
oh thank god
so I don't have to worry about extra encoding
but wait is GetMouseButtonDown not the same as OnMouseDown?
if it is the same then I won't worry
if it isn't then I have to fix that code
they should be similar. Why not make a local build and test it?
I will just I can't right now, I have a blazing migraine and I spent 3 hours last night worrying over that website talking about something in 2019. Apparently a few youtubers believed the same thing. but if it still works as it used to then they must be on crack or something.
that worry is taken off my shoulders, tyso much man!
or woman
Trying to use the unity mediation (ive used it before and worked fine) but now on the code generator im getting this
on the unity dashboard, ads are enabled
also shows the ad units under the ad units tab but for some reason the code generator says there are no ad units
First of all, Happy New Year to you all!
My original post: #📱┃mobile message
So this is how I solved it:
Jumped from 2020.3.2ff1 to 2020.3.43.f1 and opened the project and found 797 errors.
almost all of them were conflict files for plasticSCM.
Since I use version control I roll back to the 2020.3.2ff1 version and delete all plasticSCM from the project, I didn't use it. I used GitLab with LFS. switched back to 2020.3.43.f1 dropped down from 797 to 54 errors.
Did the same thing again with the IAP-purchases package. Commented on all scripts that used their libs I plan to import it back but for the new 2020.3.43.f1.
After the IAP-purchases package was removed opened it again on 2020.3.43.f1 with 0 errors.
Build settings selected a minimum lvl24-API to target lvl31 and the build pass was clean with no errors(this step was impossible in 2020.3.2f1).
Uploaded the app bundle to google play with no errors and now I'm in my closed-testing cycle.
Problem solved.
Thank you @sleek eagle You were right! When you said "The compiler errors might be an easier fix then you think".
Thank you @vague pilot upgrading the project to latest 2020 LTS was the solution for me after all.
Thank you @glossy sluice the steps you provided did solve the issue but I also needed to use a different Unity version.
using a gyroscope, is there a way to get the rotations of it before the game starts? i have to prop it up at a perfectly 90 degree angle as the project is loading for it to display the correct measurements
Awake runs before showing anything on screen.
Start is before the first screen iirc, so also not noticable if gyro activates in Awake
i understand how the start method works. Looking back at my first message, i worded it horribly. I intended ask how i would get the values in the gyroscope to display in the start/awake method. Unity seems to set the rotations on the gyroscope as 0,0,0(on start or first frame of the update) no matter what rotation the gyro actually is. due to this i need to prop the phone at a perfect 0 degree angle to correctly display the values. i no longer want to do that because there is lots of possibilty for error
Ahhhhh I get it now
Maybe this will help?
https://docs.unity3d.com/ScriptReference/Gyroscope-gravity.html
Otherwise im not sure, maybe make a forum post if no one here knows
I'm trying to test my game on my device using unity remote, but it does not show up under the devices tab, anybody know how I could fix this?
anybody can ping me if they know what to do
Youre welcome
My friend i have a question too. If you want to upload an aab to google you have to link your url of data terms somewhere. How did you solve that? Do you got your own website? I didn’t. How it works actually with your testing cycle ?
Yes, I did provide a privacy policy. I did exactly as @tired lily replied to your question earlier.
"1. create a privacy policy
2. upload the privacy policy to a website
3. paste the url to your privacy policy into that box"
My app is in "in review" status and I still don't know are my steps correct.
Google provides all users with feature "sites" there I created my privacy policy. When you write your privacy policy you publish it on google sites and you get url for your new public privacy policy page. Copy url and paste it in the "der datenschutzerklarung"
If my game becomes approved only then I can be sure that this step solves the privacy policy request.
I first wanted to run the closed testing for my game so I can find early bugs before I launch the game.
When you create a close testing cycle you need to provide the list of testers. The list of the tester is an e-mail list of people who will get this e-mail notification when your game is approved. So they can see and download the game from the google play store. Nobody else can see it or download it.
Np
I don't really know if this belongs here but I can't find a channel that really fits my problem, I'm working on a map for a vr mobile (oculus quest) scene and I need to optimize my scene as it has too many polys for the quest1. I found an addon called "mesh optimizer" and decided to use it. I have about 70 pine trees that need optimizing and the script that came with the addon has an optimize button that I need to click so that the polys get reduced. Multi object editing is not supported by this addon and that would mean that I need to press the button for every pine tree in the inspector. Is there any faster way to do this?
I appreciate it. Thanks a lot. Ok, that means I have to build a website? Can I see your website?
You don't need to build your website, you can use google sites...this is my privacy policy site https://sites.google.com/view/gameforge-tower-barrage/home
But as I said I still dont know is this a valid solution my app is still in review status
Hello there
I'm trying to set Unity ads
But sounds like my Unity ads are not displaying
How can i fix this problem?
(I'm trying to put Unity ads in Gamemaker anyways)
Thanks a lot. Please keeping me update of Status. It would be graete
Any help/attempt is appreciated
show the configured ad units in the dashboard, that's the place to start
Hello, I try to implement deeplinking on android, I follow the tutorial https://docs.unity3d.com/Manual/deep-linking.html, the deeplinking works if the app is not already launched, but if the app is in background, the deeplink launch the app and the app froze on the main scene.
sounds like you have an infinite loop somewhere
do you open the url you receive at any point?
has anyone used ironsource service for mobile ads? I got sent an email from "mobile-support-is@ironsrc.com" requesting that I send them bank info "Account number and Routing Number" to their email. But I am scared since I have never done this. Is this how its normally done?
thank you
No I just show data received in this url, my app generate a deeplink for an other app, the other app open it and sign the message and open a deeplink to my app with the result.
Guys, I'm trying to upload a android build to Google Play. All is fine but I get an error saying that the included Play Billing library version is unsupported. We dont have IAP in the app at all so I'm wondering why is unity building it into the aab at all. We havent even enabled the iap package or anything.
Have you a google play library in your package
No there are 0 google play integrations. We are only using the AR foundation package
I'm suspecting that the In App purchasing package that is installed by default is putting things in the build by default
Can confirm, the IAp package was doing it. Even when IAP was turned off in project settings
Does google answer yet?
hi, im trying to build into ios through xcode, but i keep getting this error. Anybody know what to do?
Hi, does Google answer yet?
I got App rejected, reason is data safety section in Google Play User Data policy: Invalid Data safety form...I need to fix this but I'm not sure where to start. I only store players' game progression and purchase items on users' devices. And the user can take a screenshot from his game(no personal information in the image) and share it on any social network.
Anyone have any ideas on how to solve this?
did you fill out the data safety form?
Yeah but I guess somewhere in all this process I made a mistake and I trying to figure it out. The thing is I'm seeing this and doing this for the first time so it's kind of normal to make so many mistakes, I just want to make it right 😄
you might have made some claim that you don't know isn't true, for example saying you don't collect gaid but actually due to IAP you do. Something like that can get you rejected
It must be something like that, I just need to confirm it, find it, change it. Thank you
GUYS PLEASE HELP ME.
I UPLOADED AN APP THE PLAY STORE AND EVERYONE TRYING TO PLAY IT CANT. THE APP CRASHES ON LAUNCH!
https://play.google.com/store/apps/details?id=com.TejiriE.CyberRushOverdrive
I DONT KNOW HOW TO FIX THIS AND I WORKED SO HARD ON THIS GAME TOO
Please help me 🙏
any ideas to solve this problem properly?
what is there to solve? provide a valid data safety form. Probably an automatic rejection based on app behavior not matching claims
check if all you sdk and jdk are up to date
Hey
I think I figured out your problem.
I had a similar one
But basically
Go to data safety and try and make sure the information matches this https://docs.unity.com/ads/en/GoogleDataSafety.html
Once I edited that, I sent the app to be re-applied and they accepted.
Make sure it follows the information here https://docs.unity.com/ads/en/GoogleDataSafety.html
greetings. Trying to upload an aab to google play store. It gives me a message that my target API needs to be at least android sdk 31. But, when I choose that in Unity, it says its not installed.
I tried downloading android studio, and redirecting Unity to the installation. But gradle now fails on all builds.
So, I tried upgrading project from 2020 to 2021 (hoping the build in Android SDK allows for targeting 31), but google play still rejecting, saying sdk needs to be at least 31
Edit: Solved by having android studio targeting the android install in Unity and installing api 30 and 33 (i skipped 31, because heard there were issues with it)
Hey, Im having an issue with unity ads and im not for sure how to fix it
Anyone have any idea how to fix it?
Its nothing in the code that isnt working. I added this package to unity and its saying it can find ANDRIOD_SDK and JAVA_SDK
Hello, In android build, TMP input field do not show the blinking cursor on being selected/checked why is that and how can I enable blinking cursor on select
How can I fix this blocky light to be smoother ?
What exactly do i need?
im trying to make a mobile app for the first time for a school project and im wondering if i would be able to use unity to make the app?
i know it would be possible but im mostly wondering about any issues i could face in the in the future if i did
If it's a simple app with a lot of UI, make sure your canvas scales with screen size. And lock the game mode resolution to the ratio you want.
Other than that just try what you want :p
Which light? The stand? The background?
On the wall
Like the yellow on the background?
Is it done with just a texture? If so, which texture
The yellow is the light source coming from a directional realtime light, not a texture. I'm getting this blocky lighting only on the phone, looking fine in the editor
It it 3d or 2d urp?
Do you use the same quality preset for mobile and desktop?
It's 3d urp, yes I did use the same preset
@sleek eagle Other example of the lighting being blocky. The more detailed one is on the editor the other one on the phone.
Seems like shadow resolution
Can you send a screenshot of the quality settings?
Yeah here
Can you also show the matrix at the top with the checkmarks?
oh alright, how can I change that green check?
Arrow at the bottom
Or remove the unused levels altogether. Will also save build size maybe?
that was the fix..I'm cracking my head on it for hours
Yeah I will try it, thanks for helping me I been stuck on it for a while now
Glad to help :p
Just want to ask is there a way for me to achieve the same level of details in the lighting without it effecting the performance so much?
Probably other places you can optimize more. Even on quest 2 I got 4k res shadows working
If possible baking it will do wonders tho, but idk your game
Optimization is hard to help with without the project
Here are CPU tips I made: https://youtu.be/7S6QQKtvNo8
Will make a video on URP settings as well
Thanks I will look at that now
A fix for people who encounter the same problem and the performance is still an Issue, If you want to get better shadows just change it in the pipeline that is in charge of the level you want.
Or optimize the high performance one (;
Also disable SSAO if it's on. That and bloom is massive
In the URP renderer for that asset
Is there a way to open the Itunes library and import MP3 files during runtime?
Guys my game hangs a bit or fully glitches when kept not playing (or touching the screen) for a minute. sometimes freezes. It's just 25mb size. Why? What to do?
... profile it to find out why
Hello All. Im added google play services plugin in my game and unity resolving self. And resolving stays like this. Not continue resolve. Please anybody help me that how can solve this problem ?
if no obvious issues in console, enable verbose logging in EDM4U and try again. Uncheck use gradle daemon in EDM settings
Now im installed files directly and resolve fixed problem but now im taking this error and i dont understand why its happen. I wrote the all using instructions
how old are the instructions? the literal top hit on google for PlayGamesClientConfiguration is that it's not used any more
you are following directions from here, yes? https://github.com/playgameservices/play-games-plugin-for-unity
Yes
yes what? If you are following the instructions, where does your code come from?
Im downloaded plugin from there
And what should i use instead PlayGamesClientConfiguration ?
you should follow their code example linked in that same page instead of wherever you are getting this old deprecated stuff from
Hey People.
Just to make it short:
We got this project that includes a level editor within it, and we wanted to allow players to share and export their own levels, I know we can include an import/export system to open the levels within the game itself but (with the project manager's suggestion/insistence) I wanted to know the possibility of building an APK from an already built app; so we can export the player-made levels as a separate build/APK and share it that way.
This might not be possible due to the compiler being on the engine and such, but is it possible via native android libraries or other options ? searching doesn't bring good enough results for me.
Thanks in advance.
go with option 1, option 2 is insane and has no practical chance of success
Thought the same way, Thank you
So if I use google sites to create a website for my app and data legitimation. So, next to my main job as a normal worker I need to build a side business for paying taxes later, right? I’m case I earn an amount of income monthly I have to pay taxes rift? But just in case of money come in right?
I don't know
I have a localization issue.
I'm using TMPro and I have downloaded the "NotoSerifAllContinent" font for my translations of French, Spanish, Russian, German, and Croatian and this works fine.
But the issue comes when I switch to Japan, Korea, or Chinese.
Some of the symbols cant be found in my fallback assets list ("NotoSerifJP", "NotoSerifKR", "NotoSerifCJK")settings.
I used google translate to create the translations.
How to solve these missing symbols?
Hello, Is it normal right now, that Windows ARM Builds doesen't work on Windows ARM?
I can find nothing about that in google, this discord and even the Unity Forum.
2023.1 has this in alpha iirc
Oh do you mean as export target or for the editor?
2023 has it as export
the exported game always have this "Failed to load Mono" Windows Error Meassage if I try to run the .exe
Are you on the latest alpha?
And maybe try il2cpp
Iirc mono had issues and il2cpp did work
il2cpp made a Compiler error I think
Then fix that :p
but I can try again
tell me how
Tell me the error haha
Also you can ask for help on the forums. There is a thread about windows arm support, and they probably monitor it
should I use Framework or Standard?
for the Api Compatiblity Level AND the Editor Assembies Compatiblity Level
Standard
FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
Unity.Services.Core.Configuration.Editor.ProjectConfigurationBuildInjectorWithPlayerProcessor.PrepareForBuild (UnityEditor.Build.BuildPlayerContext buildPlayerContext) (at ./Library/PackageCache/com.unity.services.core@1.7.0/Editor/Core/Configuration/ProjectConfigurationBuildInjectorWithPlayerProcessor.cs:26)
UnityEditor.Build.BuildPipelineInterfaces.PreparePlayerBuild (UnityEditor.Build.BuildPlayerContext context) (at <caacb60871c74ec7b7ea8204d9f7b0c1>:0)
UnityEditor.BuildPipeline.PreparePlayerBuild (UnityEditor.BuildPlayerOptions buildPlayerOptions) (at <caacb60871c74ec7b7ea8204d9f7b0c1>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Error building Player: FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.```
Build completed with a result of 'Failed' in 0 seconds (0 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
The Mono works in compiling but made a Windows Error if I try to run the game later on ARM and il2cpp is have a Unity Error on compiling
Already + Windows 11
https://forum.unity.com/threads/windows-standalone-arm64-dev-platform-unity-should-support.1286720/
This is all info I have about it
Maybe tag that developer
As said in the post I linked, mono definitely doesn't work
So edit your post and post about il2cpp
So if I use google sites to create a website for my app and data legitimation. So, next to my main job as a normal worker I need to build a side business for paying taxes later, right? I’m case I earn an amount of income monthly I have to pay taxes rift? But just in case of money come in right?
I changed the setting to framework and the error changed. It is now I only Error left:
In visual studio you need to add the c++ for windows arm modules @arctic marlin
We can't give legal advice here. Too many different things dependant on where you are from and what exactly you do etc.
In general you pay taxes over the income you earn ofc
Desktop or Mobile C++?
because its Windows ARM
or Gamedevelopment with C++?
The Monitor, the Phone or the Controller Icon?
@Dev Dunk
In the seperate modules maybe. You need c++ support for windows arm @arctic marlin
Not sure if there is a overarching set for this
I'M not sure should I install: "Desktop Development C++" Or: "Game Development C++" ?
Neither
You need to look in the other tab
I'll get my laptop
Guessing this one
And maybe the win 11 sdk
anybody using apple cloudkit? I'd like to make sort of a group with people using it to share knowledge
I fished I would have known that earlier... Because now it works, but I also installed 37GB of everythings.
Sweet! If there are any bugs in the builds please make a bug report for it @arctic marlin
Thank@you
The Game crashes after I start it... Its strange...
I also made a emtpy Unity scene with just a cube and the camera and this could stay for an hour, but my game does crash if I try go to the options or like in the video, try to load the scene.
Check the logs
what logs?
https://docs.unity3d.com/Manual/LogFiles.html
The player logs
Then you can see why it crashes
what logs?
At least you see what happened before it closes
The logs your game generates
Check the location in the link I sent
I dont get it
it that a asset I need to install in the game
the button just change the scene and the option button just enable a UI panel.
its a simple game not a dribble A game with high quality loading screen with logs included.
only what you see in the video. and after this "!" meassage with the game icon. it closed with NO Crashlog in the background
There always will be logs generated when you play a unity game iirc
%USERPROFILE%\AppData\LocalLow\CompanyName\ProductName\Player.log
Or
%USERPROFILE%\AppData\Local\Packages<productname>\TempState\UnityPlayer.log
As said in the link
Yo, I'm making my first game which is an offline single-player one but has ads and in-app purchases and such.
But i've never worked with saving and stuff before and playerprefs are not safe or secure but i found an asset on the unity asset store which is a free one and people seem to recommend it , it's called "Save Game Free - Gold Update" and i plan to use it but it also gives you the option to save to Cloud, but what Cloud is it saving to? sorry if its a stupid question, i hope someone here could help guide me on what's the best way to do this :)
Could i cloud save on android services?
I meant is it free for everyone who owns a developer account?
And if i choose to save locally for now, could i move to cloud later without the players losing any progress after i update it?
I have a small game that looks like 100mb, so I created an installer and installed it as a test, and it was 1,10gb. Does someone know why this happend?
you can try reducing the size with minify
I'm trying to add leaderboards to my game but after importing the google play services package, I get this error when trying to build, does anyone know what reason this could be happening? (API 31):
I've seen people online say it has to do with the keystore password being incorrect but this is not the case for me
did you See the Console for details.?
there's more but these seem to be the most important errors
are you building an example project? why does com.google.example.games.mainlibproj.BuildConfig exist?
nah i imported google play services to a project that i was already working on
no idea why thats there 🤔
how do i change it? I could go to the directory listed and change it manually but I'm not sure if that's advised lol
how did you install it, exactly? Did you follow the Plugin Installation directions?
I just got the .zip from the github page
I took the unity package file from the current-build folder
I'm using version 10.14 because apparently there's a known bug with the latest version
and the project builds okay without it installed?
yeah, before I added the google play package I had it working properly with ads (from admob)
try a blank project next, eliminate any other possibilities. The presence of some example code makes me think something is installed incorrectly
alright, I'll try later on and see what happens
I just did a clean build tho and now I have a new error
is there any solution for this that doesnt require editing xml files?
I have edited them to solve this problem before but I'm not sure if that's how I should be going about fixing this
hmm does admob already have a dependency on play services? that error looks like you have com.google.android.gms.games.APP_ID defined in multiple manifests
it doesn't but it does come with a manifest file
this is google play:
this is play services:
are you viewing these before or after processing? export to android studio and look there, they probably have some postprocessing scripts because otherwise these are too bare
export like this right?
mb I've never exported before
along with the 2 other manifests from before, now I see this one
mb theres that 1 too
howcome there's no prefix of u003 on the APP_ID?
theres 5 in total
they all get merged together, that's why you're seeing that previous error
so just delete one of the APP_ID's?
are you sure you configured your project correctly? You did all the steps? Exported resources from play console and into the project?
huh?
ohh wait u mean
this?
maybe time to dive into the source generating those manifests then, it's getting that example package from somewhere
well there's 1 thing that I didn't mention
I'm implementing ads and play services with a unity store asset
Mobile Tools from Gley Games
I'd assume it would be as easy as following the documentation and it works but that's not the case unfortunately
atleast in my case... I'll try the blank project later and see because maybe there's just something that I'm overlooking here
trying to implement GPGS, ive set everything following this https://developer.android.com/games/pgs/console/setup
but..
PlayGamesPlatform.Instance.Authenticate(ProcessAuthentication);
line ^ doesnt seems to work, the callback is not getting called..
anyone know a solution??
look for any errors in logcat
proguard probably ripped out that class. Build the player in dev mode, if that fixes it add a custom proguard file so those classes don't get removed
im still fairly new to this, so i have no idea what are you saying, sry..
i dont think i can build in dev mode, cuz the game already in play store..
though i am just using internal testing for now..
you don't do any testing with a local build?
well, i usually just build it and upload in internal testing, where only i can test it..
again, im still new in game development.. x'd
regardless, now that you have the error you can find a solution pretty easily
internal testing is for distributing to other testers, and rarely debugging certain issues that requires your app to be signed the same way an actual production release would be
https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/Assets/Public/GooglePlayGames/com.google.play.games/Proguard/games.txt
https://github.com/playgameservices/play-games-plugin-for-unity/issues/2796
literal first hit on google for "classnotfound com.google.android.gms.games.playgames"
It works.. now the callback is working, thank you!
But.. sign in status always "canceled" xd
How to add permissions in unity
custom android manifest + add permission there
Hello All. While try to upgrade my game in the play store , im taking an error. And this error message this : "Your App Bundle has the following configurations that exceed the maximum initial upload size of 150MB: arm64-v8a,armeabi-v7a" How can solve this problem ?
if it's pretty close to 150MB, hopefully the solution is obvious. Otherwise you'll need to split your bundle
https://developer.android.com/guide/playcore/asset-delivery or
https://developer.android.com/guide/playcore/feature-delivery
I have updated from unity 2021.3.15f to 2022.2.1, but now I am not able to build android apk, I have this error
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2022.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2022.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.2.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
How can I fix it
oh, so you just ignored the important part of my msg..
I didn't get that part
what is stack trace and where I can find it?
the obvious place to look, because it's to do with the error you posted, is in the console
That is a console only, isn't it
there are two sections when you click on an error.. the error and then more info in the section below
is the error you have selected, the first one spat out from a failed build?
Yes sir
there are two more after this one
and then the build is failed error
no idea
Sorry for late reply
This is the error
are you initializing with the right ad units? And you're testing on an actual device?
Yes
hiding info isn't going to help solve your problem. How are you initializing the sdk? What configuration settings do you have? What are the exact ad units you're using?
I'm not hiding tbh
I'm initializing it using gameamker studio
this is the configuraiton
Tbh I used to always click on my own ads as a tester
I don't recognize the code you're using to initialize with, and all of your screenshots are clipped for some reason
Oh
show more of your initialization code
where is UnitAds_Init defined? is this a gamemaker thing?
it's a Java extension
maybe i'll upload the java file here
@tired lily have u got a unity game id for testing?
NVm i guess i found one
are you sure your initialization logic is right? the error code you are getting back is for an ad load error, and the initialize method you're using seems to take a different listener than what you're giving it
There is a problem in my code not my game id then i guess
I have two different unity extensions
My id worked with another extension
But in an oter project
I'm going to guess that the sdk is initializing correctly, but since you never request any ads or use the ad units you're getting an ad load error
Hmm
you should be calling UnityAds.load at some point, so unless there's code missing that's definitely going to cause failures when you try to show ads
I don’t know what type of model phone this is I know it’s a Samsung
@hollow viper Don't post off-topic here
One no one's talking in mobile chat. Two how's that off topic? I'm making a portable game boy with it.
@hollow viper If you need to identify your phone, lookup how to. Don't spam the channel here.
OK, fine, two messages is spamming. I guess. this is sounding like someone's angies.
!mute 531503900340125706 3d Ignoring warnings.
snoot#5002 was muted
@tired lily Hello. Im installed google play plugin in the my project and i did build and then its done . I could upload my game on the play store but when try to open my game on the phone then its game always stopping
does it work locally? does logcat show any issues?
@tired lily im tried on the editor and worked game correctly but when i bundle and upload play store than game is always stopping. And i didnt check logcat logs
the editor is no substitute for a device, ideally physical
build locally and look at the logs, seems like 80% of the time somebody comes here with an android crash on launch it has something to do with proguard and missing classes
the logs will tell you exactly what's happened and it's easy to fix if so
@tired lily But im building with Google Play App Bunle and you know its bundle not apk . So how can i try on the phone ?
uncheck build as bundle
Hello Labs, what do you think about using google sites for websites?
Hi everyone, does anyone have any suggestions for a cloud platform to store user accounts for an online mobile game - this is mainly to store the user’s progress
@tired lily Thank you 🙂 But now i have another problem im opened new project and tried to build and im taking gradle error. ,
Why did it so like this ?
Im taking this errors
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path 'META-INF/kotlinx_coroutines_core.version'.
Anyone any idea how to fix this?
look at the actual errors
I looked but didnt understood. I think this happened because of gradle but before not have any error for the gradle
you didn't post what the errors are
how did you get a bundle if you can't build an apk?
Hello Labs, what do you think about using google sites for websites?
General (and maybe stupid question here) Android question here... but if I wanted to read and write to a folder what directory would be good to use on the Android filesystem?
Is there a way to add custom Dynamic Island activities on the iPhone 14 pro series from a unity app?
why wouldn't you be able to? You can interop with native code https://docs.unity3d.com/Manual/NativePlugins.html. You can even drop C/C++/ObjC files straight into a Plugins/iOS dir
i have a question suppose i download the asset bundle from the server in android and now i want to load that locally do anyone know where it stored?
Cause currently i am downloading the bundles in resources forlder and its not loading in android but fine loading in editor
did you make the Resources folder in a writable location? the way you phrased that makes me think you believe the folder structure under Assets exists in a build. That all gets mashed into various .res files and packaged into the apk (with some specific exceptions). Look at Application.persistentDataPath and https://docs.unity3d.com/ScriptReference/Caching.html
@tired lily Im taking this errors
I don't understand what you mean. The popup is telling you to click on each of those errors in the console to read what they are since there is more info there
@tired lily Probably u didnt see this image
@split dew First disable button interactable and create a timer and timer finished then enable button interactable
click on each of those errors to find out what they are, like the popup told you to do
Im taking this error ;
WARNING: The option setting 'android.enableR8=false' is deprecated. It will be removed in version 5.0 of the Android Gradle plugin. You will no longer be able to disable R8
And im searched about it but cant solve problem
Sorry then just create timer like this ;
@split dew int timer = 5;
if(timer<=0) { //ads show code
//restart code}
else{//restart code}
@split dew in update timer-=Time.deltaTime;
Hi. I'm getting all these Adaptive Performance messages popping up in a brand new project. Should I be worried?
@tired lily Now im understood my problem im deleted project and same project old then i tried to build and i can now. When i delete googlemobileads and installed unityads that time im taking these errors. Why its so ?
keep looking through the errors, the one you found is a warning
Would i come here to get help with joysticks for mobile?
look in your device settings, usually there is an ads menu or something similar under privacy. Google it for your specific device if you can't find it
you can change those settings afterwards in the play console, don't worry about that
your advertising id is unique to your device. On my phone it's Settings > Privacy > Ads menu, where you can view, delete, or reset your ad id
are you seeing test ads? Some advertisers won't start serving ads until your app is live in the store
what ad network(s) are you using?
you need to test on a physical device. Everything in the editor is faked
HI! How I can get good real time shadows on mobile?
I'm using Standard render pipeline, currently my shadows look like this. I saw other games with way better shadows.
try tweaking the quality settings you're using
Do a lot of tweaking and performance testing as said. If the light will always be from 1 direction, you can also fake the shadow with a sprite/quad with a shadow texture you make
Will also allow you to disable any realtime shadows which is a huge performance win
I'm using day/night cycle so that's i need to be realtime
do you have an upload signing key? you should sign your bundle with it
@split dew add there some number, try 1
I use 8k shadows rez but the performance is not good :))
My experience with signing has been in Android studio, they make it pretty straightforward
Just link your account with google and they give you a signing key for your projects
Hey i'm trying so simulate my game on my iPhone via unity remote 5 the issue is that when i press play it doesn't work.
I also saw at the bottom of my sreen that every time i plug and unplug my phone a message is show android extension scan for adb devices is this normal knowing that i'm connecting an ios device.
My platform is currently switched on ios mode.
Anyone knows why this is happening ?
Development build enables the Debug.Log (which for performance probably don't want to do for production). Can't remember what else
Best for production to not do development build
testing is fine though
Hello Labs, what do you think about using google sites for websites?
You've asked that question a few times, what are you trying to do with it?
how can i fix this error its my first time adding ads
I'm doing something wrong here, my game took more than 20 seconds to save, everything is working good but not the save it takes too long to save, I have rly good network connection and the file is like 10kb
it could be not realtime shadow at all
try using projector instead if you want crisp(not jagged) or smooth shadow
step 1 is to find out what the errors are
1: finish relevant section in play store for your listing under policy and programs -> app content
2: add testers under testing -> internal testing
3: haven't seen that one, sounds like something went wrong with proguard and the mapping file wasn't found. Dev build?
4: when building, make sure the create symbols option is enabled to also get a zip. Upload this zip with your bundle
5: bundle codes must be unique and ascending. Edit Bundle Version Code and rebuild
how do i export the google iap csv to google play console? they removed the option
NVM
Helllo everyone, I tried to implement the google play services leaderboard.
All works, but leaderboard UI doesn’t show up nor does it give any error
The screen is just blank 🥹
Hi do u know how to check error log? I have added admob my test ad works fine but real ad doesn't show up
- you tested it on an actual device, right?
- is it published?
- are there any ad load errors? If everything is configured correctly, you may still not see ads due to limited ad serving or no fill
- I assume you went through all the steps to set up your app for admob, right?
- I tested test ad on unity which it worked then I switched to real ID and from my phone it doesn't come
- yes I published on playstore
- I didntnt got any error how do I see that there is no fill or limited serving
- yes
Also thx for helping
define "test ad on unity". You tested in the editor, or you tested on your device and saw test ads?
I tested test ad in editor
so you didn't really test ads yet. Deploy to your device and test there. The editor simulates ad watches
also make sure you've either enabled test ads in the sdk (I assume there's an option) or have added your advertising id as a test device so you don't get flagged for invalid traffic
did you get test ads working with the default demo ad units? once you've verified that works, configure a test device and test it using your own ad units
Yes
Okay
I just now added my test device but when I try to test in my phone I find no difference
By no difference I mean ads not coming
As an FYI, after launch, it can take a week or two before actual ads are served to your device. In the meantime it won't show any ads avail
It has been months
it takes time for the test device info to propagate too, so give it some time. In the meantime, look for any errors in logcat. You're logging ad load failures right?
Oh okay also how do I check errors in logcat?
also as a sanity check, what is your admob app status? I assume you already submitted it, or did that link thing that automatically submits it
googleable, not worth typing out
Admob app status is ready
Okay
2023-01-15 21:28:56.166 12606 13666 Error Unity AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.ads.AdRequest$Builder
2023-01-15 21:28:56.166 12606 13666 Error Unity java.lang.ClassNotFoundException: com.google.android.gms.ads.AdRequest$Builder
2023-01-15 21:28:56.166 12606 13666 Error Unity at java.lang.Class.classForName(Native Method)
2023-01-15 21:28:56.166 12606 13666 Error Unity at java.lang.Class.forName(Class.java:454)
2023-01-15 21:28:56.166 12606 13666 Error Unity at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
2023-01-15 21:28:56.166 12606 13666 Error Unity at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
2023-01-15 21:28:56.166 12606 13666 Error Unity at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:83)
2023-01-15 21:28:56.166 12606 13666 Error Unity at android.os.Handler.dispatchMessage(Handler.java:102)
2023-01-15 21:28:56.166 12606 13666 Error Unity at android.os.Looper.loop(Looper.java:246)
2023-01-15 21:28:56.166 12606 13666 Error Unity at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
2023-01-15 21:28:56.166 12606 13666 Error Unity Caused by: java.lang.ClassNotFoundException: com.google.android.gms.ads.AdRequest$Builder
2023-01-15 21:28:56.166 12606 13666 Error Unity ... 8 more
2023-01-15 21:28:56.166 12606 13666 Error Unity at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0
2023-01-15 21:28:56.166 12606 13666 Error Unity at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x00000] in <00000000000000000000000000000000>:0
2023-01-15 21:28:56.166 12606 13666 Error Unity at UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String class
That's what my log cat says
When I try to click reward ad button
add a custom proguard file and make sure that class doesn't get removed
Okay
this looks right
didn't you say you had test ads from the example working on your device? was that a dev build?
What's dev build? I put test ads just to check in editor then I switched to real ad and uploaded on playstore
so you skipped the parts where I told you to:
- use example ads on an actual device
- use your actual ad units on an actual device that's configured to be in test mode
Again, the editor means absolutely nothing. The admob sdk doesn't run in the editor, it's all fake
you can see running the actual sdk barfs immediately, from your stack trace above
Wait so I add test ad ID on my actual device?
the example ad units as part of step 1, yes. Because the editor is not real, so you didn't test whether the sdk was working
Also I have to paste these on custom proguard right
Okay will do now
yes. Build settings -> custom proguard file. Paste (or combine) contents
then you should see test ads on your device. When that works, make sure your device is in test mode in your admob sdk and test again with real ad units. You'll see production ads that won't get you flagged
Tysm
Hi need help
After building the apk when i open the app it doesn’t run
An error pops up says (app keeps Stopping )
Please help
logcat
Hello Labs, what do you think about using google sites for websites? Please help?
Another question comes up in mind How can I Test my game on my android on iMac in unity? Is Therme anything ? And what do i need to do to make up a Good Quality of my game, so the graphics should bei Good tho
Hello, does anyone know how to reload my game where i left it at on startup? It keeps starting from level - 0 every time i close the app, I want it to start from the time i left the game at.
serialize any info (scene index?) you need to disk, and load it on startup. If your data is simple, PlayerPrefs will do the job
hi does using addresables locally increase build size of the apk
can some one explain
Another question comes up in mind How can I Test my game on my android on iMac in unity? Is Therme anything ? And what do i need to do to make up a Good Quality of my game, so the graphics should bei Good tho
if it's in the build, yes. Why wouldn't it? I don't understand your second question
he said locally, which I took to mean distributed without downloading
Another question comes up in mind How can I Test my game on my android on iMac in unity? Is Therme anything ? And what do i need to do to make up a Good Quality of my game, so the graphics should bei Good tho
build and istall it on your phone?
thanks for the answer but i am trying to load level from the resources folder it has increase the build size it works like this there are 80 level prefabs with different modes(challenge , campaign) with gameobjects in it i am instantiating it whenever level is selected. It works good on memory. I have also tried to with scriptable object(build size is less when using scriptable and not resources) but whenever i go from one mode to another when using scriptable objects the memory usage increases. That's why i am using resources. My question is that is there another approach where I can keep my build size low and without memory leaks.
anything you put in the build is going to increase its size. There is a build report that is produced that will help you find the worst offenders. As for memory usage: if you're using asynchronous scene loading, you might want to periodically call Resources.UnloadUsedAssets. Otherwise use the memory profiler and find out where you're getting leaks
thanks very much for the answer
If a scriptable object is referenced in the scene if Ishift from one scene to another will that scriptable object data will still be in memory?
for example if I load the level from scriptable object play the level but when I shift the from this scene to another and set reference scriptable object to null will the data it contains still be in the memory?
if you didn't destroy it? Yes. That's why I suggest the Resources call; it'll walk the object graph, find those orphaned objects that should have been destroyed, and unload them
if you're loading scenes synchronously, this should already be happening. It's pretty common to use async scene loads instead though, where it wouldn't
Friends, I'm trying to set the admob interstitial in unity. There is a reload button in the game, after pressing the button, the ad will appear first, then the stage will open. I tried to do it but without closing the interstitial the scene opens immediately. The code I wrote is as follows:
admobManager.Showads();
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex, LoadSceneMode.Single);
PlayerController.isDeath = false;
is this on editor or an actual device?
@tired lily in editor
on an actual device, the admob sdk probably pauses the unity player (I use a different mediator but this would be the behavior I'd expect). In the editor nothing is real, that's why it's important to use an actual device to test your integration
@tired lily So should i try on device ?
yes
@tired lily Ok thank you i will now
How can I access Android APIs from Unity and in C#. I'd need to read this function
https://developer.android.com/reference/android/content/Context#getFilesDir()
if you don't want to write any java, use AndroidJavaClass and AndroidJavaObject. Your entry point would be the Unity player class, com.unity3d.player.UnityPlayer and specifically its static field currentActivity
ok, I just did a quick google search, this should work, right?
string path;
using (AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
{
using (AndroidJavaObject currentActivity = jc.GetStatic<AndroidJavaObject>("currentActivity"))
{
path = currentActivity.Call<AndroidJavaObject>("getFilesDir").Call<string>("getCanonicalPath");
}
}
looks good to me
I get this error... I don't really understand it. Sorry I have dumb questions, my programming background is not Mobile/Game development, I've been working the Embedded development space for years with C and ASM.... C# is somewhat new to me
private void SetCallbacks()
{
_wrapper.EnvironmentHandler.SetCoreCallback(_retro_set_environment);
_wrapper.GraphicsHandler.SetCoreCallback(_retro_set_video_refresh);
_wrapper.AudioHandler.SetCoreCallbacks(_retro_set_audio_sample, _retro_set_audio_sample_batch);
_wrapper.InputHandler.SetCoreCallbacks(_retro_set_input_poll, _retro_set_input_state);
}
public void SetCoreCallback(retro_set_environment_t setEnvironment) => setEnvironment(_callback);
private bool EnvironmentCallback(RETRO_ENVIRONMENT cmd, IntPtr data) => cmd switch
{
/************************************************************************************************
* Frontend to core
*/
RETRO_ENVIRONMENT.GET_OVERSCAN => _wrapper.GraphicsHandler.GetOverscan(data),
RETRO_ENVIRONMENT.GET_CAN_DUPE => _wrapper.GraphicsHandler.GetCanDupe(data),
.........
}
System.NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. The method we're attempting to marshal is: SK.Libretro.EnvironmentHandler::EnvironmentCallback
googling around says I need to make SetCoreCallback static, but then that just gives more errors such as
Library\PackageCache\com.sk.libretro@cf14f8392a\Scripts\Core.cs(311,13): error CS0176: Member 'EnvironmentHandler.SetCoreCallback(retro_set_environment_t)' cannot be accessed with an instance reference; qualify it with a type name instead
this works on windows/linux, but this error only comes with Android