#📱┃mobile

1 messages · Page 42 of 1

iron acorn
#

And no, you don't need logcat to connect the profiler.

#

You can connect it. Of course you can't modify it - you'll need to rebuild. But I don't see how that would be possible with android studio.

And while in-game debug tools are useful, you should always use the profiler to troubleshoot performance issues.

#

That's why you **connect **the profiler to the device.🤦‍♂️

#

I'm not sure what you mean by permission...

#

Well, don't rebuild every time. Also, there are ways to reduce the build time.

#

No lol

#

you can connect the unity profiler and the console to the device and receive data from the build.

#

It's unrelated to logcat. You don't need it installed even

#

in packages

#

If you mean that you need and Android SDK for that, then sure, you do.

#

You wouldn't be able to build the app without it though, so you have bigger problem than profiling.

#

No it doesn't. At least it shouldn't. There're other options that affect build time too: Whether it's a mono or IL2CPP build, compression options, etc.

#

If you want to troubleshoot build times, you should look at the build report and see what takes the longest time during the build. Then you can think of ways to reduce it.

#

My game builds in around 5-10 minutes(with all the heavy settings) and it's good enough. I only test on the device before submitting the next release, so once per week-month.

#

Afaik texture compression doesn't happen during the build time.🤔

#

Maybe if you don't have compression settings on your texture assets, it will...

#

Ah. We only use a limited number of mobile friendly shaders, so they compile pretty fast.

#

I see. We don't bake lights mainly to keep the build size as small as possible. And no fancy shaders to keep the performance up on low end devices.

#

How are you doing it though? Exporting the project to android studio?

#

does it not need to rebuild stuff anyway?

glossy sluice
#

Anyone?

glossy sluice
#

can some one help me to modify the code for move 2d player rotation by dragging on screen ?

fiery condor
#

When I create my build for Android, Unity tells me I'm using OnMouse...() events. Is there a huge difference between performance of OnMouse.. and touch?

glossy sluice
glossy sluice
tribal ledge
#

My APK for my android build is 900mb (350mb for desktop version). The largest file is data.unity3d in assets/bin/data. How do I see what is causing this massive size? And how can I go about reducing this?

latent violet
#

@tribal ledge strange

#

Is your project a big one?

glossy sluice
tribal ledge
tribal ledge
#

I'm trying to work out a second issue if any of you have some suggestions:
On Async load scene my android app just crashes, no error messages just a crash and all messages stop coming through in Android Device Montior. I'm using API level 28 on a android version 9.
Any suggestions on how to debug what is causing the issue? It loads the first menu fine, but on scene change crash.

tribal ledge
iron acorn
#

It probably is due to your images being not compressed.

tribal ledge
iron acorn
#

But yeah, after a build open your editor log file and search for the latest "build report" it should show what assets take most space in the build.

iron acorn
#

For each texture you're using.

tribal ledge
iron acorn
tribal ledge
#

im in a build let me cancel it check my settings

tribal ledge
#

like 400 of them

#

Is this not correct for android?

iron acorn
#

The biggest texture in my project is around 2 mb and it's a texture atlass used by most models in my game. Overall textures take less than 20mb in my build report.

iron acorn
#

It tells you that it can't be compessed and why.

#

Textures should power of 2 most of the time.

tribal ledge
#

To make them square I would need to add blank pixels on the side

iron acorn
#

Or stretch them.

#

Stretch/Crop

tribal ledge
iron acorn
#

Because you should optimize your assets.

tribal ledge
#

ok one sec, what do you mean by stretch/crop

iron acorn
#

You have to figure a way to make use of optimized assets.

tribal ledge
#

do you happen to know a guide or something for this?

iron acorn
#

Stretch would occur if your texture is 512*1024 and you're trying to make it display with a wider aspect ratio.

#

I don't think there's any tutorial on that. It's just kinda common knowledge thing.🤔

tribal ledge
#

im trying to look for someguide or something now

tribal ledge
iron acorn
tribal ledge
iron acorn
#

512*1024 is pot too

#

256 1024

#

etc

tribal ledge
#

well one that is notthat dimention

#

say you have a card. Cards are never that dimention

#

how would you go about that?

iron acorn
#

Hmmm

#

Is it the whole card?

tribal ledge
#

well there is a bg and an image both are fairly strict to be a non 1:2 ratio

#

and it must be done, slay the spire and hearthstone all have full card borders

iron acorn
#

I'd use the same frame for all the cards. If it's 1 uncompressed texture, that's fine

tribal ledge
#

Ok thats fine but then the card art?

iron acorn
#

Also there are compression methods that don't require pot

#

Looking at yu gi oh cards for example, their art seems to be a square image

#

Or very close to it

tribal ledge
#

Well, my worst-case method atm is just stretching the images, but wondering if there is some best practice way to deal with this.

iron acorn
#

cropping is also an option

tribal ledge
#

can't do that because it would cut important art

iron acorn
#

have a pot image that is bigger than the displayed part and crop it so that only the desired part is visible

tribal ledge
#

This is the cards atm

iron acorn
#

it doesn't you do it yourself. If you're using a mask of the image, for example.

tribal ledge
#

ok so maybe I can add whitespace beyond the edges and then mask it?

#

hmm

#

guess I'd have to do that then

tribal ledge
iron acorn
#

Did you check your build report? How much space do the textures take overall?

tribal ledge
iron acorn
#

Take a screenshot from the top of your build report.

tribal ledge
#

But the game still crashes on android on scene change, and really struggling with getting the profiler to work with the app.

iron acorn
iron acorn
#

Hmmm... What profiler modules do you have open?

tribal ledge
#

all of them I guess?

iron acorn
#

Disable those that you're not using
They're imposing additional overhead.

tribal ledge
#

sure, the issue though, is when I try to connect here:

iron acorn
#

And GPU module can cause profiler problems on mobile devices.

tribal ledge
#

Manual connection doesn't work and adb forward tcp:54999 localabstract:Unity-com.BiggerWorldsGames.CosmosInfinity
doesn't work either

#

same with a range of ports

#

this is USB debugging

fiery condor
tribal ledge
tribal ledge
# fiery condor You don't have a too heavy loop at startup of that scene?

In command line logcat the last thing I get is: [Singleton] An instance of SceneLoaderAsync is needed in the scene, so '(singleton) SceneLoaderAsync (UnityEngine.GameObject)' was created with DontDestroyOnLoad.
So it just crashes after trying to load the scene. However, in Android device manager It seems to start with the start methods of all the scenes menus, seems to crash when loading settings menu so maybe I can investigate that, its hard there though because when it crashes all the unity logs disapear from it XD

iron acorn
tribal ledge
#

manually connecting gives me "connection refused" no matter the ip combinations too

iron acorn
#

Try disabling all modules but the CPU, then reconnect your device to the USB and try to connect the profiler again.

tribal ledge
iron acorn
#

Just to make sure: you have developer mode enabled on your device, right?

tribal ledge
#

When re-starting I still have the same options in connection even without anything plugged in

#

and yes

#

as if an option for android player. Maybe I'll try restart my PC

iron acorn
#

@tribal ledge you try to connect to a development build, right?

fiery condor
static plume
#

Anyone have an issue after adding Google play services to an android build with the game crashing immediately on the device? Everything worked beforw

iron acorn
static plume
#

I'm trying to follow instruction online on how to get logcat in android studio. Not seeing it though

static plume
#

Which package?

#

Android logcat got it. Thanks

#

2021/10/17 09:34:42.626 2345 2345 Error libprocessgroup set_timerslack_ns write failed: Operation not permitted

#

Only Error

#

nvm

#

What is the best way to paste my logcat here?

neon thicket
static plume
#

I was not sure because of it being a log

static plume
#

?

iron acorn
static plume
#

Thought all android apps had to be arm64?

iron acorn
#

That's unrelated.

#

you want to debug the crash right now, no?

static plume
#

It did build and run with arm64 off

#

and scripting background set to mono

iron acorn
#

arm64 is unrelated

iron acorn
static plume
#

Yes

#

No sorry

#

It was iL2CPP

#

Just now when I rebuilt with mono it worked

iron acorn
#

Well try to get a log with mono

#

and change the build config type to debug

#

Ah, that setting is probably disabled in a mono build, so ignore that.

static plume
#

That wasa log in mono set as debug

iron acorn
#

I don't see anything related to a crash.

#

Filter the log with unity tag

static plume
#

I dont reall know how to do that.

iron acorn
#

There's a tag column in logcat window.

#

Right click and select unity

static plume
#

Do I need to search the tag on log of when the game was crashing?

iron acorn
#

Yes, of course. There's no point in a log of a properly working game, is there?😅

static plume
#

Could my NDK version be out of whack

iron acorn
#

There's anot column to the right(I think). You should select it to filter errors only. There's a lot of useless noise info.

iron acorn
static plume
#

OK, I am building it right now with IL2CPP and arm64 checked

iron acorn
#

?

#

The log with IL2CPP was useless though...

static plume
#

Why is that worthless? That is when the game is crashing immediately, The game is working 100% correct with mono, there is no crash

static plume
#

This is the log with unity tag on the IL2CPP build

#

last link is the no tag error only

iron acorn
#

As I said, the stack trace is unreadable. Try changing the build type to debug at least. It's currently Build type 'Release'

#

I think it's the compiler configuration setting in the player settings.

static plume
#

Only PLace I see to change is under publisihing settings minify

iron acorn
#

Take a screenshot of your player settings

static plume
#

I found how to change it to debug

#

it was c++ compiler

#

That is a the logcat in debug

#

nvm still says release

static plume
#

Finally, this is the logcat in development

#

Doesnt Really show anything else

static plume
#

So I finally got it to build with il2cc and arm64, I had to turn off arm7(32)

#

Really strange.

#

So if both boxes are checked it crashes, really odd, does good still require the 32bit and 64bit

#

Google

latent violet
#

@static plume well Google requires a 64bit.....you can use only 64bit and they're accept it

static plume
#

Yeah, thats what I did, just odd, it wwas working then it wasnt

latent violet
#

Reasons why it's advisable to use both 64 and 32 bit is because some devices are 32 bit devices

#

So if you build for only 64 bit, the game won't run in a 32bit device

static plume
#

I have seen others that have had the issue

#

most devices in the last 3-5 years are 32 bit right? This is my first published game or app, I have been working on it for about 6 months. I am ready to publish it and move on to bigger and better things.

#

Take my new knowledge with me

latent violet
#

most devices in the last 3-5 years are 32 bit right? This is my first published game or app, I have been working on it for about 6 months. I am ready to publish it and move on to bigger and better things.
@static plume yeah

#

The ultimate goal is to successfully finish a game

#

The more you finish developing a game the more the experience you get

static plume
#

Yes, very excited about it, did not anticipate the google publishing to be such a PITA.

#

Now that it is lesting publish for internal, I just need to set up the leaderboards and achievments. I have everything done on google cloud. Just need to attach it to gui I assume

latent violet
#

Yes, very excited about it, did not anticipate the google publishing to be such a PITA.
@static plume lol

#

Now that it is lesting publish for internal, I just need to set up the leaderboards and achievments. I have everything done on google cloud. Just need to attach it to gui I assume
@static plume yep

#

Like me, my next move is to use a custom Leaderboard and achievements

#

I want people to be able to use custom name rather than their Gmail for Leaderboards

static plume
#

Gotcha

tribal ledge
# iron acorn Actually I think that's normal. I have it too, despite my device not being conne...

So finally got it working just following this tutorial: https://www.youtube.com/watch?v=iCXwaehzRFQ and now I have my profiling. Could the issue be memory though? it only goes to 118MB before it crashes. It seems like its something else. (unless 118mb is too much for Samsung S8? according to ram usage it used 208mb max, which is less than my free ram of 1.3gb)
Seems like its something else thats randomly crashing it

iron acorn
tribal ledge
tribal ledge
iron acorn
#

Then you should filter by Unity tag to hide unrelated messages.

tribal ledge
#

Let me do it again make sure

iron acorn
#

Take a screenshot of your entire logcat window. Maybe there's some other problem with it

tribal ledge
#

Same for the android device monitor, but at this point in the device monitor the "all messages" baloons to 1000+ messages each second and then the unity logs are wiped in the UI (probably because too many messages)

iron acorn
#

Did you try using the unity logcat package?

tribal ledge
#

um no whats that?

#

but it would prob be the same? why'd it be diffferent

iron acorn
#

It's a package for unity that shows the logcat and allows to configure it in different ways.

tribal ledge
#

ok ill get that and try it I guess

iron acorn
#

I'm not sure if that'll change something. But I'm more familiar with it. And it includes some additional info.

tribal ledge
#

mk ill install it see what it says

tribal ledge
#

just search unity?

iron acorn
#

No. Right click the tags column

tribal ledge
#

ah great

#

and yes it says the same

tribal ledge
iron acorn
#

Select your app in the filters:

tribal ledge
#

have to run it agai to do that

#

so im doing that

#

then make it crash again?

iron acorn
#

Yes

tribal ledge
#

Same

#

Just crashes

iron acorn
#

Also check that in priority it doesn't only show info

tribal ledge
#

yep its verbose

iron acorn
#

Hmmm

tribal ledge
#

.>

iron acorn
#

Okay. What if you disable the unity filter(tag) and scroll to around where the crash happens?

tribal ledge
#

For the application?

tribal ledge
#

or maybe it did, but it looks like after the crash

iron acorn
#

Hmmm

#

The last message suggests that your game was doing something heavy on app start.

#

are you doing something heavy on awake/start?

tribal ledge
#

Scene start, the only things I can think off is starting like 10 tweens to close the menus, loading textures for menu icons and items etc

tribal ledge
iron acorn
#

Wait, so when does the crash happen?

tribal ledge
# iron acorn Wait, so when does the crash happen?

Game start -> login scene -> login -> loads from Playfab data -> scene change when loading is done -> Awake on at least the settings menu is completed -> crash any time between this and before menu is displayed

iron acorn
tribal ledge
#

Thats CPU and Memory when it crashes at the end there

#

what do you mean by what point though? how can I see more detail on where I am up to in the code here?

iron acorn
#

What are the blue spikes?

tribal ledge
iron acorn
#

But it shouldn't be too much different from the graph. Just showing more details.

tribal ledge
#

I won't be able to find what is causing the crash just what isn't I guess

iron acorn
#

Yeah, I don't think that's the issue

#

I feel like it's something with playfab or the way you use it

tribal ledge
#

Possibly, maybe I can do some research on that, but without seeing any error messages this gets really difficult >.>

iron acorn
#

I've no clue about playfab, but the spikes seem a little suspicious. taking 50 ms to parse the data feels like to long.

#

What kind of data do you load with playfab?

tribal ledge
#

Not somethign I do

iron acorn
#

50 ms for 1 check? I don't think so

#

But yeah, I've never used it, so no clue.

tribal ledge
# iron acorn But yeah, I've never used it, so no clue.

mm Can't seem to find anything from cursory google searched, maybe I'll post a forum Q, but either way I don't think its related to the crashes, its not happening during one.
Still any suggestions on methods of narrowing this down? Should I just add debug messages to all the start methods in the main menu see where it stops?

iron acorn
#

The only time I encountered a crash without any errors is when I was running out of memory, but it doesn't seem to be the case for you.

tribal ledge
iron acorn
#

Donno if you know this, but it's way more convenient to navigate the profiler in hierarchy mode

tribal ledge
# iron acorn

I didn't, just found it now and seems to be my solution

bold fern
#

Any idea how to close my Unity game when using Unity as a Library? Application.Quit() closes the parent app too, which is undesirable.

bitter wasp
#

has anyone tried firebase authentication for Logins and SignUp? My project requires facebook,apple and google account for authentication. Just not sure where to start

analog plover
#

Firebase has pretty good documentation

tribal ledge
iron acorn
#

more importantly, what's the method that's getting called?

#

can you expand the column a bit?

#

aah, I see it in the top right now.

tribal ledge
#

nothing there unfortunately

iron acorn
#

What do you do in MenuManager.OnEnable?

tribal ledge
#

It could be in the load card database, I am loading 2D textures and converting them to sprites. but again it should appear under that function then. I;ll try that anyway

iron acorn
tribal ledge
iron acorn
#

Doesn't seem to be enabled on your previous screenshot

tribal ledge
#

Cool! will try that again thanks

dim ledge
#

Does Uniti have a mobile version too?

#

Or 'moblie' here means mobile games

analog plover
#

It means mobile games

#

Coding on a mobile would be absolute hell

latent violet
#

Who else is currently making a squid game remake?

bleak forum
#

does anyone know how to schedule notifications? Like for example, make a notification pop up every Monday 8PM?

tribal ledge
iron acorn
tribal ledge
iron acorn
#

Can't say anything specific without seeing the code.

#

It could also be that this method is called over many times. The method above it is at least. Over 3000 times.

tribal ledge
#

It looks like its the visuals

rain leaf
tribal ledge
#

as in when its trying to draw the assets it doesn't seem to be any of my code specifically

iron acorn
tribal ledge
#

Like doesn't go into any of the ifs, I am pretty sure its not that

#

I anyway dissabledit no change

iron acorn
#

And it still appears in the profiler?

tribal ledge
#

oh no but somethign else has that time then

iron acorn
#

What is it?

tribal ledge
teal canyon
#

Heh, funnily enough, that prompts Unity to warn that I'm not using a recommended JDK like... that's literally the recommended one, the one installed alongside Unity.

At any rate, that's fine and all, but is there a way to get them to work together without having to go in manually and do this for every project?

tribal ledge
# iron acorn What is it?

Yeah so no initializer, the CPU is really down- What I think was causing it actally the animations. For some reason all my animations spike the CPU really badly. And when I was loading the main menu I had a bunch of animations at the same time

iron acorn
tribal ledge
# iron acorn That would mean that Initializer triggers them.

Menu manager triggers them, initializer was remoed when it was still doing it. - I recon it was because initializer was the last awake, and the profiler didn't record the animation because it does so after completing the animation so it all went under the last awake call

iron acorn
tribal ledge
#

XD

#

I still need to figure out why the animation is so intensive

iron acorn
#

What kind of animation is that?

tribal ledge
#

I am using dotween

#

The one which is intensive atm though, Is I am animating by moving anchor points, maybe thats why I can check that

sinful sage
#

Anyone thinnk they might be able to help me get my unity to allow me to build on android, i have installed the SDK and such but get an error for "graddle"

#

Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.

#

I have uninstalled this and installed a lower version, 26 as thats the lowest unity will allow

tribal ledge
sinful sage
iron acorn
#

Install 30.

tribal ledge
# sinful sage

Yes, and in build settings when you build you need to select the same oneas you ahve installed

iron acorn
#

31 is unstable on unity yet

tribal ledge
#

Looks like its text for some reason, constantly being re-drawn

#

When im animating

sinful sage
#

I dont have it installed, thats what it intially installed, i have 26 and a few lower ones now

sinful sage
#

i had it installed first, and it didnt work

#

as you see its not installed in the SDK manager

iron acorn
iron acorn
# sinful sage

I'm not sure if the initial problem was related to sdk in the first place.

#

And as I said, you want 30 installed, not 31.

sinful sage
#

oh i had it installed with a good few others down to like kitkat

#

ok i will install 30 again and see what happens

#

what would you think the problem is if its not the SDK? I am getting "gradle" error

iron acorn
sinful sage
#

Ok just a moment let me try to install this 30 again and do a build and i will post them, i couldnt find a proper answer for myself on google

tribal ledge
sinful sage
#

Starting a Gradle Daemon, 1 incompatible and 6 stopped Daemons could not be reused, use --status for details

Configure project :launcher
WARNING: The option setting 'android.enableR8=true' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8

iron acorn
sinful sage
#

i got to potty, and pull some hair out 😛

iron acorn
sinful sage
#

is there another place i should set it besides here? also using unity 2020 lts version

iron acorn
sinful sage
#

oh ok your right it is showing that 31 is still in the folder.. but none of the others i downloaded to that directory are

#

let me see if i can find out where they downloaded right fast

#

hmm i dont see any other installs.. let me restart.. maybe i need to restart with each install

latent violet
#

Anyone having issues with SDK

#

Download Android version 31

#

Then after download, extract the zip and move/copy it to the Unity path where the SDK is stored

iron acorn
latent violet
#

That's how I solved my issue with sdk

sinful sage
#

yes

iron acorn
sinful sage
#

Yeah they are not in there, the 31 is but its not supposed to be installed

#

trying this method above right fast

#

Yeah this dont work above

sinful sage
#

so it automatcally installs 31, i found the other installs but if i remove 31 it instantly fails without trying to build saying it cant find the tools, and i have it set to the directory

iron acorn
glossy sluice
sinful sage
#

ok i changed it there this time, there is actually another install also

glossy sluice
iron acorn
sinful sage
#

i did before so i actually got it to work by copying the 30 from unity folder to the studio SDK folder

#

allot of data wasted >_<

tribal ledge
# iron acorn Should probably uninstall 31 as well

So, after all that, it looks like the final culprit was all my TextMeshPro texts. Having underlays and outlines really really hurts, so much that it crashes the app. My scripts were fine (although I made them more efficient anyway XD, atleast something good came out of this) but each time the TMP texts wanted to render like 20 texts it would just destroy the CPU

tribal ledge
#

Gonna ask since I can't find much info online for this.
I am loading 100 cards with 7 TMP objects on them each (this looks like the 680 OnPreRenderCanvas).

  1. Why do I get 9k TMP.GenerateText
  2. Even with all the TMP objects having no shadow, this is still a ridiculous amount of CPU time. Any thoughts on this? Can you just not have TMP on android? Do I really need to make a separate android build where all the texts are normal text objects? Or is there some other workaround here?
latent violet
#

Anyone use ASO when publishing to play store?

iron acorn
tribal ledge
iron acorn
#

I'd do pooling then.

tribal ledge
#

But any idea why there are so many text calls? What I am doing is:
For each card doing: cardList[i].DisplayCard(cardname);
And in the DisplayCard function setting all 7 texts to whatever they need to be.
No idea why its making so many calls..?

iron acorn
iron acorn
tribal ledge
#

yeah exactly

#

It is done once

#

when I open the deck editor but still, its done once

iron acorn
#

But they keep on updating?

tribal ledge
#

No

#

Its just that once

#

but it takes 10 seconds

#

to do them all

#

you can't wait 10 seconds whenever you open a new menu for the first time

iron acorn
tribal ledge
iron acorn
tribal ledge
iron acorn
tribal ledge
#

cool ill see if that helps thanks

iron acorn
tribal ledge
iron acorn
#

You mean in the prefab?

tribal ledge
#

I mean, I would fill the editor with default cards, so I don't instancitae them at all just edit them and set to active

tribal ledge
# iron acorn Does it take as much time without deep profiler?

Without the profiler, the first time I opened that slider it crashed. The second time (When I re-start the app) it took 1~2 seconds and that's what it is doing from now on still. How is this possible? Does android do some sort of caching to make this faster???

#

Without the profiler I still get intermittent crashes, when I touch the screen while its loading

#

Yeah just crashed again on loading the cards no screen touching

#

.> hmm

iron acorn
tribal ledge
iron acorn
#

Then no clue.🤷‍♂️

tribal ledge
#

getting random crashes though is really not good. I'm using api 28 though, maybe ill try with 29 see if it changes anything

bleak forum
cobalt leaf
#
  Vector3 direction;
  float speed;
  //
  while ((direction - transform.position).sqrMagnitude > Mathf.Epsilon){
  transform.position = Vector3.MoveTowards(transform.position, direction, speed * Time.fixedDeltaTime);
  //must always return data
  yield return null;
}

I have this while loop with a MoveTowards to move the player to a certain position and it works as intended while testing it on the PC but when I build an APK and try it on my phone the movement is very slow, somewhere around half the speed I would get on my PC and I don't get why

bitter wasp
#

Has anyone tried making plugins for unity?

tribal ledge
tribal ledge
fiery condor
#

How can you receive the event of using the back button or swipe back from, for example, android devices? To make that as another way to go back to home menu?

quartz kernel
#

It's the same event as escape on PC @fiery condor

fiery condor
cobalt leaf
#

and yes, the StartCoroutine is inside an Update()

#

I guess I'll try changing it to a FixedUpdate and if that doesn't work I'll move the speed float from 1.5f to 3

#

FixedUpdate kinda solved it but it still feels slow so I'll *2 the speed

silent wharf
#

who knows that mobile game called Will it crush?

#

i want to make a way better version of the game without ads

latent violet
halcyon rampart
#

hmm, yes. i am apro.

iron acorn
#

And starting a coroutine for movement in update/fixedUpdate is probably a wrong decision as well.

tribal ledge
# cobalt leaf FixedUpdate kinda solved it but it still feels slow so I'll *2 the speed

As dilch said, you shouldn't really be using coroutines for movement, better just do the operation in update/fixed update.
For the previous thing, you misunderstood what I meant: Yeild return gets called each frame. That is at the speed of "update" not "fixedupdate". It doesn't matter where you call it, you should be using time.deltaTime inside a coroutine to tell how much time has passed from each call but I am not sure if that is even a good idea anyway; just use update/fixedupate and the corresponding delta time. (Have a bool which is like "am moving" which can be switched on/off if its moving).
For this you should read the whole documentation on coroutines in C#/unity, there will be more gotcha's like this in the future which you can learn about easily through the documentation

#

Also @iron acorn Finally solved this for good! FYI: https://forum.unity.com/threads/tmp-textmeshpro-massive-cpu-time-for-tmp-generatetext-on-android.1185193/ -> https://forum.unity.com/threads/textmeshpro-precull-dorebuilds-performance.762968/#post-5083490
Its autosize + layout group is incredibly inefficient. Recommendation is to not auto-size but to have a controller which autosizes one text and then copies manually the found size to all other texts of the same size or something of that sort.
The whole time it was cos i had many auto-sizes in a layout group XD

iron acorn
cobalt leaf
iron acorn
cobalt leaf
#

you're not picking up what I'm saying but ok, thanks

iron acorn
bleak carbon
#

Hey guys, i am wondering if anyone ever tried to check if the silent (Physical side button) on the iOS device is on/off. Tried to find solutions but they all say that there is no native iOS API that allows to check for that.
So if anyone ever got any solutions i'm all ears 😄 Thanks for the attention

sonic otter
#

Interesting read from the Epic v Apple case

#

These massive companies get 70% of their money from less than 10% of their users.

#

I've always wanted to make a game that everyone would enjoy over focusing on that small 10% group. Maybe the idea for being profitable is by making a game that targets that 10% demographic. The "whales." It makes total sense that companies in the gambling industry are shifting to making games like this. Raid: Shadow Legends for instance was made by Aristocrat, a gambling giant company.

static plume
#

I set up admob in my unity android game, I have a internal testing in google play console, the ads with the test codes was working properly, I changed out the test ad codes for my adunit codes in admob, I am still gtting the test ad, is this normal until I publish it?

#

I thought it should send an no fill error

silent wharf
latent violet
#

Hello

#

Pls I need someone to explain how unity ads net 60 days works

#

Is it that we get paid after every 60 days(2 months)??

neon thicket
glossy sluice
#

Hello, i have published a game to play store 1 year ago or so (Mutant Slayer) I have checked everything and the game seems to run very well on most android phones but for some reason some people cant play it (leaving a bad review saying it), if someone could help with this problem it would be greatly appreciated, thanks.

glossy sluice
latent violet
#

@neon thicket so every 2 months... Damn

#

That's long bro

heavy crypt
#

hello, i was wondering if i make a google play developer account can people see my real name?

#

i know theres a developer name i can add to it but can people see my actual full name as well?

shy shard
#

Do you guys happen to know what is accounted for this pink system section?

runic hornet
#

Hello. I am about to start developing a new game for Android. what version of unity 2020 or 2021 would you suggest to use and what would be the reasons?

neon thicket
#

Either will work. Reason is, either will work.

runic hornet
#

Not very helpfull

latent violet
#

Hello. I am about to start developing a new game for Android. what version of unity 2020 or 2021 would you suggest to use and what would be the reasons?
@runic hornet 2021 and the reason is the newer the version the latest things it supports

runic hornet
latent violet
#

But if it's a trade-off, like newer features but worse performance and stability (bugs) ?
@runic hornet don't worry about it.... That's why you should always use the finished version

runic hornet
#

Mkay

runic hornet
#

I guess URP is latest trend

latent violet
#

What would u suggest for template? The "mobile" one, or URP?
@runic hornet default

#

I'd recommend using the default pipeline for mobile

#

But it's clearly up to you and what you're planning to make

runic hornet
latent violet
#

You suggestion is based on...?
@runic hornet mobile Optimization

#

But like I said....it's based on you

heavy crypt
#

i have google admob set up and the test ads work great in the Unity editor, but they don't show up at all on android devices, does anyone know why?

latent violet
#

i have google admob set up and the test ads work great in the Unity editor, but they don't show up at all on android devices, does anyone know why?
@heavy crypt well admob ads won't show when they've not yet reviewed your app on the store(app store or play store)

#

According to their new system, your app needs to be valid in the store and they'll Review it and after reviewing, ads will start showing

timid heart
#

how to download ndk version 19.0.5232133

latent violet
#

@timid heart download this one

#

Then after downloading and unzipping it, rename it to "NDK" and inside, you'll see something called "Source properties", edit it and set the Value to 19.0.5232133 (which is the one for the Unity version you're using)

mild pasture
#

Is it possible to see a runtime console on game screen in iOS build?

sonic otter
#

URP is the typical renderer for mobile no?

sonic otter
mild pasture
sonic otter
#

Drop in a Text gameobject with a black background and direct your errors to that

#

or maybe a scrollable text object

quartz kernel
mild pasture
sharp lion
#

Whats the easiest CI/CD setup for Unity projects (For deploying to appstore and google play)?

latent violet
#

Whats the easiest CI/CD setup for Unity projects (For deploying to appstore and google play)?
@sharp lion pls can I ask what's CI/CD?

sharp lion
#

Its for automating builds to publish automatically

latent violet
#

Its for automating builds to publish automatically
@sharp lion well that is based on the store(play store or app store) not unity

sharp lion
#

Just wanted to know if there are any existing solutions as the builds need to be created from Unity.

heavy crypt
#

im sorry to keep asking about ads but this is super new to me, i read that I have to ask for consent from EU players to see ads (or maybe i'm misunderstanding), do I have to personally add a yes/no button in game?

analog plover
#

You are misunderstanding

#

If you (or the ad provider) collect personal data to show personalized ads, you need to ask permission for that or a way to opt out

#

but you don't need a permission to show ads, unfortunately

heavy crypt
#

ah i see

#

thank you for the info

#

i appreciate the help 😄

dim dune
#

guys my 2d game is dying in rendering sense

latent violet
#

Just wanted to know if there are any existing solutions as the builds need to be created from Unity.
@sharp lion you can build from unity

#

And manually publish it to the store

sharp lion
#

Yes, but want to avoid manual step as there are many apps to deploy.

latent violet
#

Yes, but want to avoid manual step as there are many apps to deploy.
@sharp lion sorry mate... That's the only possible way to do it

analog plover
#

few hours ago you didn't even know what CI/CD is

#

Unity even sells their own product for it

latent violet
#

That's obviously BS
@analog plover what's BS?

#

Pls you guys should chat in full

#

Not everyone gets the abbreviations

analog plover
#

Let's just say it means that you're mistaken

latent violet
#

Let's just say it means that you're mistaken
@analog plover for what?

analog plover
#

About the thing I replied to

latent violet
#

About the thing I replied to
@analog plover about what?

olive belfry
#

Hello everyone,i want to ask something ,how to make outer glow or neon effect for unity mobile games without post processing or image effect? thanks

remote schooner
#

Is it possible to use shader graph with mobile ios/android?

hoary whale
#

Hello, I'm working on an Android project with Unity 2021.1. I'm trying to show the status bar all the time to avoid front camera hiding some of my UI, but I found that PlayerSettings.statusBarHidden is not supported on Android, is there a work around to do it ? Thank you for your time 🙂

rain leaf
rain leaf
rain plank
#

any idea why I would get SDK missing problem ?

#

2020 LTS

#

doing this... but not actually hopeful

latent violet
#

@rain plank is your SDK setup correctly?

rain plank
#

@latent violet yeah. As weird as it might sound, i moved the installed sdk and all other stuffs around it from unitys sub folder to Program Files/Android ... And now it works for some reason

rain plank
rain plank
rain leaf
sturdy oracle
#

I can't add modules to my Unity editor. What's happening?

iron acorn
sturdy oracle
#

Yes. Today I just launched Unity hub and I saw that under the version of my editor wasn't the icon of Android and I clicked to the three points and it just say: Show in folder and Remove from Hub

iron acorn
#

Hmm... That usually happens if you install it externally.

sturdy oracle
#

In addition my editor wasn't in the hub I had to put in from the explorer

sturdy oracle
iron acorn
dapper estuary
#

@sturdy oracle I'd try closing and re-opening the Unity Hub or rebooting the system. If this doesn't fix it, maybe try reinstall your version through the Hub, selecting the Android module during the installation process.

sturdy oracle
iron acorn
#

Via the hub

sturdy oracle
#

Let me explain. I just turn on my laptop, launched Unity Hub and I saw that the editor wasn't there

#

So I looked for that in the documents and add it again again

#

But when I opened the editor my code or input didn't work so I had to do a new project and do it again. Android module is avaible again but I can't add more modules

rain plank
rain plank
#

You have to kbow exactly what your version is, then google to download the unity assistant if that version. Once downloaded, you'll see you don't need hun anymore, because the download assistant has the ability to add modules just like hub does

sturdy oracle
rain leaf
#

Like this

rain plank
# rain leaf Like this

Yeah... Though technical that's an inline but as long as players don't realize it, it's fine i guess 🙂

spiral breach
#

I'm having trouble with my uhhh Unity Editor

#

It says on the editor that there are no android modules, but my Unity Hub says that it's installed.

#

I'm just pretty new to Unity

fiery condor
spiral breach
#

I installed it with Unity, but I encountered an error or something

#

so I aborted it

#

I went to make some stuff on Unity

#

but then I decided to export my project on unity on android

odd arrow
spiral breach
#

Hopefully it works

odd arrow
#

That's the Beta Hub problem though. You can just reinstall new one, no reason to go back

spiral breach
#

idk

#

but that's what it said as far as I can remember

spiral breach
#

so it happened to both of them

odd arrow
#

It might be related to that it was not installed in the first place, but marked so by Beta Hub. Like I said convert to regular Hub and just reinstall

spiral breach
#

do you mind sending me a link

#

I'm just new to game development 😅

odd arrow
#

Beta Hub converted back by selecting build stream it's called something like that

#

in its settings

spiral breach
#

So I'll pick Production?

odd arrow
#

yes

spiral breach
#

Alright

#

Then I'll just reinstall Unity

#

I'll update you once it's done

spiral breach
#

this is what I'm talking about

#

any advice on what to do here?

#

any help would be appreciated

odd arrow
#

ignore

#

@spiral breach

spiral breach
#

ah, I see

#

then?

#

I'll just open Unity?

odd arrow
#

Yes. Open Preferences > External tools and confirm they are installed

odd arrow
#

It's a menu in Unity

spiral breach
#

ah, in the editor, sorry about that

#

is this okay?

odd arrow
#

Weird that your JDK was not installed properly. Did you choose it as a module?

spiral breach
#

i did

#

I chose it

odd arrow
#

Well try building something it could be fine

spiral breach
#

alr

#

i'll try

odd arrow
#

Otherwise you may need to reinstall the editor, I'm not sure if just deleting the modules will work, but might have to do that as well manually for that JDK specifically. Before reinstalling.

spiral breach
#

I see

iron acorn
#

try unticking it and ticking again. It sometimes bugs out.

gaunt notch
#

Hello! I have a problem - I'm copying Texture2D to RenderTexture (R8 format). It works in Unity Editor. But not working on Android. How can I fix it?

glossy sluice
#

So um putting 2 characters (Skinned Mesh renderes on em and so on)
is making psvita drop from 100+fps to like 55fps in certain angles
any idea what to do? (Gpu Skinning doesnt seem to do anything or makes it worse on here)
NOTE: they dont cast shadows.

sturdy oracle
last plover
#

Hello,
I've got kind of a weird problem here. It's about IAPButton, in the editor everything works as it should (fakestore), but as soon as I upload a build to test on googleplay so when I click on IAPButton it doesn't react at all (doesn't pop up googleplay store) just absolutely nothing happens. OnClick on Button component gets called (test message), but IAPButton component on android absolutely does not respond. Previously the button worked without any problems, but then all of a sudden it stopped responding and yet I didn't change anything about the button or the function of what should happen on purchase.

iron acorn
#

If not, profile in the editor and see if there's anything you can optimize. You need to determine wether it's a CPU or a GPU bottleneck to know what to optimize.

stable horizon
#

When i trying to build app on android i got this errors

Library\PackageCache\com.unity.collections@0.14.0-preview.16\Unity.Collections\NativeList.cs(709,24): error CS7036: There is no argument given that corresponds to the required formal parameter 'safety' of 'NativeArray<T>.ReadOnly.ReadOnly(void*, int, ref AtomicSafetyHandle)'

Im on Unity 2020.3.20 and "com.unity.platforms.android": "0.9.0-preview.9". IOS is ok

iron acorn
stable horizon
iron acorn
mild pasture
#

Anyone else facing this issue with fb sdk?

keen rose
mild pasture
warm adder
#

Did you try checking logs from your device, maybe there are some errors

last plover
iron acorn
eternal gulch
#

Hello

#

i need help related publishing games on google play
I cant find any other channel to seek help

#

So i made games on unity and published in playstore with unity ads

#

what happens to the revenue?
I can see some data on unity dashboard, but on google play console, it says i need to make a merchant account to see financial data

#

do I need to make that?

analog plover
#

The Play Console doesn't have anything to do with Unity Ads

#

The financial data there is for paid apps and in-app purchases (and possibly Google Ads revenue, not sure)

eternal gulch
brave fractal
#

I have previously had firebase working fine, but now I installed crashlytics too and this error came up:

None of your spec sources contain a spec satisfying the dependency: `Firebase/Analytics (= 8.7.0)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

If I try to run the command it suggests pod install --repo-update in the build folder, the error still comes up just without that line. The next suggestion I don't have control over as they are coming from the firebase/crashlytics packages, and I have no idea what the last point is all about. Is there something specific I should try out to get the build working again?

tribal ledge
#

Currently, when I touch with two fingers on android, it treats it as a right-click. I would like to treat a pinch as a scroll instead of as a right click. Is there a way to do this easily with Unity? (I want to avoid having to re-do all the input control for android, everything will work well if pinch == mouse wheel scroll).

sleek eagle
#

I get these errors when selecting android in the profiler (via usb)

tribal ledge
sleek eagle
#

Sadly I get an error when I do that. Im installing my vr game via sidequest

tribal ledge
sleek eagle
#

Restart might be a good idea lol
I saw an issue about it with a fix being made in 2021.1.X

tribal ledge
#

I was before loading my APK onto my device, running it and trying to connect it to the profile

sleek eagle
#

Fair, imma restart and try, thanks

tribal ledge
#

no matter what I did it didn't connect kk

#

good luck

#

Currently, when I touch with two fingers on android, it treats it as a right-click. I would like to treat a pinch as a scroll instead of as a right click. Is there a way to do this easily with Unity? (I want to avoid having to re-do all the input control for android, everything will work well if pinch == mouse wheel scroll).

#

@iron acorn would you happen to know how to do this?^

sleek eagle
#

Maybe calculate the distance to see if it's just a click? (if under 1, right click) and if the fingers move calculate the difference in distance and use that?

tribal ledge
#

^can't seem to find docos on this hence asking here

sleek eagle
#

Old or new input system?

tribal ledge
#

new I guess

sleek eagle
#

Did you install the package?

tribal ledge
#

no idea

#

I'll look into that

iron acorn
tribal ledge
#

mk thanks

tribal ledge
iron acorn
#

For the old one you'd probably need to implement it yourself using GetTouch() and similar api.

tribal ledge
#

.> kk ty

tribal ledge
sleek eagle
#

Whoops haha

latent violet
#

Anyone here using a visual scripting tool?

odd arrow
drowsy elbow
#

so yea, I might not be the first one here to ask this butt.. could someone tell me what's wrong with my setup to debug my android game on my android device using unity remote 5?
I'm getting error

C:\Program Files\Unit\2020.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe forward tcp:7201 tcp:7201

stderr[
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
]
stdout[

]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.ADB.Run (System.String[] command, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)

The error message says that my device is unauthorized, and that I should check for a confirmation dialog on my device, thus no confirmation dialog shows up anywhere.

I have done:

  • Setting device in external tools to Any android device
  • Setting platform in build settings to android
  • Enabling dev mode and USB debugging on my phone
  • Made sure that I can access my phone with my pc
  • Tried restarting unity, my phone and my computer
drowsy elbow
#

I'd appreciate ping once someone reacts to this blobheart

sonic otter
#

have you tried debugging with android studio?

drowsy elbow
#

nope, I never debugged anything remotely lile this before

left shell
#

@drowsy elbow Your device isn't authorized. Have you enabled Android debugging on your device? When you plugged it in did you get a message to authorize?

drowsy elbow
#

I have enabled dev mode and USB debugging, thus when I plug in the USB wire the only messahe I get is if I want to use the USB to charging, transferring photos or transferring files.

fiery condor
drowsy elbow
#

only unity remote to play test my game

iron acorn
drowsy elbow
#

well I don't want to build the game each time I change few values when debugging something

#

and I need unity remote 5 just because I can't do 2 or more touches with mouse at the same time

iron acorn
#

aah

#

touches

#

@drowsy elbow If you open build settings, does your device appear in the Run Device dropdown?

brazen birch
#

Device unauthorized means it is specifically needs you to say yes to allowing the connection on the android device

left shell
#

@drowsy elbow Try clearing authorized devices in your developer settings on Android and re-connecting. You should get an alert that shows a fingerprint and asks you to authorize. I've run into this before and clearing previously authorized devices and some reboots cleared it up.

left shell
pseudo kiln
#

does anybody have knowledge about admob

median lark
#

I can't connect to my phone can someone help?

#

Trying to use Unity remote 5 but it wont coonect

#

please ping me if you got an answer

proper perch
#

2 questions (of some?) for mobile developers (iOS specifically) that are experienced with Unity:

  1. When exporting the project to XCode to compile and run on a development device (ie. iPhone XR/6S/etc), I noticed with Unity 2019.4.x builds that XCode complained about deprecated languages and whatnot, like "don't use things like lang.en.plist, use one Language.plist and define all strings there" (not 100% sure on terminology here). I know this is moot point but do newer versions of Unity address this, or is it solely there so developers using newer XCode on older versions of Unity (ie. XCode 15 with Unity 2019) don't get a compile error or issues in the build process?

1a) Unrelated but I do know that Unity's headers and library makes XCode emit a LOT of "unused variable" and constructor warnings/deprecated warnings, but no fatal compile errors. I assume that's just compatibility stuff.

  1. When exporting the project and going to build, I have to open the Xcode project with the IDE and then manually set what I'm signing it with (ie Personal Developer, my apple ID). Is there a way to tell Unity on Mac to say "Hey, I want you to export this project, but set it to be signed with my development key/licenses that XCode knows about" ? Otherwise I can get a compile happening but as soon as it goes to push it to the target device, it fails because my device does not accept unsigned development packages, and says "Please go and set the signing property in this page, blah blah".
bitter belfry
#

Hey y'all, does anyone know if it's possible to do runtime c# compilation on android?

I'm trying to see if I can get an open source project to run on Android, but I get these errors related to runtime compilation that'd I'd like to resolve if possible

latent violet
#

does anybody have knowledge about admob
@pseudo kiln don't use your personal admob else you'll have problems, just telling you the main truth

drowsy elbow
glossy sluice
#

Anyone know how to get a project to a .apk so that i could maybe play it on mobile?

glossy sluice
#

Ah, makes sence

#

Yes

outer gazelle
#

yet i can't build an apk

tribal ledge
frozen vapor
tribal ledge
#

Why is this window? I can't find it anywhere or any info on it...

gaunt swan
#

prolly when you try to build an apk thats more than 100mb?

tribal ledge
#

Found it, its available when you install the google plugins for android

grand nova
#

Hi, I am in need of suggestions.
I am creating a Mobile game and it contains a lot of objects (roughly 3000 static objects per level) but also a decent amount of levels (20 levels currently)
When the game was a bit smaller (10 levels), it ran more efficiently.
We believe we have optimized most things but it comes mostly down to the amount of objects we have in the game.
We currently store each level in a prefab but these prefabs are also referenced in the scene so we understand that they are all loaded into memory and may cause the increase in lag.
We are looking to only load each level when need but the difficulty comes from the fact that each level mostly shares the same objects.
We have recently tried using Addressables but to no success in performance and I understand that we implemented everything correctly.
We are looking into using "Scene Streaming" next and storing each Level in another Scene. Will this work by any chance?
Also, any suggestions for improving performance is greatly appreciated!

iron acorn
grand nova
iron acorn
grand nova
iron acorn
grand nova
iron acorn
#

@grand novaIt's not a lot of info, but there are already a few red flags - crazy amount of draw calls, crazy consumption of memory by textures and quite a huge amount of vertices.
And your meshGenerator is doing some crazy calculations, but it might be fine if it's only once( OnEnable)

#

I'd like to have a look at an average frame data. The above one seems to be during a spike.

grand nova
iron acorn
iron acorn
#

Additionally, decreasing the camera frustum far plane distance would reduce draw calls by culling more objects.

grand nova
#

Here is an updated screenshot

#

as I mentioned, I had made a few changes today so you can see some reductions

#

but also, this level has fewer objects than the last screenshots

#

regardless, this level still heavily lags on mobile

#

When we used to only have around 5 levels referenced, we would get much better performance on mobile, but now that we have 15+, the lag is insane

iron acorn
# grand nova

There're still too many batches. They should be around 100-300 on mobile. And the memory consumption is even worse than on a previous screenshot.

iron acorn
grand nova
grand nova
iron acorn
grand nova
#

Also, I had tried to reduce the number of batches in the past by GPU Instancing common materials as most of these objects all use the same material

#

but it had created a weird glitch where lots of the objects were disappearing or appearing as black

iron acorn
iron acorn
grand nova
iron acorn
grand nova
#

Also, if you wanted, here is a look at a basic level

iron acorn
iron acorn
# grand nova

It looks to simple! How the heck does it produce these crazy stats?

grand nova
grand nova
#

My original idea was that it must be loading every single level in that I have referenced in my Level Manager

#

bc the game only got more and more laggier the more levels I made

iron acorn
iron acorn
grand nova
grand nova
iron acorn
#

Make sure you have compression enabled on all possible assets(textures/models)

iron acorn
#

Use the memory profiler to find out what eats all the memory and optimize it.

grand nova
#

Yeah, thats a good idea

#

Is this only included the objects in the scenes or is this every single file in my project

iron acorn
grand nova
#

Ah I see, yeah

iron acorn
#

There's a lot of noise data from the profiler and editor. Try taking a sample on the device.

iron acorn
#

Build and run a development/debug build. Check autoconnect profiler. When the build is complete, your editor should connect to the device automatically. Then it's the same from there.

grand nova
#

Also one last thing, I see that some of the things referenced here arent actually included in the Scenes or referenced at all but are included in my projects files. Does every project file matter when building the game?

#

Actually, could be included in another level and since all the levels are currently in memory, they are affecting the constant outcome?

grand nova
#

I think I figured it out. It must be the memory issue with the levels. Ill split them all up into scenes and such. Thank you again! Youve been tons of help

iron acorn
#

Memory profiler in the editor doesn't know to make difference between the play mode and the editor memory, so anything loaded into memory(for example, if you edited some prefab) would appear there. That's why you should profile on the device. Especially memory profiling.

#

But performance profiling is also more accurate on the device, so yeah. You can profile in the editor to get the overall idea of what's slow, but definitely look at the data from the device too.

#

For batching/instancing, use the frame debugger to see why draw calls don't batch.

split dew
#

hey guys are these settings ok for my build of a game i build in 1920*1080 landscape? IDK anything about these. The outcome(app) which comes in my mobile always is of different type as well. The buttons here and there and all

sonic otter
#

what are your canvas/camera settings

last stump
#

I dont know why my rewarded video or my institial ads are not working. I made a tool for testmode and set it to true(when you know what i mean) and enabled testmode in the services but still i get this error should i post my code?

#

I get this error now ArgumentException: method arguments are incompatible System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) (at <695d1cc93cca45069c528c15c9fdd749>:0) UnityEngine.Events.InvokableCall..ctor (System.Object target, System.Reflection.MethodInfo theFunction) (at <127e81e1cb3441cc97d26b1910daae77>:0) U... long text

last stump
#

anyone??

#

please any help?

amber plume
#

@last stump have you tried updating the unity ads package?

tawny kettle
#

I'm working on a game for ios and want to send a rating notification when the player plays the first level or plays 2 or 4 levels in consecutive succession. How should I schedule this "rating notification" and check if it has already been rated??

solid grotto
#

I'm having a problem with the VSync in Mobile, The game is fine, however the longer I play the game, on one moment the Target FPS become half of the previous one (Sort Of). How to fix this issue? (This is tested using Development Build in Android)

iron acorn
solid grotto
#

Ah so the problem was affected by the Adaptive Performance?

iron acorn
#

What I mentioned is not adaptive performance though. It's something built-in in every mobile device.

#

It's to avoid damage to hardware due to overheating.

solid grotto
#

How to control that? I'm using URP in my game

iron acorn
#

In general, by optimizing your game, reducing the target framerate and memory consumption.

#

Check and see what's taking most CPU time before performance drop and try to optimize it.

#

Also if GPU profiler module is working with your device, might be a good idea to look at it as well.

elfin kraken
#

So basically lower your FPS

iron acorn
#

Yeah. The recommended fps on mobile is 30. But it seems like it's already around that number for him.

solid grotto
#

I'll check that out again, cause I'm a bit confused because there's nothing else except the VSync which eating the FPS

solid grotto
solid grotto
#

Also before I implement that, it's already capped on 30 FPS

iron acorn
#

Disable the vsync. If you have target framerate set, it's not needed. And they might behave weirdly together.

#

You usually use either vsync or target framerate, and from what I heard vsync is not favorable on mobile.

solid grotto
#

Oh ic ic... That one looks really suspicious, I'll try remove that and instead using the target framerate only

solid grotto
fervent dagger
#

Has anyone had trouble with setting up subscriptions for Google Play? The in-app products work fine but I can't seem to get the subscriptions to work (product id returns product not availabe).

last stump
#

I have working ads on my other project but it was installed from the unity assets store for this one i had to install it from the package manager bec. It was not anymore available for the asset store can it be because of this. And on my other project i don't have the newest version liked the old ones but works

#

Maybe the coding changed for the newest ones

meager cosmos
#

Hello!

#

Has anyone here implemented sign in with apple in Unity using firebase?

outer mason
#

How do people decide on resolution for their sprites? I know "start w/ big and let Unity resize w/ anchors", but I'm not sure how to pick the main size. I've blocked out my UI, and want to start replacing assets with real buttons and images, but I'm not sure where to start.

#

For instance, that big circle with the "103" in it... Should I make an image in Photoshop that's the dimensions of the current largest native resolution, size my circle graphics to what I want it, and then import it? Does that approach have downsides?

neon thicket
outer mason
neon thicket
#

Yeah, if you plan on targeting tablets for example.

outer mason
#

I am. It's a BLE motor controller, and people will want to use phones and/or tablets depending on what they have available.

neon thicket
#

Yeah, then just take a tablet resolution as your reference and run with that.

tight dock
#

Does anyone have a tris reference for mobile 3D Games?

fervent dagger
#

Hey everyone, it looks like Unity IAP is returning all products from Google Console as non-consumable products. The subscriptions don't have any more info such as price and description though. Has anyone faced this?

zinc summit
#

Hello! Is it maybe possible to be able to make a android service in unity. I want to be able to run a script while the app is closed. I found out you will need to make a service for that. How would i do that?

sleek eagle
waxen dawn
#

Hello. So I'm trying to make an Idle Clicker and I have some question.
I made a GameObject to handle the tap logic and it is working, the problem is that I gain money anywhere I tap on the screen and I can't enter into any menus because of that.
Should I make a canvas to limit the tap area, and basically transform my GameObject into an UI Element?

polar mason
#

hi, im building an android game but im having an error thats says
Build failure:
Failed to update Android SDK Package list. See the Console for Details

and the console says
CommandInvokationFailure: Failed to update Android SDK package list.

compact garden
#

im trying to build to ios and im getting this error:

BranchUniversalObject.m:513:9: Cannot use '@try' with Objective-C exceptions disabled
How can I fix this?

#

this is in xcode

#

and I have enabled objective-c

#

so something funky is going on

dreamy crypt
#

Hi, I'm trying to build for Android, but I have an error (Gradle error). How I fix this, I have watched a lot of videos in Youtube, but that not solve me the problem.

dreamy crypt
#

it's when I make a build, I go take a screenshot, wait

fiery condor
fiery condor
tribal ledge
#

After importing google play plugins, I get a lot of errors on aab build for things like:
"Duplicate class com.google.android.play.core.appupdate.AppUpdateManager found in modules core-1.10.0-runtime.jar (:playcore:) and core-1.10.0-runtime.jar (com.google.android.play:core:1.10.0)"

Where are these duplicate google play files? How can I add the google play plugins without duplicating all these?

fiery condor
fiery condor
fiery condor
tribal ledge
fiery condor
#

The unitypackage directly above gradlew

tribal ledge
compact garden
#

is "Cannot use '@try' with Objective-C exceptions disabled" fixable?

#

enabling Objective-C doesn't change anything

#

and disabling Log Obj-C Uncaught exceptions in unity doesnt help eitther

compact garden
#

ah it was caused by a bad plugin that was using objective c

#

there are a few more problems but its getting better to build now

polar mason
fiery condor
# tribal ledge still get the same duplicates even after force resolve. Any other suggestions?

I had a lot of those errors myself, but because of Unity ads and mediation. The easiest way is probably to remove the plugins you don't plan to use (if that's possible). (I had to remove either Unity ads or Unity mediation due to duplicate files)
Otherwise this is another github issue page with exact your error, maybe there is another helpful solution: https://github.com/google/play-unity-plugins/issues/104

GitHub

Hi guys, I imported the entire GooglePlayPlugins folder to my project. I'm not quite sure why I'm getting all these duplicate class exceptions when I try to build. Anyone have an id...

bold fern
#

Anyone here used Unity as a Library? How can I run Application.Quit() WITHOUT exiting my parent app? Anyone from Unity know the answer to this?

reef stratus
rugged bough
#

Any tips?

#

This is last released 2017 so i imagine there would be other options too

compact garden
#

there seems to be a few tools that do it on the asset store

#

not sure about quads specifically

#

but yea

#

I do have some android building problems that are breaking my current project.

Every time I try to build a project to android, I get a bunch of sharing violation path errors.

They wouldn't be so bad if they didnt also break unity from running in play mode too

#

like, there were no errors before building and I could go into play mode

#

but now there are errors here and I cant go into play mode now

#

what should I do if building to android always breaks the project?

rugged bough
#

I bought a really good package with trees but i need more lod levels

#

Preferably also as low as quad

#

About your problem..

#

Best you can do is to google them i think¨

#

Many people have error with android builds in general so probably you can find a hint

compact garden
#

I havent found anything yet

#

its mostly said that the file is in use somewhere else

#

but im not sure how a library file specific to the app could be in use somewhere else when there is only one instance of the project running

rugged bough
#

hmm

#

well, restarted the project?

#

weird

compact garden
#

yup restarted it

#

it was suggested that there might be an old apk somewhere sttopping it

#

but I cant find it if there was

polar mason
#

i re installed everything but i still get this error

polar mason
#

nvm

frail grotto
#

Can somebody help? How to remove OpenGL validation at runtime? Oculus does it inside their .so file - how can we do it in Unity?

polar mason
#

whyyyy

#

it doesnt workkkk

#

aaaaaaaa

waxen dawn
#

Hi guys, how are you?
So, can anyone help me adapting this script I made using mouse inputs into an script usable for android? Also, how do I limit where the user can tap, so it doesn't conflict with the UI.

waxen dawn
#

Like, do I just use a canvas?

polar mason
#

no one answer questions in here

odd arrow
#

@polar mason Did you read the error it gave you, have you actually installed the tools?

polar mason
#

i didnt deleted any file, i extract it as is

#

and its showing that

#

but dont bother helping me, i gave up already

#

goodnight, thanks for concern

odd arrow
#

@polar mason You need to install the tools. Find the installation in the Unity Hub and make sure you've added Android components, including all subcomponents. You can lookup install details in the manual.

polar mason
#

its probably my fault

#

idk why, but, it probably is

#

wasted a lot of time, i give up

muted night
#

is anyone here?

#

active

odd arrow
#

@muted night Don't spam the channel, please. If you have a question ask it.

cedar echo
bitter wasp
#

help i accidentally remove classes.jar in my android folder. How to restore it?

#

can you guys me a copy of yours if you have one it is 2020.3.20f1 folder that i deleted

humble frost
#

Is it possible to use video from xeternal device for arCore?

simple berry
#

Hello friends! I have 3 games published on the Play Store. Average daily downloads are 70, 40 and 30. Yesterday something strange happened, two of the games had 0 downloads and the other only 1. This had never happened. Any clues?

rugged bough
#

Might just be a data error

#

It has happened to my apps too

#

So i would say check back

#

Else, make sure it is up on the store

#

Like search for it from a device

#

Probably nothing to worry about

glossy sluice
#

Ive reinstalled and uninstalled 3 times now, and rebooted the pc 5 times, tried a bunch of things I found from google

#

I cant get this to work, its been almost 4 hours

#

I had this issue with unreal engine and it took 15 hours to fix, almost a week.

#

I had to break my unreal engine android sdk setup to get unity moving, and now both are broken

glossy sluice
#

Got it, worked in 2019.4.31 I dont know why it didnt in 32, maybe because I installed android tools AND THEN the openjdk and sdk ... At least it works now

muted night
#

could anyone tell me if its possible to check if ads work properly in google play internal tests of the game??

runic void
#

Android builds in 2019.2.21f1 are taking forever because "moving mapping file" seems to hang. Anyone else having that problem? What is that mapping file anyway?

storm stream
#

I want to add ads in my mobile game. I have used Unity's guide and everything is working perfectly. Its just that i have 2 scenes that I want to show ads to and I was wondering if i should do DontDestroyOnLoad on one and have it for both scenes or just have the same game object in both of them

tribal ledge
#

Little confused about Vsync and lowering FPS on android. Apparently you cannot turn Vsync off on Ios Android, but according to the docs, if Vsync is on then targetFrameRate is ignored. So how do I set the framerate to 30 FPS on android if I cannot turn off Vsync and targetFrameRate is ignored?

tribal ledge
# storm stream I want to add ads in my mobile game. I have used Unity's guide and everything is...

Depends on your design IMO. If its the same, then it would be more peformant to keep it over scenes. You should make it a little mroe sofisticated though so that you can open any scene and it will load up like a singleton without an issue and persist over the scenes that matter.
But, I would even suggest, if you have two scenes with the ad in the same location, do you even need to change scenes?

delicate nova
#
Execution failed for task ':launcher:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\user\.gradle\caches\transforms-2\files-2.1\faa532047f8bfb910c3695709bd24b78\eos-sdk\res\layout\activity_eos_web_auth.xml:9: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka my.package:layout_constraintBottom_toBottomOf) not found.
     C:\Users\user\.gradle\caches\transforms-2\files-2.1\faa532047f8bfb910c3695709bd24b78\eos-sdk\res\layout\activity_eos_web_auth.xml:9: AAPT: error: attribute layout_constraintEnd_toEndOf (aka my.package:layout_constraintEnd_toEndOf) not found.
     C:\Users\user\.gradle\caches\transforms-2\files-2.1\faa532047f8bfb910c3695709bd24b78\eos-sdk\res\layout\activity_eos_web_auth.xml:9: AAPT: error: attribute layout_constraintStart_toStartOf (aka my.package:layout_constraintStart_toStartOf) not found.     
     C:\Users\user\.gradle\caches\transforms-2\files-2.1\faa532047f8bfb910c3695709bd24b78\eos-sdk\res\layout\activity_eos_web_auth.xml:9: AAPT: error: attribute layout_constraintTop_toTopOf (aka my.package:layout_constraintTop_toTopOf) not found.```
Could someone maybe help me solve this error?
@me so I see the reply tyvm :)
frail grotto
#

Please help, tried everything to fix it - Releasing render texture that is set as Camera.targetTexture! Context : Android, using custom render texture (asset) in the addressable prefab. When releasing gameobject via addressable release instance - it always throws this error. What should I do?

odd arrow
#

@frail grotto Don't cross-post. You also don't show any error.

frail grotto
hasty saffron
#

can someone help me, i m trying to make this UI to appears in front of an object to make some "settings menu" i was trying to make this UI rawImage to appears in front of the object so it will cover the object but the UI keep getting render below the Object layer ;-;

split dew
quartz kernel
hasty saffron
quartz kernel
#

Try with a regular image , however I don't really see the issue in your screenshot

hasty saffron
quartz kernel
#

Show your canvas settings

hasty saffron
quartz kernel
#

If you want your UI on top of everything, change it from camera mode to overlay

hasty saffron
quartz kernel
#

No

hasty saffron
# quartz kernel No

no ?? so.. you said that if i change the UI render mode from camera to overlay the UI will still facing wherever the camera are facing ?? o.o

quartz kernel
#

Yes

#

It’s called screen space overlay

hasty saffron
#

oooooo it works.. thx ole (>w<)

storm stream
#

I get this error even though I have pasted in my android if from the dashboard in the inspector

#

"Error showing Ad Unit Rewarded_Android: NOT_READY - Placement Rewarded_Android is not ready"

storm stream
#
    public void OnUnityAdsShowComplete(string adUnitId, UnityAdsShowCompletionState showCompletionState)
    {
        if (adUnitId.Equals(_adUnitId) && showCompletionState.Equals(UnityAdsShowCompletionState.COMPLETED))
        {
            Debug.Log("Unity Ads Rewarded Ad Completed");
            // Grant a reward.

            // Load another ad:
            Advertisement.Load(_adUnitId, this);
        }
    }

The ad loads normally but this function never gets executed. And thus the ad doesn't get reloaded. This is my code for when the ad finishes successfully

compact garden
#

is there a way to fix having a black screen on an ios build?

#

there arent any errors being reported to xcode

#

and there is zero cpu usage which shows that nothing is running

#

but there is a scene with content being built

spring current
#
 public void PlayRewardedAd(Action onSuccess)
   {
       onRewardedAdSuccess = onSuccess;
       if (Advertisement.IsReady("Rewarded_Android"))
       {
           Advertisement.Show("Rewarded_Android");
       }
       else
       {
           Debug.Log("revarded ad is not ready!");
       }
   }

   public void OnUnityAdsReady(string placementId)
   {
      Debug.Log("ads are ready");
   }
    public void OnUnityAdsDidError(string message)
   {
       Debug.Log("ERROR: " + message);
   }
    public void OnUnityAdsDidStart(string placementId)
   {
       Debug.Log("Video Started");
   }
    public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
   {
       if(placementId == "Rewarded_Android" && showResult == ShowResult.Finished)
       {
           onRewardedAdSuccess.Invoke();
       }
   }
}
``` does anyone know why is not shoving PlayRewardedAd
fiery condor
storm stream
#

you mean to turn of test mode?

fiery condor
#

In build settings, 'development build' (when I tested with this on, it didn't work on Android either, without it it did)
Test mode should stay on until actual release. They can block otherwise I thought

#

Just don't have Unity on here now, so can't send a screen

storm stream
fiery condor
#

In editor or your build?

storm stream
#

editor

fiery condor
storm stream
#

Oh ok

#

I guess I misread that as it seems quite clear you were telling me exaclty that, sorry

#

thanks for the answer

fiery condor
#

no problem 😄

oak belfry
#

hey is there a way to make profiler tell me how much does each script cost and not all of them together

#

?

fiery condor
oak belfry
#

so how do i understand which script is which

oak belfry
#

thx

#

i still dont understand

#

this is now deep profiling

#

@fiery condor

fiery condor
#

Set timeline to ... in Left bottom corner, don't know exact name

#

Then you get a list instead of a timeline.

oak belfry
#

raw or not raw

#

?

fiery condor
#

I'll startup Unity, to check names

oak belfry
#

ok thx

fiery condor
#

I have it set to 'normal' hierarchy