#📱┃mobile

1 messages · Page 40 of 1

floral pasture
#

yes it does work with mono build

fickle jackal
#

Nah the assembly is just TagLib

#

From what I can tel

#

Might be TagLib-Sharp

#

Try TagLib first

floral pasture
#
       <assembly fullname="TagLib">
              <type fullname="TagLib.Riff.File" preserve="all"/>
       </assembly>
#

this?

#

can assembly and namespace match?
The namespace is TagLib

fickle jackal
#

If that doesn’t work

#

Just make it Riff.File

#

For the type

#

Looking at the system.core example im not sure

floral pasture
#

don't know what it is. Let me google a bit

fickle jackal
#

Whatever full name you have to type without a using at the top

#

Is what the type name should be

floral pasture
#

understood. Than it should e TagLib.File, bit in the console it referred as TagLib.Riff.File

#

man, I'm confused UnityChanConfused

fickle jackal
#

Maybe the assembly name is TagLib.Riff

#

But that is weird

#

Try the other one first

#

Or just send me the dll

#

Text is like the worst troubleshooting medium

#

😞

floral pasture
#

So I tried to putt in the linkxml all kinds of combinations I could imagine

<linker>
       <assembly fullname="TagLib">
              <type fullname="TagLib.Riff.File" preserve="all"/>
       </assembly>

       <assembly fullname="TagLib.Riff">
              <type fullname="TagLib.Riff.File" preserve="all"/>
       </assembly>

       <assembly fullname="TagLib.Riff">
              <type fullname="TagLib.File" preserve="all"/>
       </assembly>

       <assembly fullname="TagLib">
              <type fullname="TagLib.File" preserve="all"/>
       </assembly>
</linker>

and still no success

fickle jackal
#

If you dm me the dll I can get it working

floral pasture
#

ok

fickle jackal
#

Is that the editor

#

Or the build

floral pasture
#

the buld, I'm debugging with adb shell

fickle jackal
#

Ok send me

versed surge
#

sory can i get some help

#

?

#

when i try to build my game for android obb

#

after a few seconds

#

after build

#

those errors pop up

#

and i select byild and run tool

versed surge
#

@neon thicket

#

sory again for pining u

#

but i need some help with some errors

#

why these arrors are occuring ?

quartz kernel
#

Don't ping people randomly

#

You haven't shared the full error, there is not enough info in those images

#

Open the editor log and share the full stacktrace of the error

floral pasture
#

my app on google play is targeting users of all ages, thus **Admob **ads must adhere to the Family Policy.
Should I set both SetTagForUnderAgeOfConsent() and SetTagForChildDirectedTreatment() to true?
Currently I'm initializing ads the following way:

    private void Initialize()
    {
        if (_initialized) return;
        RequestConfiguration requestConfiguration = new RequestConfiguration.Builder()
        .SetTagForUnderAgeOfConsent(TagForUnderAgeOfConsent.True)
        .SetTagForChildDirectedTreatment(TagForChildDirectedTreatment.True)
        .build();
        MobileAds.SetRequestConfiguration(requestConfiguration);
        MobileAds.Initialize(initStatus => { _initialized = true; });
    }

Is it the correct way to initialize ads?

floral pasture
#

I just want to be extra careful and don't violate admob policies. The ads implemented the way described above don't show up on real devices (I tried on several), but work in the Edtior with test ads.

tough estuary
#

Cant be because newest android OS API level is 11

iron acorn
#

you're confusing api level with OS version

#

Android 11 has api level 30

#

But I was asking about the minimum API level, not the target.

#

@tough estuary

tough estuary
#

Min api level same as yours and automatic:highest installed on target api level

iron acorn
tough estuary
#

It was right in front of me lol

#

It fixed it

#

But now i got a new error

#
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:checkDebugDuplicateClasses'.
#

Looks like a resolution error

#
  java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules androidx.core.core-1.2.0-runtime.jar (:androidx.core.core-1.2.0:) and support-compat-25.1.0-runtime.jar (:support-compat-25.1.0:)

Is this a common error when compiling to android?

iron acorn
#

Not sure. I don't remember getting it ever

#

try googling

silent cliff
#

Hey! Please help. On my game if you just installed or updated it and you make an IAP, it doesn't reward you but charges the money. But if you restart the app it works. It's

#

It's the same on the editor

tough estuary
iron acorn
#

Add debugs and test on the device

silent cliff
#

I added debugs on everything, at the end OnPurchaseComplete method doesnt even get called

iron acorn
tough estuary
#

So 2 different packages use .jar files that have duplicate classes. I've tried to delete the .jar file in firebase but it get's reproduced upon the build process. How do you resolve this dependency conflict?

versed surge
iron acorn
dire magnet
#

you exclude the duplicate dependency from one of the dependencies

#

probably need a custom build.gradle file

digital steeple
#

Hello folks, why is this happening?, the SDK is installed but unity can't detect it!, I didn't restart the PC btw just in case it maybe the reason so

odd arrow
#

@digital steeple Installing Android build support through Beta Hub had similar problems for me. Use Production Hub or reinstall editor without components, then add them one by one. Seems to be the solution with Beta.

digital steeple
limpid wagon
#

Hey

#

Is there anyone who has Experience in Adding Ads on your Game from Facebook?

sacred creek
limpid wagon
#

Some Help would be Appreciated

sacred creek
limpid wagon
#

Do you have any Video or Documentation which I can read

#

and do it step by step

#

?

sacred creek
#

You got those installed, right?

limpid wagon
#

Yes

sacred creek
#

And what errors do you get then?

limpid wagon
sacred creek
#

Phew okay, manifest things going on

#

Is your SDK/NDK up to date ?

#

You might try out updating gradle too

#

For testing I would install another version of Unity, newer one, backup my project and open it with the new one and test to build.

limpid wagon
limpid wagon
sacred creek
#

Try the newer version first. some 2020 version might work or the latest 2019, 2021 is still beta, so I wont trust that yet I think 😄

vivid loom
#

Hello I have A problam with my sdk and do not know hot to fix it I am struggling since 2 days

#

I can not build it

#

by activating sdk I get that error at the force resolve

vivid loom
#

is it possible to downgrade from unity 2021 to unity 2020 without data loss?

#

I already made backups from my scenes

neon thicket
#

Data loss won't happen from a downgrade. But you'll need to deal with any packages which are suddenly non-existent, if you're using 2021 versions.

#

You should be backing your project up with source control though.

vivid loom
#

how can i make a complete backup?

neon thicket
#

Source control. Git for example.

#

Alternatively, you could try using Unity's collaborate. It's their built in version control.

vivid loom
#

how can i do it exactly this is my forst app

#

first

sacred creek
#

google github tutorial, everything you put in that folder then will be tracked and you push and pull your state to backup any new verison of a file you create.

vivid loom
#

in which folder? if I google github tutorial there are comming tutorials to start with github

sacred creek
#

yeah, you should start with github and watch some tutorial, so you know what you are doing.

vivid loom
#

How can I upload more than 100 files because i have way more than 100

sacred creek
#

how do you think there is a 100 file limit?

vivid loom
sacred creek
#

Where did you get that from?

sacred creek
# vivid loom

well honestly I never had that issue, but usually I create the repo at the start of the project

vivid loom
#

I am looking for a tutorial its ok I will tell you if I have more problams

sacred creek
vivid loom
#

I do not even know if I will downgrade my Unity because i have problams with my sdk and evey tutorial on downgrading unity told me nothing about sdk bugs so I will try to fix it in unity 2021 first and if that realy does not work I will try to downgrade

sacred creek
#

downgrade? What?

#

never talked about downgrading it

vivid loom
#

Oh realy

sacred creek
# vivid loom here

ohhh okay, did not se ethat, sorry. Well, jumping between versions with year difference can always be a problem, try to avoid

vivid loom
#

yeah but i am fighting with that sdks and nobody was able to help me

#

I think I tried 90 % from every possible fixes and nothing worked

sacred creek
#

well, cant tell you much about 2021, as its beta I think, so bugs can happen for sure. So just for the sake of testing, you could just copy yoiur whole project folder to a new place, open that with another version of unity, like 2020, and just see what happens, if its broken, delete the new folder and try again.

vivid loom
#

ok I will do that thx

#

still the same errors

#

the game works fine but it did not fix anything

sacred creek
#

well there is a n error with that groovy reflection whatever thi sis

#

maybe try this

vivid loom
#

I update my jdk and it works now but why has jdk a impackt du sdk?

sacred creek
vivid loom
#

Ok nevermind it did not work

#

the last step failed i thought it made it over the sdk part so it must work how can i be that wrong 😭

#

Ok that shit is like completly random sometimes it works sometimes it does not i tried with the 2021 version did not work there I do not know what to do anymore

sacred creek
#

Clean up the project, remove the library folder and let unity regenerate it, maybe there are some flaws due the project span

vivid loom
#

It may work now but I do not know I will try taht

#

the build worked now I do not know why but I will sell my pc now XD 😉

#

thx for the help

tough estuary
tough estuary
iron acorn
#

so maybe google about a conflict between them. I bet you're not the first one who encountered it.

tough estuary
#

I have googled it. Obviously have to change the config file that fetches dependencies manually but not in need of compiling to android right now so postponing it until then.

naive plume
#

Has anyone here ever hooked up custom events for their mobile game for event tracking on a platform like AppMetrica?

naive plume
#

I'm not a coder and developed my game entirely in Playmaker, but now it's time to get into a bit of code and hookup two simple analytics events for "level_start" and "level_finish". AppMetrica provide the API on how to do it, I just don't know where to start. 😦

mossy ice
#

Is this normal? I limited the FPS to 60, it's usually around 55-60, but sometimes it drops to 30 and jumps to 80 for a second.

Also when I open the inventory (consisting of three images) the FPS drops to 40-50. I compressed the images and split my UI into multiple canvases, but inventory FPS remains the same no matter what lol

P.S I'm using the Universal Render Pipeline, my scene consists only of the ground, background image, player with a rigidbody, and a 2D global light - is it normal that my FPS is jumping and dropping so much randomly?

sacred creek
glossy sluice
#

Hey!

#

I just made an ad system
but it always says that the ads arent ready
if I try it out
this is the code

#

everytime I click on play it instantly puts adsareready like 3 times
and if I click on the button it just says that the ads arent

bright epoch
#

does anyone have any pointers on recording gameplay in android
trying to build a replay system that records your death and you can replay that

mossy ice
# sacred creek it can sometimes hang and freeze of you instantiate a lot of memory heavy stuff ...

I am not instantiating anymore. I know I posted that code where I was instantiating three objects and destroying them in a single frame, but I watched the object pooling tutorial and rewrote my code. I don't know what else could be causing the issue as I have a similar version of the game where, on top of everything I mentioned here, I also have NPCs spawning in and moving around, and the game works at a solid 60FPS at all times.

#

no FPS drops, and no sudden FPS jumps to above 60, it's always at 60 which is weird

#

the only difference between that "old" version and this new one I am doing is the fact that I am using Universal Render Pipeline on the new one with some 2D lights, but surely it shouldn't be the reason my game is performing worse on mobile?

abstract moon
#

Not an expert in mobile dev but the new Unity pipelines are still lacking stability.
A weird behavior on mobile could totally be induced by the pipeline change.

mossy ice
#

I'll try to switch back to the default if possible and see how it works out. Thanks! 🙂

swift dew
#

Can anyone tell me what the problem is?

#

Or need more data ?

#

Well tell me at least the best version of unity for android development

iron acorn
#

Or fps

iron acorn
#

18? You sure it's not 16.6?

swift dew
#

sry

#

And basically, this operation (Gfx.WaitForPresent) eats up resources: 100 batches , 100 k polygons and 30 fps, and the phone is not the worst, rather average and pulls a lot of different projects at 60 fps

iron acorn
#

the default target framerate on most mobile devices is 30 fps

#

it's kind of an industry standard

#

same as consoles

#

that's why you get 30 fps(16.6 ms) and the Gfx.WaitForPresent is part of the process.

swift dew
#

I also don't quite understand why the engine can't draw all these objects in one batch one material is enabled gpu instance, Or is it impossible?

iron acorn
#

What objects are you talking about?@swift dew

#

the characters?

#

You can use the frame debugger to see why they don't batch

swift dew
sacred creek
#

hey does anyone know a good asset I can grab that has mobile controls like joystick and button? prefer free or under 20$

mossy ice
#

Problem: the game kinda "switches" between running at 30FPS and 60FPS at random times on mobile. On PC it is always at 60FPS.

**Things I tried: ** in the 'Quality' settings I set vSync count to "Every V Blank", but I got a warning that said vSync Count will be ignored on Android, so I just switched back to "Don't Sync".

In the scene I added an empty GameObject with a script on it which has this code:

void Start()
{
  Application.targetFrameRate = 60;
}

None of these things worked, does anyone have any other tips on how do I make the game run in 60FPS rather than it switching between 60 and 30?

Note: it is literally only 30 and 60 FPS, it never goes between those two numbers. squadW

#

P.S. when I disable the Application.targetFrameRate code and build the game, it's just locked at 30FPS and stays that way without a single frame drop.

I'm on Unity 2021.1.17f1.

#

Here's a screenshot of the profiler when the game is switching between 30 and 60 FPS, I have no idea what causes this. I hope it is not that the game is badly optimized as I don't have many objects in my scene and it's a 2D game.

sullen ledge
#

Also, it seems to be really constant, maybe there is a behaviour in your game in the same frequency that turns on and off any graphics. Also, since it is a 2D game, it is full of textures, try to keep them as low resolution as possible, if you select the Sprite on Project View you can see in inspector it's size. Try to keep them as low as possible and in power of 2 values (even if it's bigger, it is better for compression).

mossy ice
#

I'll resize all my textures to be power of 2 values now, luckily I don't have too many of them yet 😄

#

I just thought it was weird because prior to updating Unity my game's FPS would be between 50 and 60, but it would often drop to 30 for a sec and then jump back to 60. Now, after updating it only flips between 30 and 60 so I just found it weird.

Also my inventory system which I mentioned in one of my messages above, before updating Unity my FPS would drop by 5-15 when I'd open the inventory, but now it seems that there is no FPS drop at all when it's open.

Just odd I guess.

iron acorn
#

note that you shouldn't rely on fps for optimizations, as it will average for several frames. What you want to look at is the cpu time each frame.

#

If you're looking at the stats window in the game view, then you should know that it's imprecise and can only give a general overview of performance

mossy ice
#

I found that code somewhere and used it to count the FPS, don't know how precise it is tbh

iron acorn
mossy ice
#

Alright, I'll try.

#

Which compression method should I set for my textures to get the best performance on mobile?

iron acorn
#

I use automatic + 50% crunch.

#

But compression would only help if you have memory issues

#

Start from analyzing your profiler data and finding the bottleneck.

mossy ice
#

Sure, thanks 🙂

mossy ice
#

do you want a screenshot of the profiler?

iron acorn
#

Sure, just paste it.

mossy ice
#

P.S. there are some random spikes where the CPU time is above 100ms it wasn't happening before I turned on the profiler though so idk if profiler has any impact on performance

#

Here's an example where it's 30ms

iron acorn
#

Rendering takes a lot of time. You must be rendering a lot of huge and unoptimized stuff.

#

There's something on the input too, but handle the rendering first

#

Using post processing?

mossy ice
iron acorn
#

But are you using it or not?

mossy ice
#

I'm using URP btw and just saw that the "Post processing" checkbox was enabled, and the profile was set to some profile that came with URP.

#

I'll just disable that.

#

Should I adjust anything here too?

iron acorn
mossy ice
iron acorn
#

that's not gonna be enough probably

#

@mossy ice also, disable deep profiling the next time you take a screenshot.

mossy ice
#

Alright, sure.

#

this graph is very interesting lol it keeps spiking to 30FPS

#

but yeah this frame is when it's 30FPS

#

This is 60FPS frame.

#

a good thing is that my FPS was not dropping below 30 anymore, 30 is the lowest it goes except for that one spike. whether it was fixed because I turned off deep profiling support or post process data, I don't know

#

@iron acorn but here are the screenshots

#

i can send the timeline if needed too

iron acorn
#

I don't know why it jumps to 60 though

mossy ice
mossy ice
#

vSync Count is disabled (not that it matters since I get a warning saying vSync count is disabled on Android iOS etc), and Application.targetFrameRate is set to 60

iron acorn
#

and did you try setting it to 30?

#

Also

#

what shaders are you using in your game?

#

Also, are you profiling on the device?

mossy ice
mossy ice
iron acorn
#

okay

mossy ice
iron acorn
#

what if you remove the target framerate line?

mossy ice
#

I'll try it now, but I believe in that case the game will be limited to 30FPS.

iron acorn
iron acorn
#

Okay

mossy ice
#

all shaders are from 2D shaders from URP

iron acorn
#

alright

#

So my only guess is that the device and the game fight for the target framerate...🤔

#

the device wants 30, but you set it to 60.

#

Another interesting thing is that GC allocations much your cpu time spikes...

mossy ice
#

I'll try something, I got an idea, will let you know if it succeeds.

mossy ice
#

It did not succeed, I'll try to optimize my code and see if there's anything to improve there. Thanks a lot for dedicating your time to help me @iron acorn , I appreciate it. 🙂

iron acorn
#

Why not just leave the target frame rate at 30?

#

it:s the recommended for mobile platforms anyway

mossy ice
#

I'll probably end up doing that in the end, it's just that I personally don't think the game really looks that good in 30FPS so I wanna try and push it to 60FPS.

#

Thing is, I don't know what went wrong because I already made a game like this which definitely has less optimized code because I did not know as much back then

#

but it runs in solid 60FPS at all times, and it has more stuff than the current state of this game I am working on right now

#

the only difference I can find between the two is the fact that here I am using URP whereas on the old game I wasn't using anything

#

I'll try to disable the render pipeline / set it to none before I look at my code and see if it's the cause of my problems .

#

bro @iron acorn lol

#

i disabled URP

#

and the game is running in 60FPS

#

not a single frame drop

#

for some reason when I open the inventory though it limits to 30FPS not sure what causes it but I have bigger problems now it seems

iron acorn
#

Yeah, URP still has some problems it seems.

mossy ice
#

Looks like I'll be working with the default pipeline and use some workarounds for the effects I want, such as 2D lights. WoozyCool

mossy ice
#

Well, I built the game and it looks like it's locked to 30FPS this time rather than it being a performance issue. I might be wrong because I am still new to using the profiler, but you can see the two screenshots above, and when I enable vsync profiler module, it instantly shows that it's locked the game to 30FPS.

#
    private void Start()
    {
        Application.targetFrameRate = 60;
    }

This is the code I have in an empty GameObject in the scene, and it is the only one that has Application.targetFrameRate, no other script in the game is setting the framerate.

#

In the Quality settings vSync Count is set to 'Don't Sync' because it's a mobile game and Unity throws me a warning that vSync Count is ignored on Android.

#

Weird part is it used to run in 60FPS, but I made some small changes to the lighting and stuff and now it seems to be locked to 30FPS.

#

here's another screenshot

#

I genuinely don't know what's going on and I'd appreciate it if someone could tell me is there some other setting that locks FPS that I might be missing.

hoary niche
#

Hi, I use this plugin https://github.com/playgameservices/play-games-plugin-for-unity but I think you could help me without knowing it. I'm using Saved Games On my mobile game and everything works fine for leaderboards and achievements. Let's say I want to send data to cloud, when reading the save data binary with a stream, can I directly use it as a string to be converted to bytes? (so this what I've done and there is error : SerializationException: No map for object 'N'.) If not, please explain how I could make the exchange between the binary save and the cloud? Thank you .

GitHub

Google Play Games plugin for Unity. Contribute to playgameservices/play-games-plugin-for-unity development by creating an account on GitHub.

worthy saffron
#

can anyone help me with building for android in unity? I get this error UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <3081d2bcbc4348779c37880b87cdb6a1>:0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <3081d2bcbc4348779c37880b87cdb6a1>:0 UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

iron acorn
tribal forge
#

hello
if i make a game then want to publish it on the android app store, is there a price i have to pay?

#

hello?

quiet cipher
#

u have to pay a one-off fee to publish app on google play

tribal forge
#

how much?

quiet cipher
#

25 us dollar

tribal forge
#

ok

#

ty

iron acorn
#

It's the price for the developer account. Once you have it, you can release as many games as you want.

tribal forge
#

yep

#

ik

limpid wagon
#

I tried that and now I don't get any errors

#

But now I'm getting new problem

#

The Ads are not getting loaded

high plaza
#

i'm trying to build the apk file for an android app but i keep running into "gradle build failed" error. i've tried downloading and adding a different version of gradle besides the unity recommended one but it still doesn't work....how do i fix this?

glossy sluice
#

Hi I created a level which is isometric with some 3d models placed and some UI panels attached with it in thr worldspace orientation when I click the 3d model the Ui will be enabled and clicked somewhere it is disabled.This is the setup done in unity.

It is working correctly in unity but when built an apk build this is not working in android.
Any insights or suggestions on how to fix this?

iron acorn
#

Are you using touches input?

solemn zinc
glossy sluice
glossy sluice
#

And found out some initialisation problem the UI has to receive the data of the target 3d model like its name and other properties so I used a variable called targetAsset which is of type GameObject.
I called the resetTarget method inside OnEnable so whenever the game loads for the first time it is showing the targetAsset variable is not set so is this what making it not working in APK?

iron acorn
iron acorn
limpid wagon
#

Hey

#

Is there anyone using Facebook SDK to add Ads in there game?

solemn zinc
#

I had a problem where the apk worked on some mobile phones but on others it became a black screen after the unity splash screen for some reason.
Also on some it only worked for some time before the black screen thing happens.
haven't been able to fix it

high plaza
#

how do you convert the width of an image from pixels to scene units? i want to create an image target and the target manager is asking me for the width but i'm not sure what to put

#

my image is 780 pixels in width

iron acorn
#

1 unit = 1 pixel

high plaza
#

ahh ok thanks!

#

since the unit is in meters, i need to scale it down right? @iron acorn

#

to 7.80

iron acorn
#

?

#

that would be 7.8 pixels

#

if that's what you want, sure

high plaza
#

alr cool

high plaza
#

hi can someone tell me why the object is above the surface?

#

this is how it looks like normally but when i play it it suddenly shifts upwards

#

any help would be appreciated

worthy saffron
iron acorn
high plaza
#

oh ok, i've removed it now

pine galleon
#

damn is that like unity 2017?

high plaza
#

2018, 2021 is really buggy so im forced to use this

pine galleon
#

oh damn

iron acorn
#

Why use 2021 then? The LTS is 2020.

limpid wagon
#

Hey

#

Is there anyone who as integrated both Facebook ads and Admob Ads in there Game?

faint cloud
#

Hi! Anyone here has any experience with firebase?
I'm running into this issue and I don't know how to fix it :(

rough vale
#

I've made a little game for mobile a long time ago. I recently dug up the project and realized the last time I did anything with it was with Unity 2019.1.7f1. I've got everything working again in editor, but my movement stops working when I either build and run directly to the phone or build an apk and install manually. In the game the player is constantly moving forward and you swipe to move left and right. In editor the game runs and the movement works, but the movement isn't working on the actual phone. Would anyone have a clue on what I could look at to resolve this? I can post the snippets of code that control movement, if it'll help. To be clear when it's put on the phone with either method the game runs, I can load a level, but when the game starts the player doesn't move. Any thoughts?

iron acorn
#

And yeah, you can share it here and someone might have a look.

rough vale
#
void FixedUpdate ()
    {

        // Sets the Player in motion when game starts
        if (gameStarted)
        {
            Vector3 fMovement = new Vector3(0.0f, 0.0f, speed * Time.deltaTime);
            GetComponent<Rigidbody>().velocity = fMovement;
        }
    }
iron acorn
#

So, the player does not move at all?

iron acorn
rough vale
#
//this is declared at the top
private bool gameStarted = false;

private float speed;

void FixedUpdate ()
    {

        // Sets the Player in motion when game starts
        if (gameStarted)
        {
            Vector3 fMovement = new Vector3(0.0f, 0.0f, speed * Time.deltaTime);
            GetComponent<Rigidbody>().velocity = fMovement;
        }
    }

//down below I have this where I set it to true
        public void GameStarted()
    {
        gameStarted = true;
        speed = flySpeed * 60f;
    }

In my void Update () is where I do all of my touch controls. My apologies I didn't get what you were looking for the first time. Thank you for taking the time.

iron acorn
#

Where do you call GameStarted()?@rough vale

rough vale
iron acorn
rough vale
# iron acorn right click the method name -> Find references

In my Application Manager script I have the following:

IEnumerator StartSEQ()
    {
        yield return new WaitForSeconds(0.3f);
        readyText.text = "Ready...";
        audioSource.clip = beep1SFX;
        audioSource.Play();
        yield return new WaitForSeconds(1f);
        readyText.text = "Set...";
        audioSource.clip = beep1SFX;
        audioSource.Play();
        yield return new WaitForSeconds(1f);
        readyText.text = "Go!!!";
        audioSource.pitch = 1.5f;
        audioSource.clip = shoot2SFX;
        audioSource.Play();
        yield return new WaitForSeconds(.3f);
        readyText.text = "";
        if (!musicSource.isPlaying)
        {
            musicSource.Play();
        }
        player = GameObject.FindWithTag("Player");
        player.SendMessage("GameStarted");
        scoreScript.SendMessage("GameStarted");
     }
iron acorn
#

And where do you start that coroutine?

rough vale
# iron acorn And where do you start that coroutine?

In the Application Manager script within the void Start ():

void Start ()
    {
        audioSource = GetComponent<AudioSource>();
        gameManager = GameObject.FindWithTag("GameManager");
        scoreScript = gameManager.GetComponent<ScoreManager>();


        if (SceneManager.GetActiveScene().buildIndex == 1)
        {
            player = GameObject.FindWithTag("Player");
            pauseMenu.SetActive(false);
            gameOverMenu.SetActive(false);
            StartCoroutine(StartSEQ());
        }
        else
        {
            player = null;
        }


        if (SceneManager.GetActiveScene().buildIndex == 2)
        {
            player = GameObject.FindWithTag("Player");
            pauseMenu.SetActive(false);
            gameOverMenu.SetActive(false);
            StartCoroutine(StartSEQ());
        }
        else
        {
            player = null;
        }


    }
pale minnow
#

someone pls tell me how to add ads to game pls i will die why is noy noy working send help pls

iron acorn
rough vale
iron acorn
iron acorn
#

Okay

#

Add some debugs along the way to the fixed update to GameStarted and in the if statement where you set velocity. The last one should probably output the fMovement. Then build the game and see what debugs print.@rough vale

rough vale
primal merlin
#

I need help with Android exporting. Why is this happening ?

#

|| DirectoryNotF oundException: Could not find a part of the path 'C:\Program Files\Unity\Hub\Editor\2019.4.12f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools'. System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) (at <9577ac7a62ef43179789031239ba8798>:0) System.IO.FileSystemEnumerableIterator1[TSource].HandleError (System.Int32 hr, System.String path) (at <9577ac7a62ef43179789031239ba8798>:0) System.IO.FileSystemEnumerableIterator1[TSource].CommonInit () (at <9577ac7a62ef43179789031239ba8798>:0)||

#

This is the error

#

it has much more characters but I can't put more than 2000 here

rough vale
#

Do you have the Android SDK installed, and the path pointing correctly in Preferences?

primal merlin
#

I installed it in Unity Hub, but how can I check it?

rough vale
primal merlin
#

No I closed the editor while I was installing it

#

let me check this

#

What should I do now?

#

This is the error too

rough vale
#

My Android SDK doesn't point directly to the Editor folder its in \users\your profile\appdata\local\android\sdk

odd arrow
#

Easiest way to fix this is to reinstall Unity

#

And install Android module separately, after

primal merlin
#

Can I update the version instead of reinstalling it?

odd arrow
#

(Beta apparently has problems with it installing at the same time)

primal merlin
#

version of unity hub

odd arrow
#

no

primal merlin
#

is there a proper way to reinstall it or just deleting it and installing

odd arrow
#

yes

#

All Unity versions are installed in parallel.

primal merlin
#

okay

plush rivet
#

Yo guys need really Help.
I programmed a nice MySQL database in my Game it works Perfect on my PC if i play it in the Editor. But if i export it to my Android it dont work anymore.
My guess is because he doesnt export the many .dll files with. How can i set what he should Export and what dont?

primal berry
#

This might sound like a dumb question but, how do I get Analytics to work in 2020.1? I setup the organization, linked the project ID, enabled the service, set the age gate, clicking it brings up the project settings saying that I need to hit PLAY, so I did, waited a bit, went to the dashboard and for the past hour, restarting Unity and doing all the suggestions in "Having Trouble?" still produces "hit PLAY to enable the service", did I miss a step?

glossy sluice
#

HI I was debugging my apk development build and the console thrown an error like this but it is not showing which script or which line is causing this error how to identify that kindly help me with this

#

And the game is running fine in the editor without this error only in the mobile console I am getting this error

iron acorn
glossy sluice
iron acorn
#

Yeah. Error details

#

The most important part of the log

glossy sluice
#

It is showing the same thing

iron acorn
glossy sluice
iron acorn
glossy sluice
#

Any other quick fix?

iron acorn
glossy sluice
iron acorn
#

The logcat should show more info

glossy sluice
rough vale
rough vale
#

I get a warning on this but I'm not understanding the fix it's suggesting. The warning is on DestoryObject(gameObject); which states that 'Object.DestroyObject(Object)' is obsolete: 'use Object.Destroy instead.' I feel like this is a silly miss, but what am I missing?

        private void DestroyNow()
        {
            if (m_DetachChildren)
            {
                transform.DetachChildren();
            }
            DestroyObject(gameObject);
        }
warm adder
#

You should use Destroy(gameObject) instead of DestroyObject(gameObject), since the second one is obsolete

rough vale
ornate cipher
#

guys anyone know how to fix or remove unity IAP

heavy furnace
#

hi i use mopub for ads but when i built my project for ios

#

my project does not generate xcodeworkspace

#

builded project file has 'Podfile' file but there is no xcodeworkspace file

#

i tried to make manually pod install from terminal but i took error

ornate cipher
#

thanks

rough vale
#

Unity version 2021.1.17f1 my game works in the editor, and in the emulator . But, when I put it on my actual phone via Build and Run or installing it manually - I lose my movement and touch ability. I don't get any errors during the building process and again the scripts run fine outside the phone. Any suggestions on what I should look at? I wouldn't be asking if I had some error to research - but I'm not getting any.

gilded echo
#

On iOS, is WebCamTexture limited in framerate by Application.TargetFrameRate? My tests indicate yes, but the documentation makes no note of this, so just wondering if there's an option I'm missing.

gilded echo
rough vale
# gilded echo What are you using to track touches? Note that on mobile, you want to use `Input...

I have continuous movement in the game, so I'm looking for swipes on Vector2. After the code below I set a couple of floats for gestureTime and gestureDist and go through the swipes up, down, left, and right swipes.

foreach (Touch touch in Input.touches)
                {
                    switch (touch.phase)
                    {
                        case TouchPhase.Began:
                            /* this is a new touch */
                            isSwipe = true;
                            fingerStartTime = Time.time;
                            fingerStartPos = touch.position;
                            break;

                        case TouchPhase.Canceled:
                            /* The touch is being canceled */
                            isSwipe = false;
                            break;

                        case TouchPhase.Ended:
gilded echo
tame hawk
#

Hello
I have one question regarding texture compression for Android. I've used default crunch compression for over a few years and all it was good. But in last half of year all my UI and textures become very complicated and there a lot of it. Preferably i want to switch to ASTC compression, but i can't find any info, it it's supported on all devices with OpenGLES 3.0+. Someone tell it's all good, other tell to not use. I'm a little bit confused. And, as far as i know, if device don't support compression it will be repacked to another at runtime which isn't good. Can anyone point me to info, if it's save to change compression to ASTC?

silent cliff
#

I'm trying to use google play saved games to save in game progress. Would someone who may have experience help me with it? I think it's almost done but I can't get it working.

Weird thing is, seems like I have some save state that only loads when I install an APK directly to my phone. When I upload an App bundle to the google play console, it doesn't works. But with leaderboards is the other way arround

#

I think this have something to do with key certificates (App signing key certificate and Upload key certificate) on play console but I don't really understand it

primal merlin
#

it fixed it

primal merlin
#

How can I send apk file to my phone?

#

I tried zipping it and sending it via viber

#

and I can't unzip it in my phone

iron acorn
#

you could "Build and Play" in unity to have it installed on the device.

primal merlin
#

thanks tho

rough vale
#

Build and Run is awesome and saves you the time of having to build and move the apk file over manually. Unity will see your phone pretty quickly after you enable developer mode and usb debugging on it.

rough vale
#

Would anyone have a clue why this code works fine in editor and the emulator, but fails when actually put on the phone? If I attach to Unity and Play from VS I get no errors or warnings. Its just failing once on the phone.

public class MobileInput : MonoBehaviour
{
    public float forwardSpeed = 12f;

    private float speed;

    
    
    void FixedUpdate()
    {

        // Once the game starts this set the Player in motion
        if (gameStarted)
        {
            Vector3 fMovement = new Vector3(0.0f, 0.0f, speed * Time.deltaTime);
            GetComponent<Rigidbody>().velocity = fMovement;
        }
    }

    public void GameStarted()
    {
        gameStarted = true;
        speed = forwardSpeed * 60f;
    }
}
quartz kernel
#

When is GameStarted called?

iron acorn
lime vessel
#

Guys, how many triangles are okay per mesh in a mobile game for it to be smooth?

valid wharf
lime vessel
#

yea, but I'm trying to optimize my game as much as possible for it to also run smoothly in old devices

lime vessel
valid wharf
#

That depends on what your game is. I have no idea what kind of game you are making. It might be fine, I say this is a good start, but it might change based on how many models you'll have on screen at a given moment or what they will be doing or how the rest of the game functions. Mobile varies a lot lol. You'd probably have to use your best judgement. If your rig and animations do not change, lowering the poly count shouldn't be too hard.

#

Can anyone help me with exporting my app? I'm following this tutorial, but I get these two errors and not sure how to fix them

iron acorn
#

You can have one object with 64k vertices and it'll be the same as 64 objects with 1 vertex. I'm fact the first one would be a bit faster even.

iron acorn
valid wharf
#

If anyone has any idea on what I should do, please ping me, thank you

lime vessel
iron acorn
civic fable
#

huh?

#

"low-polygon" meshes are preferred on mobile, for performance

#

but game objects are a lot more expensive than additional vertices/triangles

#

But if game objects are re-using meshes, then you don't have to worry

iron acorn
amber plume
#
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.Purchasing;

public class Buy : MonoBehaviour{


private string monthsub  = "melt.noads.onemonth";
private string threemonthsub = "melt.noads.threemonths";
private string sixmonthsub = "melt.noads.sixmonths";
private string oneyearsub = "melt.noads.year";

//public GameObject buyButton;

public static bool HideAds = false;

void Start()
{

}

public void OnPurchaseComplete(Product product)
{
    if (product.definition.id == monthsub || product.definition.id == threemonthsub || product.definition.id == sixmonthsub || product.definition.id == oneyearsub)
    {
        HideAds = true;
        SceneManager.LoadScene("Main");
        //block ads forever with if (Buy.HideAds == false) Ad.Show();
    }
}
public void OnPurchaseFailed(Product product, PurchaseFailureReason reason)
{
    Debug.Log("Purchase of " + product.definition.id  + " failed due to " + reason);
}

}

#

my in app subscriptions work until I turn my app off and back on.

#

above is my purchasing script

delicate nova
#

Anyone got experience in modding a mobile app using a launcher? Something like how those Minecraft ones work? I really don't know what I'm looking for if you couldn't tell KEKW

amber plume
#

fixed

low turtle
#

Hello waiting no never verify?

#

"Verification status
Verification is in progress.
The Trust and Safety team received your form. If necessary, they will contact you by email. The review process can take 4-6 weeks. You will receive the first email from our Trust and Safety team within 3-5 days. Your last approved consent screen is still in use. More informatio"

odd oxide
#

Does anybody know how to steer wheels with touch buttons?
I'm using CrossplatformInput, and it only gives input of 1,-1, or 0 . which is not suitable for steering input.

#

I tried putting the axis input in update .
this works as I expected but shows some weird behavior.

iron acorn
nova spear
#

hey im trying to build my project to an apk but i have this error at the end of the build. any ideas what i can do?

iron acorn
nova spear
#

yeah

iron acorn
#

Is there an error from Gradle specifically?

nova spear
#

i got more, im trying to build again so ill wait it will finish in a few sec

iron acorn
# nova spear

this one is useless. It just tells you that the build failed.

nova spear
#

got this 3

#

tell me if u need to see more info

iron acorn
#

So only the second one is of any use.

#

Was there more details to it?

nova spear
#

i copied the error should i send u in text file?

#

this is the whole log

iron acorn
nova spear
#

thats means yes?

#

im not sure XD

#

but im guessing this is the problem cuz i just download android studio again

iron acorn
#

What unity version are you using?😮

nova spear
#

2018.4.22f1

iron acorn
#

updating to lts might fix it.

#

Also, what target api do you have set in player settings?

nova spear
#

but this is an old project, wont it ruin my project?

iron acorn
nova spear
iron acorn
nova spear
#

ok trying

#

i got 31 installed

iron acorn
#

I'm not sure you need the second one, but I have it just in case.

nova spear
#

ok downloading

nova spear
#

that's worked!
what thats mean if i want to upload the game to the google play console?
less devices can download it?

iron acorn
nova spear
#

now got only this error

iron acorn
nova spear
#

oh i see

#

ok thanks mate you helped me alot !

limber jasper
#

Hey guys, when I try to sign in to google play through my game app it returns the result of "canceled" and I don't know why.

warm adder
#

Check if the mail that you try to sign in with is added as google play services tester in the dashboard

limber jasper
#

No like

#

it doesnt bring up the dialogue

#

like it doesnt ask for email input

#

i just run it and it says "Canceled" after the banner for google play shows up

#

I have this code here

#

Wait i just added my email for testers

warm adder
#

Afaik google play is trying to sign in with the account you have in your google play games app

limber jasper
#

might work this time

warm adder
#

yeah, that may be the reason 😉

limber jasper
#

fingers crossed

#

No

#

it still says canceled 😦

warm adder
#

Are you initializing PlayGamesPlatform before that?

limber jasper
warm adder
#

Ok, did you check your device logs? Maybe there is some more information about why it was canceled, especially that you have PlayGamesPlatform.DebugLogEnabled set to true

limber jasper
#

Wait

#

no i didnt

#

how do i access that

warm adder
#

If you are using Unity 2019.3 (I if recall correctly) or above, there is a package available in package manager, called Android LogCat so you can access logs directly from Unity

limber jasper
#

Im going to install that rn

#

its just outputting messages a lot

#

o i see

#

filtering ftw

warm adder
#

ok, so now you can try to sign in again and see if there is any log about it

limber jasper
#

2021-08-31 10:49:32.143 27295 27295 Error SignInRequest Setting result error status code to: 16

nova spear
#

hey im trying to build app bundle so i can upload to google play console but im getting this error at the end of the build, any ideas?

iron acorn
nova spear
#

this is the manifest?

iron acorn
#

no. That's for unity packages

#

If you use a custom one, it should be somewhere in the assets folder.

#

You most likely need or already using a custom one, since facebook plugin makes use of it I think. You can check the path in project settings - player - publish settings.

limber jasper
#

@iron acorn I wanted to ask, can internal testers access their google play account through the mobile game app?

iron acorn
#

You invite them via mail.

limber jasper
iron acorn
#

what banner?🤔

limber jasper
#

the banner that appears when its trying to sign in

limber jasper
#

Is it saying to add it to the play game console?

iron acorn
#

to the app

iron acorn
#

Ah, you need to use updated gradle

nova spear
#

where and how can i update gradle?

iron acorn
nova spear
#

to download from here?

iron acorn
#

yep

nova spear
#

ok i downloaded 6.9.1

#

to unpack it in this location?

iron acorn
#

It's actually in preferences - external tools. I was wrong previously

nova spear
#

oh

nova spear
iron acorn
#

looks like it.

#

I think it first appears in 2019.4

nova spear
#

so i guess i should upgrade?

iron acorn
#

Maybe google for a way to use external gradle on 2018.4

nova spear
#

oh ok

raven walrus
#

Hello, everyone. If someone could take the time to read my question and help me out, I'll be really grateful.
I've returned to Unity after at least 1 year, and I'm developing a simple Android app for fun. And I have a question about touch inputs.
I've made stuff for Android before, and when I did I would use the EventTrigger component on UI elements to check for simple PointerDown and PointerUp events. I always like this approach because it use events rather than detecting input in Update.
This Android app I'm trying to make will require stuff like zoom pinching and swiping, and as far as I know EventTrigger can't deal with that stuff (I might be wrong though, please tell me if I am). So I'm looking up alternatives, and the popular thing atm seems to be the new Input System, which I absolutely can't wrap my head around. There's also EnhancedTouchSupport, but from what I found it still requires me to check for inputs on Update, which I would rather not do.
So I'm having a really hard time trying to understand what approach to touch detection I should use, and I'd really appreciate some insight. I'd love if there was something event and component based, like EventTrigger, that could cover stuff like swiping and pinching, and that wouldn't require me to use Update to check for input every frame.

clever leaf
iron acorn
faint iron
#

Hello, I'm trying to test my android 2d game in the game scene with a phone connected to my laptop where it should play and test it in my phone as well.. I try to tap the screen on my phone it won't proceed to the next scene, but when I try pointing the screen on the simulator in my laptop the input seems to be working.

#

I don't if its because of the input manager, cause I recently click something before that Unity was telling me that "there is a new input system available and youre using one" and I accidentally click "yes" on it, maybe that was the source of my problem here

iron acorn
faint iron
#

I've check my values for "Active Input Handling" and it was set to "both"

iron acorn
#

Are you using unity remote?

faint iron
#

yes

iron acorn
#

I'd really avoid using it for testing. Build your game and see if the build works.

#

The input system might be messing with it.

faint iron
#

yeah, the app is inconsistent in its performance

#

ohh noo, after setting it back to the old version(Input handling)I can't point the screen

#

ahhh, I just delete the old event system in my scene and create a new one

iron acorn
#

So were you using the new input system this whole time?

faint iron
#

i think so, cause I thought that the event systems would also changed after i revert the settings

#

but is the error here dangerous? haha

raven walrus
# iron acorn Well, the new system is event based. Otherwise you have to use the old input sys...

To be quite honest, I have been told by people in the past that it's good to avoid Update when you can, and that the way Unity calls the Update method is kinda dirty and resource consuming, so I started avoiding it as best I could. If I needed something updated every frame, for example, I would use coroutines, which I like cause I can use pause and stop conditions.
Thing is, I never looked too much into why not using Update is a good thing, i just went with what I was told.

iron acorn
#

There's nothing bad about using update. In fact, there are situations where it's the only way.

#

Or the best way.

raven walrus
#

I see

iron acorn
raven walrus
#

thanks for the insight, @iron acorn. I'll try looking up more tutorials to learn more about the new input system, and see how I can use it to do what I need.

#

have a great day/night!

rancid glacier
#

hi

#

can anyone help me in apk making

#

anyone?

iron acorn
#

What's the problem?

rancid glacier
#

its says

#

gradle build faileed

#

check console for details

iron acorn
#

And? Did you?

rancid glacier
#

?

#

i got latest version of gradle but still

#

but i have a doubt

#

i think its sdk

#

problem

hollow coral
#

and what's in the Console

#

Speculating blindly isn't very helpful when there's probably an error message it's directly talking about

iron acorn
rancid glacier
#

i dont know

iron acorn
#

You don't know how to look at the console?

rancid glacier
#

i know

iron acorn
#

well then?

rancid glacier
#

can u help me get an sdk file without android studio?

#

pls

iron acorn
static bison
#

how to remove black bars

#

?

#

unity 2020

iron acorn
static bison
#

okay sorry

iron acorn
#

change the resolution at the top left

static bison
#

i need remove black bars

#

in build

#

in game

#

not editor

iron acorn
#

you shouldn't have them by default

static bison
#

hm?

#

i dont know english well,please explain me

iron acorn
#

Unless you changed something in your project settings, there should be no black bars

static bison
#

hm

#

wait

iron acorn
#

Did you try building?

static bison
#

not now,but yes,this game is publish soon on play store

iron acorn
#

Did you test in a build?

#

And see black bars?

static bison
#

ye

iron acorn
#

Then you've messed with some project-player settings

static bison
#

wait

#

i will screenshot

#

project-player settings

iron acorn
#

I don't see anything wrong. Take a screenshot of how it looks like in a build.

static bison
iron acorn
#

No, I mean a screenshot of the game on a device.

static bison
#

on mobile

#

?

iron acorn
#

yes. Mobile device

static bison
#

okay,i will download

#

its work good

#

hm

#

okay

#

bye

#

thx

iron acorn
#

So you didn't test the build before asking😅

static bison
#

i have new problem

#

-_-

#

when i build game,there is empty

#

bruh

#

game is empty

#

hm

iron acorn
#

The scene is empty?

static bison
#

ye

#

i will try another

iron acorn
#

well, you don't have anything in your scenes:

static bison
#

yeah

#

;/

#

😄

limber jasper
#

Hey guys, I have google play services installed into my project but when I switch the build to iOS it gives me these errors. Is there a way to precheck to only configure if build target is android or iOS?

limber jasper
# night pecan #if UNITY_ANDROID

Thank you so much, I have another question if you don't mind. I have all my items for purchasing setup but when I try to purchase them through the app it brings up a screen saying "Product is not available for purchase" even thought it is active on the google play console

merry wagon
#

not sure if this is the right chat for unity ads questions, lmk if not!

#

I'm integrating Unity Ads to my project
and every time it initializes it adds an EventSystem game object to the scene
it collides with the existing event system from my canvas for the UI
anyone faced this before?
if I remove the event system from my canvas, if the unity ads fail to initialize, then my UI is non responsive

#

still trying to figure this out, if anyone knows something, much appreciated!

night pecan
limber jasper
#

That's ok, thanks

rain leaf
limber jasper
#

It actually works now

#

You have to download it from the Google play store

night pecan
#

Do you have Google Play apk signing enabled?

#

If yes, then that's what's probably causing it

pure flame
#

hey so my Unity Remote requirements check is not working, ive got USB debugging on, ive got the any android device enabled

#

im not sure why, if someones helps it would be helpful thanks

iron acorn
iron acorn
#

Because it's not suitable for most kind of testings.

pure flame
#

i mean i got it working

#

so...

iron acorn
#

It doesn't actually run the game on the device. It runs it on the PC and the device only shares the screen, so...

#

You can't test performance or anything device related with it.

pure flame
#

so...what else

iron acorn
#

Might as well test in the editor.

pure flame
#

should i use

iron acorn
#

Build

pure flame
#

huh

iron acorn
#

Build your game and test on the device.

pure flame
#

yeah but then i have to build it everytime

#

wait

#

but its better than nothing

iron acorn
#

Well, don't just test every single feature on the device. You can test intermediate steps in the editor.

pure flame
#

mk

#

how would i do it

#

like do i just

iron acorn
#

Press the play button.

pure flame
#

give the build file?

#

no i mean in mobile

iron acorn
#

Build & run.

#

There's that button when you build the game.

pure flame
#

yeah but how would i make that play on my phone

iron acorn
#

It would run it on your phone automatically

pure flame
#

ohh

iron acorn
#

If it's in dev mode and connected

pure flame
#

i see

#

ok yea i got it connected

#

build and run?

iron acorn
#

Open build settings first

#

Make sure your device is detected.

pure flame
iron acorn
#

Do you see your device in "default device"?

pure flame
#

oh ye

#

yes

iron acorn
#

Then select it and build and run.

pure flame
#

ok#

iron acorn
#

Might want to do development build to connect the console and the profiler.

pure flame
iron acorn
#

It tells, doesn't it?

#

Hdrp is the high definition render pipeline.

pure flame
#

ye i got it

#

so whats the console and profiler

iron acorn
#

Not sure why you have it enabled, since it's not supported on mobile

pure flame
#

.

#

wait what

iron acorn
iron acorn
#

Profiler is what you use to track performance and optimize your game.

pure flame
#

oh console

iron acorn
iron acorn
#

Most hdrp features are not gonna work and it's gonna kill your performance.

#

And battery

pure flame
#

oh

#

so how do i make it back to URP?

#

wait no i already got it

olive sentinel
# pure flame well thanks for the help!

When you have both HDRP and URP packages installed on your project some HDRP scripts overwrites the URP ones, to "clean" switch between them, uninstall the HDRP from package manager, close your project, delete the "library" folder and open it again

pure flame
olive sentinel
#

Yes

#

What I mean is, if you just change the asset there (was a HDRP asset, now is an URP asset), the "conversion" will be incomplete

quartz kernel
#

The easiest solution in a fresh project is to just make a new project and copy assets across

olive sentinel
#

that works as well

versed surge
#

hey, my games has 2 splash screens, and when i run the game on my phone the splash screens shows but it takes like 10 seconds to load the game after the splash screen,

#

any idea how to fix this ?

inland lantern
#

Well i see someone had same issue, unity run device not found , it cant find my phone. Was trying to use unity remote to. Dev mode on, USB deb on and still nothing

#

stuck like 2 hours for this 😄

#

Seems, best testing is only build and transfer apk file and install

#

But real question whats happening with this phone thing? Is somekind Phone issue or what?
That unity cant find a phone

iron acorn
iron acorn
rain leaf
versed surge
iron acorn
#

Does it take 10 sec to load the empty scene?

versed surge
iron acorn
#

Did you add it in the build settings?

amber wedge
#

Hi I have a problem with the input field and the android keyboard.

I have in a scene two elements:

  • An Input field.
  • A button to continue to the next scene.

When I press on the input field the keyboard of my phone opens, if I press outside the keyboard for example on the continue button, the first click causes the keyboard to close and the second click is the one that executes the action of the button.

How can I have the keyboard open and in the first click close the keyboard and also press the continue button?
This only happens on Android.

night pecan
steady yew
#

Hi there,
I just implemented the Google Play Games Plugin and signed in into Google successfully, but only if i press build and upload to Google Play.
If I press build and run it fails on the local device, even if I upload the .aab to the play store and install it on the same device as well.
Does anyone know if and what is different between build and build and run?

Logcat output:
SignInRequest Sign-in failed. Run in silent mode and UI sign-in required.
SignInRequest Setting result error status code to: 4

The SHA1s are identical.

I am aware that I have to implement an explicit manual signin if silent sign-in fails, but why does silent-mode fail?

silent cliff
#

someone help pls

storm stream
#

After building the project end sending it to my phone and installing it, i get en error that the app was not installed. This was a problem in the past but after downloading it a second time it worked but now it doesn't. And also it doesn't seem to be a problem with other apps, just with my game

silent cliff
storm stream
#

what do you mean?

storm stream
silent cliff
#

oh

#

anyways before trying to install the new apk uninstall any other version you may have installed

latent violet
#

Pls help

#

When ever i try to build, i get this error

valid wharf
#

yo I'm running out of things to try to get this aab exported. Looking to pay someone $20 to finally get this app exported. DM me.

#

Android

iron acorn
wraith hull
#

im new in using unity,, i have a question regarding integrating the unity project to android studio

#

is it possible to do something like this

iron acorn
#

I'm not sure that's possible. Why not have the buttons in unity though?

wraith hull
#

how about something like this?

iron acorn
#

I think it could be possible to call some native api/ java code from unity. Not sure what it has to do with android studio though.

wraith hull
#

the project is divided,, im doing the android studio part while others do the unity

iron acorn
wraith hull
#

should i just have them learn unity firebase?

iron acorn
#

In fact I'm not even sure about the "divided" part thing

#

how are you gonna build it into one app?

tame flower
#

I keep on getting app crash on launch after admob integration. Note: I have enabled google ads and entered test app ID both in settings as well as manifest file... Can anyone please know whats the issue?

iron acorn
wraith hull
iron acorn
#

Did you try building and making sure it works?

tame flower
#

@iron acorn no logs are written during build and its successful, its just app crash

wraith hull
# iron acorn Did you try building and making sure it works?

not yet but ive seen videos and it should work,, some thing like this https://www.youtube.com/watch?v=Ww4NbIubHTc skip to 10:50

This video is about Embedded unity within the android app. Here you can learn how to make an android library from a unity project. And how to open unity as a native android application. If you understand this then you can customization as per your requirement. After watching the complete video, If you liked it then please subscribe to this YouTu...

▶ Play video
iron acorn
#

Interesting

wraith hull
#

yeah... the thing we're doing is the usual android stuff but needs unity for specific feature implementations

#

thanks for entertaining my queries,, i guess ill just have them learn unity firebase

latent violet
#

That's not an error. It's a popup message. You can see the actual errors in the console.
@iron acorn but i can't understand the error message in console

#

There's like 200+ errors in the editor and i don't how to identify the one that unity is telling me about

iron acorn
night pecan
#

The first one is probably the most relevant

runic rain
#

I think his computer finally blew up

latent violet
#

The first one is probably the most relevant
@night pecan which is the first one?

#

The first error message in console?

night pecan
#

The one at the top of the console, the first one that has some actual, readable content in its message

tame flower
#

Does anyone had problem app crash on launch for admob integration recent version?

spark cipher
#

Failed to Produce : Libunity.Sym.So I keep getting this error everytime i try to build

#

im building for android

#

does anyone know how to fix

spark cipher
iron acorn
#

It's still not the whole error.

spark cipher
#

i couldnt send the whole error without a word limit

#

ig ill send a bigger half

#

and another

#
C:/Program Files/Unity/Hub/Editor/2020.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy.exe --only-keep-debug "Temp/StagingArea/libs/armeabi-v7a/libunity.so" "Temp/StagingArea/symbols/armeabi-v7a/libunity.sym.so"

stderr[
C:/Program Files/Unity/Hub/Editor/2020.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy.exe:Temp/StagingArea/symbols/armeabi-v7a/libunity.sym.so[.note.android.ident]: No space left on device
C:/Program Files/Unity/Hub/Editor/2020.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy.exe:Temp/StagingArea/symbols/armeabi-v7a/libunity.sym.so: No space left on 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, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)```
#
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <015079d9a4ea4f97b4381e694d2310c1>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)```
iron acorn
spark cipher
#
C:/Program Files/Unity/Hub/Editor/2020.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy.exe:Temp/StagingArea/symbols/armeabi-v7a/libunity.sym.so: No space left on device

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
#

this?

#

these are all the errors

iron acorn
#

Are you doing Build and run?

spark cipher
#

no just build

spark cipher
iron acorn
#

and is there enough space on your hard drive?

spark cipher
#

i have 10 mb left

iron acorn
#

Well, there you go.

spark cipher
#

I didnt notice

#

thankyou so much

last plover
#

Hi, does anyone know how to convert bytes to text with encoding on a mobile device? Via System.Text.Encoding does not work as on a PC

wary musk
#

guys, I have app which is working on PC no problem. But when I am building it on Android, all videos which are in mp4 format are just working very slow...

#

I was wandering what is best approach to make it work

#

more smooth

#

if anyone could direct me to any articile or some sugestions where I can found about that, that would be great.

deft ginkgo
#

Hello! Is anyone here familiar with the plugin called MobileRTSCam? It's a pre-built camera plugin for isometric RTS games (such as Clash of Clans). Having some issues with it and was looking for some help

rain leaf
covert terrace
#

Hello,
I'm having a wierd unity behavior
My game is working correctly on the editor

-> I compile for android (and it's not working correctly, there are exceptions during runtime)
-> Now the same issues appear on editor aswell, till I reload the unity editor

#

What could cause this? Thank you

iron acorn
versed surge
#

hey any idea how to make a shoot to move mechanic, like shoot to the mouse, and add force to the opasied direction off the mouse

limber jasper
#

Hey guys, is there a way to retrieve the email from google play sign in and app store sign in

runic rain
limber jasper
#

Like Im using firebase, so I want to retrieve the users email

#

and then use the to access their data

#

Same with app store sign in

gritty linden
#

Noice

worldly quarry
#

what's the best authentication program to use for Login/Register system for an android game?

verbal breach
#

Wait wrong channel srry

versed surge
#

shoot and jump in the oppisiet position of the mouse

versed surge
#

how can i use buttons as input

#

for example

#

if i press a button

#

OnKeyDown input will be called

#

or something like that

covert terrace
# iron acorn Do you want to share the errors too? Because otherwise I'm not sure what are you...

Thanks for you concern but couldn't be more precise here :/
The error itself wasn't really the problem here, I was trying to understand why it was working on editor, then after an android build, it wasn't working on editor anymore, it doesn't make sense. (So I was asking if someone knew what could cause this behavior to happen)
Especially, after building, visualStudio was asking me to regenerate the solution cause changes were mades.
It might have to do with the managed plugins I have in the project tho

iron acorn
covert terrace
#

Yeah sure, I have no problem with having build error only that doesn't appear in editor. Btw I fixed the error and it was working in the build
But still, the fact that it was working in the editor, and then, not working in the editor too after building doesn't make any sense. (And if I restart the editor it was working again)

Basically means that the editor was in another kind of state after building to android. But maybe i'm missing something there

iron acorn
covert terrace
#

Haha thanks anyway

iron acorn
#

I mean, what answer do you expect..? If you ask a vague question, you get a vague answer... Or none at all.

runic rain
limber jasper
#

Hey guys, I have a problem with google play games sign in. For some reason GetServerAuthCode() always returns null even thought I have the web Id implemented and have the configurations initializing

amber plume
#

why does this script not let you press a button unless an ad is loaded?

amber plume
#

when I press a button, the app is supposed to check to see if a full screen ad is loaded, if not it is supposed to move to the next page, but it only moves to the next page if the ads are disabled, or an ad has played.

amber plume
#

fixed

obsidian yew
#

Having issue with iOS build, when building XCode complains about the FBSDKCoreKit. I tried to use pod install and pod update, and I get this error in Terminal - CocoaPods could not find compatible versions for pod FBSDKCOreKit/Basics. In Podfile FBAudienceNetwork 6.4.1 was resolved to 6.4.1, which depends on FBSDKCoreKit/Basics 7.0.1. None of your spec sources contain a spec satisfying the dependency FBSDKCoreKit/Basics 7.0.1

#

Also, it seems Unity cannot generate xcodeworkspace in Windows?

obsidian yew
#

Tried downgrading Facebook SDK, but still same issue - FBSDKShareKit file not found

obsidian yew
#

But there is no package in Unity with this Unity Audience Network version so I'm gonna try Facebook sdk 9 instead

obsidian yew
#

Same issues even with Facebook SDK 9.0.0

onyx turret
#

Hey Everyone, I have ask this question before but got no solution or workaround for this. Every time when Bluetooth headset/earphone is disconnected while app is running, background music in the app stop playing. It is supposed to re-route to the phone speaker. Is there any workaround for this? Target Platform: Android Unity Version: 2019.4.20f1
I figured that when connecting or disconnecting Bluetooth, the app loses audio focus. I need help to regain focus and resume audio. Does anyone know how to regain focus in the unity app? Same problem occurs in unity 2020.2.5f1

limber jasper
#

Hey guys, Social.localUser.Authenticate always returning false and i dont know why

warm adder
#

You should check your device logs via AndroidLogCat, there might be more information

#

do you have your google play account added as a Google Play Services tester in Google Play Console?

pale minnow
#

i just released my game on itch.io, but the ads are not working (android), rather than showing real ads it is showing test-mode ads, and I made sure to disable test mode. anyone got an idea why this happens? and does it relate to this?

#

(I am only using Unity ads, no 3rd parties. I also made a new build after disabling test mode)

alpine grail
#

ayy, test ads are doing nothing.
im initializing stuff in test mode set to true, and with the correct android ID, but when i hit "Advertisement.Show();" literally nothing happens

#

even when following an online guide, same result

#

what's going on?

iron acorn
rain leaf
#

I'm using unity 2018.2 and got these errors when I build my apk today, yesterday it was build fine
CommandInvokationFailure: Unable to convert classes into dex format.
Invalid command dx
I did update my android studio and added android sdk 31, and some build tools last night, so the errors might be caused by those.

So, should I just upgrade to higher unity version like 2018.4 or maybe 2019? Or should I downgrade/delete the android sdk 31?

rain leaf
#

Nope, upgradin to 2019 doesnt seem to solve the problem

warm adder
#

This error is probably longer and it should have some more specific information about what went wrong, could you paste it here or on some site for logs/code like pastebin?

rain leaf
# warm adder This error is probably longer and it should have some more specific information ...

Must be from old plugin I have on my project, since my other project build just fine.
Just checked the buildtool 31.0.0 and indeed it does missing the dx.bat, other version did have it

Btw, here's the longer error log

C:/Program Files/Java/jdk1.8.0_181\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/android-sdk-windows\tools" -Dfile.encoding=UTF8 -jar "E:\Unity2018.2.9\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[
Error:Invalid command dx
]
stdout[

]
exit code: 64
UnityEditor.Android.AndroidSDKTools.RunCommand (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg, System.Int32 memoryMB) (at <83d1bb7382c84f0e821bd87272796a4f>:0)
UnityEditor.Android.AndroidSDKTools.RunCommand (UnityEditor.Android.AndroidJavaTools javaTools, System.String[] sdkToolCommand, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <83d1bb7382c84f0e821bd87272796a4f>:0)
UnityEditor.A```
warm adder
#

not exactly on unity development but you should check this, it seems like there might be something wrong with build tools 31,

#

you can either downgrade it back to 30 or try to change some files names as shown in one of the answers

rain leaf
warm adder
#

Yeah that sounds like a good plan 😉

glossy sluice
#

So I read that baking is better for mobile than using realtime

#

i got a simple game and even with like only probuilder stuff it takes one really small scene like minutes to bake

#

and I will have like 50 levels... so what should i do?

iron acorn
#

I wouldn't say that baking is great for mobile. It eats a lot of storage memory.

#

And you want your build size to be as small as possible.

#

But yeah, baking takes time.

rain leaf
lone heron
#

Hi! How do I link buttons on my game to UDP's IAP?
Where can I find an example video or documentation?

rain leaf
warm adder
#

Good to know for the future

glossy sluice
#

So I guess using few lights is ok then on mobile without marking my meshes as static and baking?

#

like i'd have 1 directional and maybe like 1-10 point/spot lights per scene

#

are mobile phones good enough for it cuz idk many phones on android and have not thousands of phones to test it on all

iron acorn
#

high tier devices might deal well with heavy scenes with lights shadows and whatnot. Others might struggle with small scenes without shadows and lights.

#

Real time shadows are pretty heavy, since they double or even triple draw calls.

glossy sluice
#

but baking takes so long on even small levels with simple forms

#

i could fake the player shadow

#

but not the level

#

and yeah it also increases build size

#

and i think max size is 150mb on android? and i dont rly wanna tap into that bundles thing. seems they overcomplicated it vs just one obb file

sonic otter
#

Question for mobile. It seems that android studio is becoming impossible to emulate, since the emulated architecture for x86 is going away and emulated arm just runs. so. slow. One issue with Unity's mobile "emulator" is that it doesn't emulate things like the datapaths changing. It's basically just a window for checking screen size on the Unity game view. What's the best way to emulate right now? Anyone hear about more support for emulation in the future?

spring moat
#

@hidden cave

neon thicket
spring moat
#

Yes

neon thicket
dusk plover
#

I want to make a massive map for my top down mobile game. Should I use a 2d tilemap? I'm worried about performance on mobile devices.

rain leaf
obsidian yew
#

Tried now dozens of solutions, cannot get it to work when building with XCode, the error is - lexical or predprocessor issue FBSDKShareKit.h not found FBUnityUtility.h

#

Another issue is that the Unity build reports "iOS framework additional failed due to a CocoaPods installation failure"

#

So it could be related to this, but I also built it on Windows and there was no errors, but when added to XCode, same problems

#

Though I did install cocoapods using Terminal sudo, so no idea how come it still cannot find it

#

At the same time, my Macbook is barely working, the input is jumping around, the screen died, etc. so it's a living nightmare altogether. Just have to build this for the client and I'm gonna let it rest forever 😄

glossy sluice
glossy sluice
rain leaf
# glossy sluice scaling? what's lightproof

yeah, put all the objects in the level into one parent transform, scale the parent transform to 0.25 or 0.1, adjust the light range accordingly, bake, revert scale to 1 when bake is done.

glossy sluice
#

Ok so using "Progressive GPU (Preview)" Lightmapper made it a looo...ooot faster

#

It works when Subtractive mode is selected but freezes if I use Shadowmask mode.

#

not rly sure what those mean anyway

olive belfry
#

Hello Community, is there any idea to increase unity mobile game FPS?

#

and i am using post processing

rain leaf
olive belfry
spark cipher
#

does anyone know how to get actual ads on unity ads

#

when i play my game it just shows unity ads

#

always

iron acorn
spark cipher
#

yes

#

i figured it out lol

#

i think

#

I had to turn test mode off

iron acorn
#

Does it say "Test ads" on them?

spark cipher
#

it did

#

well

#

no it only showed unity

iron acorn
#

Then, yeah, you need to disable them.

spark cipher
#

ads

#

yeah

iron acorn
#

wdym by "unity ads"?

spark cipher
#

as in

#

just showing ads for one company

#

unity

#

no other ads

#

like I built the game and all

iron acorn
#

"ads for unity"?🤔

spark cipher
#

yes

iron acorn
#

Never seen that. The test ads are just blank with some "test" or something text on them.

spark cipher