#📱┃mobile

1 messages · Page 25 of 1

warm flower
#

Hi guys. I am having issues with Untiy Cloud Build not working for iOS and throwing errors about missing files in GoogleUtilities. Has anyone encountered that?

brave crow
#

Hey guys. I'm trying to check players device OpenGL version, but unsuccessful. How do I know when my game is running on OpenGL 2.0? Thanks for now.

brave crow
#

@dim sinew Thanks.

noble agate
#

Hey you all,

Does anyone know why PlayOneShot is delayed/unreliable when playing sounds on Android? It's just fine in the editor, and on computer builds, but when running it on my Android, each time PlayOneShot is called, it either delays the sound effect, or skips it altogether.

sharp quiver
#

It might be your compression settings. I haven't experienced that myself

noble agate
#

I've tried all three formats (PCM, Vorbis, and the third one), yet none of them seemed to change anything. I also tried choosing to optimize sample rate, and that didn't change anything either.

sharp quiver
#

Are you using decompress on load, streaming or compressed in memory?

#

And do you have preload audio data enabled?

noble agate
#

I believe I've tried Force To Mono on/off, and tried the 3 Compression Formats, as well as Optimize / Preserve Sample Rate.

#

The file is a small sound effect with a duration of less than a second. It plays any time the user touches an onscreen button.

sharp quiver
#

What do your audio source settings look like

#

in the inspector

#

And have you tried using Play() to make sure it's a problem with PlayOneShot?

noble agate
#

I haven't tried using Play(). Since the sound effects are intended to play over each other, using Play won't give my game its intended functions.

sharp quiver
#

Are you using a single audio source** and hoping to play more than one sound on it at a time?

noble agate
#

My audio listener is on my camera. I'm intending for that listener to hear all my sound effects.

#

If it matters, the audio source in my screencap above is on a UI object inside a canvas.

sharp quiver
#

Hmm

#

how many sounds are you playing at once when some of them dont work?

noble agate
#

(I misread your question: Yes, I'm hoping to play multiple sound effects through this audio source simultaneously, based on player input.)

sharp quiver
#

I think you understood me

#

I accidentally said audio listener instead of source

noble agate
#

Ah, I see

sharp quiver
#

and then you did too

#

but I edited mine lol

#

The only thing I can really think of is going through your project settings

noble agate
#

The sounds delay / skip occurs when playing as few as 1 or 2 sounds from the audio source. The audio source plays sounds based on player input. If the player touches the image, it plays one sound. If the player releases their finger from the image, it plays a second sound.

sharp quiver
#

have you checked the clip out in audacity and made sure there isn't any white noise at the beginning of the clips?

noble agate
#

There's no white noise.

#

If I do this in my editor / computer build, then it works perfectly fine. However, on Android, the issue occurs.

sharp quiver
#

I'm aware

#

I recently had a bunch of issues getting sound to work but with OpenGL and not android

noble agate
#

If I could film the attempt on my phone, then I could show you in better detail. However, I unfortunately can't use my phone to film itself playing the game.

sharp quiver
#

What a shame

noble agate
#

If the player touches the button, then tryStartHover is called.

#

If the player releasees the button, then tryEndHover is called.

#

On Android, the start/end functions do everything they're supposed to - the color changes, the bool changes, and the coroutine is started. Except for one thing - they do not play the sound on time. And sometimes, the sound is omitted altogether.

sharp quiver
#

where do these get called from? A button's On Click?

noble agate
#

No event functions. They get called by my own home-made button manager.

sharp quiver
#

Can you show me where they get called from?

noble agate
sharp quiver
#

I would try adding a second audiosource and/or using Play just to see if that makes any sort of difference

noble agate
#

I'll try that.

#

In fact, how about this?

#

I'll remove the second sound effect. I'll only include one. See if that changes it.

#

No change.

#

The single sound effect is still delayed. You touch the button with your finger, and the "hoversound waits a second before playing.

#

But run in the editor, and it works as intended.

sharp quiver
#

Using Play?

noble agate
#

Oh, I'll try using Play() now.

sharp quiver
#

I just noticed your Stereo Pan on your Audio Source is set to -0.8

#

is that intentional?

noble agate
#

Yes, that's intentional.

#

Okay, I tried it with Play().

#

The sound is still delayed. It plays half a second after touching the button.

sharp quiver
#

What are you using for an android?

noble agate
#

Motorola G7 Power, 2019

sharp quiver
#

Damn

#

how bout your Audio settings in Project Settings?

noble agate
sharp quiver
#

Try Best Latency and disabling Virtualize Effects

noble agate
#

Alright, rebuilding.

#

I feel like it's now slightly (subjective) more responsive, but the delay is still like half a second.

sharp quiver
#

What version of Unity are you on?

noble agate
sharp quiver
#

basically the last thing I can think of is to play around with these settings for your clips

#

Actually you should try using a native UI button and use OnClick() to call a brand new function that plays the same click

#

it's possible that what you're actually experiencing is a delay in your methods being executed

noble agate
#

It's definitely not a delay in my method being executed.

#

All other lines in that function are executed - except for the audiosource line.

#

"bgColor.color = hoverColor" works.

#

"hovered = true" works

#

"StartCoroutine (grow ())" works

#

The function is, demonstrably, being called at the correct times, and only at the correct times.

#

The issue only seems to occur at the point where I call the audiosource to play my sound.

#

I can't use native UI buttons because they don't offer the flexibility I need.

sharp quiver
#

I would attempt it just so you can definitively rule it out

noble agate
#

Hm, alright. I'll post my results.

#

I have to go afk now, so I'll be back later.

#

Thank you for your patience and walking through the possibilities with me.

sharp quiver
#

Also, have you tried setting the Stereo Pan and/or Doppler Level to 0

noble agate
#

I'll try those when I'm back too.

sharp quiver
#

Yeah sorry we couldn't get to the bottom of it D:

noble agate
#

We certainly ruled out several things. 😛

noble agate
#

Random question, could the fact that the audio source is on a child of a canvas be affecting it?

sharp quiver
#

did you try changing doppler and pan?

#

@noble agate I believe the doppler effect changes the pitch of your sounds depending on the distance of your audio source from the listener

#

ideally they should be on the same game object

noble agate
#

Unfortunately, defaulting doppler and pan didn't change anything.

#

I did a bit of reading up. Seems that audio latency on Android is common, and that one way to circumvent it is with an asset called Native Audio (which costs money).

sharp quiver
#

whoever made that asset has posted that on every single thread talking about the problem

#

I wouldn't buy anything that's advertised in a shady way like that

#

did you attempt to use a unity UI button?

noble agate
#

Hi, I just woke up. I'll give that a shot today.

glossy sluice
#

trying to change a photo from an Android location into a texture for something I'm working on

#

but the readAllBytes seems to go wrong - I tested this by displaying a test text. and the last thing it shows me is "File Exists"
So therefore I know something must be going wrong with the ReadAllBytes function from Unity

#

Anyone got any idea? o-O

formal elk
#

r u reading from Streaming Assets?

sterile swallow
#

Would anyone be able to help me with apk build issues? Im making a game for android and it builds fine but the app crashes on launch on my phone.

#

Looks like it will work fine when development build is checked in build settings, is this something that needs fixing? As long as i can upload a reg build for google play i wont care

noble agate
#

Hey, I'm trying to make a button work as suggested to me earlier in this channel, but the clicking the button doesn't seem to do anything. I assumed that I just had to select the audiosource's play function here in the button, but nothing happens. The audiosource does have a sound clip set to it.

#

OnClick seems to never occur, even when I click on it.

#

There is, correctly, a graphic raycaster, and raycast Target is checked on.

#

There is an EventSystem in my scene.

noble arch
#

@noble agate I'd add another handler there with a simple script like public Test () { Debug.Log ("event works"); }
also check that your audiosource is not Play on Awake

noble agate
#

I tried both those things, and unfortunately nothing. The button doesn't even look different when I hover/click it.

noble arch
#

@noble agate what's about layers? What is on raycaster settings?

noble agate
#

I'm not using layers anywhere in my project.
I can show my raycasyer settings once home.

sterile swallow
#

Anyone have any advice in my apk issues?

brave crow
#

Hey guys. Anyone experienced with AdMob? I setted it up and works almost perfectly. My game is based in one main scene only, that reloads everytime the player needs to try again. So, the first time the game/scene runs, the reward ad works prfectly and call the reward event properly. But after the scene reload (try again), the ad plays, but gives error when reward event is called. I already tried to use DonDestroyOnLoad to the gameobject wich the AdManager is attached, but did not work. Can anyone help me solve this? Thanks for now.

robust hamlet
#

@sterile swallow check LogCat for errors to see why it's crashing

sterile swallow
#

Whats log cat?

robust hamlet
#

@sterile swallow Search for Android Logcat

dusty loom
#

I can't make resolutionScalingFixedDPIFactor in quality settings to work on ios, while on android everything is working. Any tips?

sterile swallow
#

Aww man i cant use this im allergic to cats

#

But real talk is it an android app? Or how can i use it from just my phone

formal elk
#

It's an appliucation included in the android sdk, u run it from a command line or ide

uncut lark
#

Hello, im using LeanTouch asset. How i can add force to gameobject based on finger position on the screen?

robust hamlet
#

@sterile swallow there is also a package from Package Manager in Unity, you can install and use it inside Unity to check the logs and see why your app is crashing

noble arch
#

@sterile swallow or use such a command (your Android SDK path may vary)
"C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG

sterile swallow
#

Ok, this means the device needs to be connected to my pc? If so, for some reason build and run isnt working with my android, ive been having to create the apk and then put it in my android's download folder

noble arch
#

@sterile swallow yep, make sure USB debugging is ON

glad acorn
#

I have question how can I scale a mobile game to be full screen even when the phone does not have a squared screen but the screen has the camera on it

#

Right now even when full screen is enable the game does not take the entire screen

#

It starts bellow the camera

final ridge
#

check player settings, mobile section

#

there should be a checkbox that says something about the safe area

#

that makes the black bar appear or disappear

glad acorn
#

I have "Render outside safe area" enabled

formal elk
#

this is also per device setting since android P. users can disable rendering apps in the area of notches and opt into a black bar for example

glad acorn
#

I have played games in my device that do not have this black bar tho

formal elk
#

make sure u r using the newest android sdk too

alpine cobalt
#

Hi guys
Send me your android games made with unity
I would like to test that games and give my personal opinion about them

bronze nebula
#

Im trying to have my object moved by touch in a way that when i begin the touch anywhere, moving my finger by 2m in world space, player will do the same
so i I'm trying to do that this way:

touchedPos = Camera.main.ScreenToWorldPoint(new Vector3(touch.position.x, touch.position.y, 0.3f));
firstPos = Camera.main.ScreenToWorldPoint(new Vector3(basePos.x, basePos.y, 10));
float diff = (firstPos.x - transform.position.x);
transform.position = new Vector2(touchedPos.x + diff , transform.position.y);

but what that does, is it makes the first touch pos the "center" and moving left/right moves my object

glossy sluice
#

Hey guys!

Imagine that this "Share" button is Disabled. ok?

https://prnt.sc/qh68t2
-So I need to enable this "Share" butotn with GameObject.Setactive(true) when the QR code has finished reading.

How can I do that?

Lightshot

Captured with Lightshot

glossy sluice
#

No, I mean..
I know how to Active and Disable objects in Unity. But I need to know "when the qr code has been read" then I Active the "Share" Button.

#

For example, when the QR code is read then it displays a 3D model automatically. I need to do the same but with the "Share" button. I need to display the "Share" button only when the QR code is read

sterile swallow
#

@noble arch it says build failed with exception, and displays 113 errors.

#

after usb debugging etc and attempting to build and run on my phone

#

main issues were : Execution failed for task ':launcher:packageDebug'.

#

java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key build from store "C:\Users\mgiga\Desktop\AndroidKeystores\DigGameKeystores\DigGame.keystore": Keystore was tampered with, or password was incorrect

noble arch
#

@sterile swallow are you using a keystore?

sterile swallow
#

Yes, reset the keystore and changed the settings in the backend and now ti works

boreal brook
#

Hi, how do you manage your user authentication? I want to have user data stored in the the database, but dont want to necessarily create register screen. I am aware that might turn off new players as many dont want to register as it takes time. So i was wondering if it is possible to just get GameCenter email on iOS and GooglePlay email on Android and use that for automatic user registration. As far as i understand there is some Social api in Unity, but it does not mention much about GooglePlay. Is that a reliable way to get user's email or id or is there some better way to do this?

noble agate
#

Has anyone solved Android audio latency? Seems that all audio plays with a delay on my Android, regardless of what settings I use, even though the files have no leading white noise.

finite storm
#

Anyone know why my app doesn't require the permissions I set when it starts?
I did add them in the manifest and I'm using unityengine.android

noble arch
#

@noble agate on which unity version? What device and android version? Compression settings and format of audio track? I didn't experience such issues

noble agate
#

@noble arch
I've tried every combination of compression/format settings I can think of on the audio tracks. They audio tracks are short sound effects. It's the latest Unity version, and I'm testing it on a Moto G7 Power (2019).

noble arch
#

Ogg works fine for me on Android 7.1

#

How much latency are you getting?

noble agate
#

I'm using Android 9, and neither Vorbis nor PCM or the third format work well for me. Each has a half-second delay.

#

Sometimes they're skipped altogether, or have a distortion when played (even using a 2D audio source)

noble arch
#

And you checked that files itself dont have silence, f.e. if you see in Audacity?

noble agate
#

They don't.

noble arch
#

Did you try them in a blank project?

noble agate
#

They have zero delay when I play them in the editor, or in a computer build. The only situation in which they have delay is when I run it on Android.

noble arch
#

Which unity version?

noble agate
#

Latest unity update.

#

I haven't tried a blank project yet.

noble arch
#

2019.3?

noble agate
noble arch
#

Try in an empty project to make sure it's a files/unity issue and not your additions

#

If that's unity version thing try installing a different one, f.e. 2019.3 with vanilla android sdk

noble agate
#

How do I know what Android SDK I'm using? I followed a youtube video to implement my SDK a while back.

noble arch
#

Also how are you triggering the audio play?

#

If you install via Hub there's an option to add tools for Android build support

noble agate
#

Oh, cool. I'll try doing it through the hub.

#

All the audio in my project is subject to this issue. To try to diagnose the issue, I've tried putting a line of code which says "if a touch begins this frame, playOneShot", and even using that, it's still got a half second of delay.

noble arch
#

Play one shot may have some issues iirc
Try just Play

noble agate
#

I also tried it with Play, and saw no difference.

#

However, PlayOneShot is necessary for most cases in my game.

noble arch
#

Does the delay happen on each call or only for the first one?

noble agate
#

Every call. For example, I have a button (not a Unity button, a home-made one) where touching it should play a hover noise. However, every time you touch it, the hover noise waits half a second before playing. And if I press the button quickly and repeatedly, then the audio source seems to panic and sometimes even skips the noise.

noble arch
#

Also did you try on another phone?

noble agate
#

I haven't tried on another phone yet.

noble arch
#

Maybe some weird driver glitch

noble agate
#

I'll try using the vanilla SDK from Hub, and see if that changes anything. I'll get back to you.

#

Thanks for the advice.

noble arch
#

What about audio Spatializer? Did you try to switch it?

noble agate
#

It's set to 2D.

noble arch
#

3d doesn't change anything I guess? Well I meant another thing in Unity settings

noble agate
#

Oh, where would this be?

noble agate
#

Ah, I'm using none.

noble arch
#

Try change that too + 3d space

noble agate
#

The only option is none.

noble arch
#

@noble agate yep that's it

#

Also check if your audiosource settings are correct - try to reset them

noble agate
#

Will do, I've now reset the audio source. The only thing that seems to have changed is the Play On Awake though, which I turned off.

#

Regarding the update, do I have to change anything in settings or build settings to use it instead of what I currently have?

noble arch
#

Don't forget to backup your project

noble agate
#

I did.

noble arch
#

Then you just open the project with another unity version in hub

#

But I'd start with a blank one

noble agate
#

Oh, I mean the Vanilla SDK. Since I assume my project settings are going to carry over into the new Unity version.

#

Will the old SDK still be selected in my project or something?

noble arch
#

Not sure, you can go into new unity - preferences and see what's there

noble agate
#

How will I know which one to select? What will the vanilla SDK be called?

#

And yeah, I'll try a blank project too. Just waiting to finish the update.

noble arch
#

Built-in in Unity

noble agate
#

@noble arch Okay, I finished the update, and looked in my settings. This is what it says about my SDK:

#

Seems I'm missing the "recommended" Android SDK tools, even though I selected to install Android Build Support when updating in Unity Hub.

#

How do I get this recommended version?

noble arch
#

Not sure, maybe some unity folks may know better

finite storm
#

it's a bug

#

uncheck the little check mark and check it again and restart

noble arch
#

@finite storm you may need some code to force show permissions

finite storm
#

i did download a plugin-ish

#

AndroidRuntimePermissions.Permission result=AndroidRuntimePermissions.RequestPermission("android.permission.WRITE_EXTERNAL_STORAGE");

finite storm
#

but's not workin

noble agate
#

@finite storm
Hm... I tried unchecking the little check mark, and checking it again, and restarting Unity. Didn't change anything. Still looks the same.

#

Or did you mean restart my computer?

finite storm
#

no i meant unity

#

Hmm

#

it worked for me I have 2019.3.0f3

#

did you look in unityhub to see if it says anything ?

noble agate
#

Nothing seems off in Unity Hub.

half lodge
#

Does anyone know if the android keyboard that comes up by default somehow overrides the Input field?

#

I've got an input field in my app that a user can enter text into, and a button below it that has onClick event to run a script. when i build that to my device, it doesnt even run the on click event at all

half lodge
#

i ran the debugger and im getting this

#

even though everything is fine on the pc im using

noble arch
#

@noble agate why not 2019. 3 though? Did you try in a blank project yet? Does it build with what new unity has by default (wrt android sdk settings)?

robust hamlet
#

@half lodge your problem is another crash, you should check your code closelly, some missing scripts and etc after fixing those it might work

glossy sluice
#

Check line 334?

spice frigate
#

can i post a help question in this channel relating to android builds?

spice frigate
hazy kiln
#

Guys, I was making an android game. When I deployed my game into my phone, When I export it in Portrait(9:16), border areas on left and right are invisible

#

#💻┃code-beginner Guys, I was making an android game. When I deployed my game into my phone, When I export it in Portrait(9:16), border areas on left and right are invisible

spice frigate
#

picture?

hazy kiln
#

One sec

#

This is how it should look like in the editor. please note the borders

spice frigate
#

well, just make the game area abit wider then

hazy kiln
#

You mean, to scale up the camera coverage area

spice frigate
#

or not as wide, whatever direction you need to expand/shrink game area to fit screen

hazy kiln
#

But In the game preview window,there is not misfit

#

I'm nnot able to monitor how much area will be cut off while it came to mobile

spice frigate
#

i have this issue alot with canvas'. though i just do trial and error

#

if it doesnt fit this build, change it, rebuild and see

#

are you using Unity 5 remote viewer?

#

highly recommend for this sort of stuff.

hazy kiln
#

remote viewer?, Idk what it is

spice frigate
#

it streams the game from the computer to the phone

#

its an app on the app store, download it and use that

hazy kiln
#

Okay ,let me try that

spice frigate
#

makes testing far easier

#

"Unity remote 5"

hazy kiln
#

But what if our app is opening in a phone with different resolution?

spice frigate
#

if its not a canvas, i think it'll try scale to device (i think)

#

if you're using canvases, you need to select "scale with resolution" in the canvas settings

#

once you get unity remote 5, you'll understan

hazy kiln
#

Okay

#

, let me see

spice frigate
#

phone needs to be connected to computer via a suitable data transfer cable, and all the trusting things you need to accept on mobile

hazy kiln
#

Okay

#

I don't have a canvas

#

Is it necessary

#

If there is no UI element

spice frigate
#

only if you need it

hazy kiln
#

What is actually the purpose of canvas

#

Screen scaling?

spice frigate
#

it is for UI elements such as game names, buttons etc

hazy kiln
#

Okay so in my case it's not because there is no canvas , right?

spice frigate
#

correct

#

wisah someone would help m,e with my issue ahah

hazy kiln
#

The message in your screenshot is not visible

spice frigate
#

eh

#

oh

hazy kiln
#

I had heard that while building game for uploading to playstore, just like for ARMv7 we have to make a build for ARM64 as well

#

Otherwise there will be a permission deny

#

Idk know much abt it

#

I just had heard like that

#

I tried that. Now everything just fit in, but the screen looks compressed

#

Balls are oval shaped instead of circular

spice frigate
#

is it all one sprite?

hazy kiln
#

Balls are instance of same prefab

spice frigate
#

just scale the game area, not the objects inside the game area

sterile swallow
#

Is there a way to test IAP prices without an alpha/etc being published? I got all these notifications that my app could take up to a week to get published into alpha but want to try out the IAP now.

#

or alternatively, is there a way to ensure my app gets published faster? The messages were dubious like it could take a week or weeks, and their "live support" is from 12 am - 12 am so does that just mean they don't have any?

spice frigate
#

only one way to find out. contact live support 😛

sterile swallow
#

it said 12am-12am gmt so thats 7 pm my time, guess ill give their 1 minute live support a go

#

but about the IAP, any way to test that without publishing?

spice frigate
#

google play store?

#

if so, no idea sadly, i cant even upload my APK with the issue ive got

finite storm
#

it says you need a privacy policy

#

kinda like other mobile apps have when you sign up

spice frigate
#

for a game that requires no user data, you dont need a privacy policy

grave jolt
#

Hello
the animator fade-in on phone doesnt work
anybody have ideas how to fix that?

sterile swallow
#

has anyone had issues with illcyp or whatever 64x versions of their android apps?

#

I heard it can mess with google's IAP, and currently my IAPs work in my editor but not on my phone once the build is uploaded to google play

#

"IL2CCP" is the actual name lol

sterile swallow
#

It fixed itself after like an hour, weird

hazy kiln
analog marsh
#

I need some help with my 3d android game. I have a basic script that literally just check if the screen was touched, and if it is then it will AddForce on a cube upwards. It works fine the only problem is that sometimes when I click the screen it add more force to the cube sometimes, while other times it doesn't. If I change the input to my keyboard on my pc, it is always the same force that is applied, so there must be something wrong with the touch, either if it detects that I press multiple times or anything else.. i don't know

#

(Sorry for poor english)

sharp quiver
#

@analog marsh what do you use to check if the screen was touched?

#

do you use GetTouches or Input.GetMouseButton ?

analog marsh
#

In the update loop I use this

foreach (Touch touch in Input.touches){
if (touch.phase == TouchPhase.Ended){
}
}
#

I mean TouchPhase.Begin but I tried ended to test

#

Began*

sharp quiver
#

are you also using Input.GetMouseButton?

spice frigate
#

clamp the add force?

analog marsh
#

Yes @sharp quiver

sharp quiver
#

You need to set Input.simulateMouseWithTouches = false; then

#

or not use Input.GetMouseButton when not in editor

#

or not use the Touch method

analog marsh
#

I just used GetMouseButton just to see if it worked

sharp quiver
#

oh i thought you meant you had them both in your script at the same time

analog marsh
#

No mainly i will use the Touch only

#

Is it because the game believe I touch the screen multiple times?

#

And then call AddForce multiple times?

sharp quiver
#

try

#

if (Input.touches[0].phase == TouchPhase.Began) {

analog marsh
#

Alright I do it later, not at my pc atm

sterile swallow
#

i need some help with unity ads yall

#

I have my ads set to run every 5 deaths in game, and to not run if a no ad thing is purchased, and it works when i build and run to my phone. but when i load it as an alpha build from google play it runs a unity ad every 3 deaths and does not take notice of disable ads

sterile swallow
#

ok Google, ummmm..... it was an issue with the app on the store running a script that wasn't even attached to any objects in the game, it was an old ad script i had in a folder called "unused scripts"... deleted it and it works now

spice frigate
#

did you ever have my issue when uploading to google?

sterile swallow
#

hmmm, i actually do have a privacy policy set so i havent seen that

#

do you have one? they are usually free to find online for general policies

spice frigate
#

could you show me please aha

sterile swallow
spice frigate
#

tyvm

sterile swallow
#

no prob

spice frigate
#

can i pm you quick?

sterile swallow
#

sure

analog marsh
#

@sharp quiver It didnt work to do that way

spice frigate
grave jolt
#

@spice frigate in the settings, you have to turn on an 64x stuff, i dont know what is the name, watch a tutorial.. 😅

hazy kiln
#

Guys, what will be initial touch.Count if ther are no touches in the screen

spice frigate
#

Thanks lion :)

grave jolt
#

no problem!

how can i come up with MOBILE GAME ideas fast?

spice frigate
#

random game theme generator

grave jolt
#

umm
i try it.. 😂

spice frigate
grave jolt
#

thats literally story ideas for pc

spice frigate
marble lava
#

Hey guys, i'm making a game for mobile but i have some troubles optimizing. My phone has some trouble running it though. After some experimenting i decided to export a completely empty scene to my phone, with only the camera as an active object. However, it seems to only run at about ~30 fps. Looking at the profiler, The 'other' category seems to take about 10 times to finish compared to the other categories. I'm not sure what to do now, any ideas?

analog marsh
#

Anyone know how to solve this? I tried changing the version code in unity but that didnt work and now im stuck

spice frigate
#

you also need to update the build code,the one under version code too

analog marsh
#

ok ill try that

finite storm
#

Do you know why when I load a png file from StreamingAssets folder in a texture it displays as a question mark?

steel pecan
#

A question mark reperesent a image that cound not be loaded / is not valid.

analog marsh
#

know how i can delete the alpha release? Ive been trying to google now for some time but nothing works..

spice frigate
#

ive also been doing this today, i think if you create a new one, it just over-writes the previous

analog marsh
#

Yeah i made the beta one but that didnt overwrite, also i just want the alpha release to be gone from the console so i only have the beta there

wicked holly
#

is the new input system good to use on mobile games? or should we be using the old input system?

uncut lark
#

Hello guys, is there any chance that i can use water with shader for mobile game? Everything i tried is very expensive for mobile devices

vague flame
#

Hey all, does anyone know where i can see the full feedback from my "Submit for Review" on iOS. They have given me "Invalid Binary", and im trying to see details 😛

vague flame
#

nmd 🙂

snow whale
#

Hey guys. I just updated my project from 2017 to 2018 and now when I build to android, my movie player does not work / renders PINK. I have tried adding the shader to the "Always Load" in settings, and I have created a dummy texture that uses the shader in /Resources. I have no clue why this is happening.

#

I am using Mobile Movie Texture asset, which is seemingly no longer managed.

#

Unity Movie did not work for my purposes.

frigid garden
#

Evening. Not sure if anyone can help me with this since its a little obscure, but I'm looking for a way to check if a firebase user is signing up for the first time. Google, in all its wisdom, has told me that I can use AdditionalUserInfo.isNew() after a login result but it's just not there. I'm using facebook to log into firebase.

brave crow
#

Hey guys. Anyone familiarized with Google Play Services? I would like to ask something. My game was running very smoothly on every Android Device I tested so far, even the 2016's low end ones. But since I implemented Play Services API on my project, the performance became terrible, cause the game started to stutter and the average frames per second is near half than it was before. I expected that after the API was implemented, the performance may suffer a little bit, but the way it happened to me make my game almost unplayable. Someone else experienced something like this? Do you have any tips? Actually I did not profile my game yet, as I will do it tonight, so maybe I can find more information about it. Thanks for now, peace.

robust hamlet
#

@brave crow it really depends on the way you are using Play Services and what part of it exactly. Can't really help with no information

brave crow
#

Hey @robust hamlet Actually I'm using just Sign In and Leaderboards, no achievement neither cloud saving yet.

#

I'm trying to use IAP, but I'm waiting my app being approved on Play Console revision.

robust hamlet
#

it's google play games, not google play services

#

you should profile your game to see what cause that lag

#

at the beginning it's normal to have some lag while trying to login, but it depends on how you are posting the score for particular leaderboard

brave crow
#

@robust hamlet About lag in login I expected, but it happens during all the game. I'm posting to Leaderboards only in a function called at the end of the game round, so I think it's not the issue. But I will profile it and come back again with more info. Thanks man.

robust hamlet
#

You should check logs too, maybe there is something else which is happening because of play games

twilit bluff
#

I forgot how long it takes from upload to google play till its puplished. Anyone who can tell me?

#

3 days?

iron acorn
twilit bluff
#

It just says waiting for puplish

iron acorn
#

Read the publishing status section.

brave crow
#

@robust hamlet Sure, I will. Thanks for your help man.

spice frigate
#

@snow whale have you used a different render pipeline? go into your assets folder, locate a prefab/sprite. right click it and select "reimport all" should fix it

lime spear
#

Hello Everyone,
im having a weird issue with my game, when limiting the FrameRate on mobile the Frame Rate will get High Variance.
my game is stable at 60fps but when limiting it to any number between 30<>60 the frame rate get constant variance
this is how deltaTimes looks like at 40FPS in build (0.03308875, 0.00001, 0.03309203, 0.03311411, 0.02692817, 0.006139117, 0.03307073, .......), but stable at ~0.025s in editor which is really weird. at first i thought the problem was perfmance but why when setting it to 60 or -1 it gets perfectly stable frame Rate 0.016~ ? this means it's not related to resouces problem but unity frame rates it self.
does anyone has any suggestion ?

snow whale
#

@spice frigate That didn't work. :(

spice frigate
#

Are you using a different render pipeline from the "stock" one?

snow whale
#

Where do I check that?

spice frigate
#

i cant remember off the top of my head, let me open a project

#

Edit < render pipeline < lightweight < upgrade all to lightweight

#

if you have that

snow whale
#

I don't have that, but I might try 2019

#

I don't have Edit < Render pipeline

steel cosmos
#

Has anyone ever implemented Apple Search Attribution on Unity?
I cannot seem able to get the plugin code to return anything 🤔

uncut lark
#

What canvas resolution should i use for my game_

#

?

#

I use Portrait view

rapid walrus
#

@uncut lark 1080x1920 i think

#

And add a canvas scaler

snow whale
#

Okay, I've updated to 2019, and I have switched to Unity Video Player. IT seems there is no way to access the filestream of the player?

#

I need to download a video that is streaming, or stream a video that is downloading. On mobile this doesn't seem to work.

#

IT reaches the end of the file, and stops while it is streaming from a downloading file.

snow whale
#

It reaches the end of the first buffer, I guess I mean

spice frigate
#

@uncut lark but reference it the right way round. use 1920x1080.

uncut lark
#

Thanks!

spice frigate
#

np broski

tame otter
#

I am still struggling to test my project on my android device, every time I click play nothing happens to the Unity remote 5 app
-USB cable is connected
-USB debugging is enabled
-Editor changed to any android device
-Build setting is android
-Unity remote 5 installed and running
Devices: Samsung S9+ and Windows 10

spice frigate
#

is the game build set to android?

tame otter
#

yup

spice frigate
#

have you enabled develeper mode on device?

tame otter
#

Yes thats how i enabled USB debugging

spice frigate
#

have you set your phone as testing device?

tame otter
#

The unity remote device setting is editor? yes

#

My cable is fine as I am still able to transfer data from my laptop to phone

spice frigate
#

Watch the brackeys tutorial on it, that worked for me

tame otter
#

Can't find the video, you have link?

spice frigate
uncut lark
#

Hello, can i somehow control vibration, i mean, i want to get very satisfied vibration. For now i am using code Handheld.Vibrate(); but i feel like it lasts too long. Can i lower duration of vibrating?

spice frigate
#

Edit the duration in the Handheld.Vibrate script

#

or make your own vibrate function

uncut lark
#

Thanks!

velvet hare
#

So, I have a project in android studio, from which I need to open a unity module, and send data to the unity module.

https://medium.com/@angelhiadefiesta/integrate-a-unity-module-to-a-native-android-app-87644fe899e0

Tried following this link but to no avail after Step 4. Someone told me something about fragmenting the main activity ?! Any insight will be greatly appreciated!

Medium

The Goal:
— Create a native Android app that can launch and start a Unity Module / Project
— Pass some data from native Android app to…

naive spear
#

I have a problem with a texture used with a custom shader on mobile. As you can see, the texture is not biliear interpolated. On PC it is.

#

I debug logged the texture settings and they are set to bilinear filtering and RGB24.

#

In the shader I do a tex2D(_DistortionTex, distUV)

#

What could be the problem?

glossy sluice
analog marsh
#

How do i make my game not react on any touches if any UI elements is touched?

odd arrow
#

Several ways. Event system known which object is under it (select event system with extended panel to see information at runtime). Also UI can track when you enter it.

finite storm
#

Do you know why TextMeshPro UI Text errors and doesn't display?

finite storm
#

Nevermind I forgot to update the obb file, my app is binary split.

astral grove
uncut lark
#

for mobile games, should i use standard shaders or change it to mobile/something? What is diference?

robust hamlet
#

Use LWRP / URP

#

@astral grove Post the error message

quartz kernel
#

Mobile shaders perform better so if they still look like you want them too then it's good to switch

uncut lark
#

Thanks

glossy sluice
#

hello

#

2 questions

#

do you guys use github for your mobile games?

spice frigate
#

Itch.io and Google play store for me

#

Do you mean for publishing, or for development

chrome phoenix
#

You may need Git LFS, depending no the size of your assets.

pine basin
#

Hi - I have a standalone android application and i want to send a message to a unity3d application, can i use UnityPlayer.UnitySendMessage to do this or do I need to do it a different way?

robust hamlet
#

Do you have an access to source code of both apps?

pine basin
#

yes

#

i am trying to do it via creating an intent now - but my java knowledge is fairly poor compared to c# so i am struggling a bit

#

I have unity talking to the java app and now i want to send a message back (at a different time)

#

so at the moment i have this in my java code -

#
        sendIntent.setPackage("maccs2tablet.kprmidlink.com");
        sendIntent.setAction(Intent.ACTION_SEND);
        sendIntent.putExtra(Intent.EXTRA_TEXT,"This is my text to send.");
        sendIntent.putExtra(Intent.EXTRA_TITLE,"UNITY");
        sendIntent.setType("text/plain");
        startActivity(sendIntent);```
#

and this in my unity c#

#
        AndroidJavaObject currentActivity = UnityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
        AndroidJavaObject intent = currentActivity.Call<AndroidJavaObject>("getIntent");
        String text = intent.Call<String>("getStringExtra", "UNITY");
        MessagesShow.ShowMessage("Got A Message: " + text);```
#

I get the message 'no activity found to handle intent' from the java app

#

though thinking about it my unity code may be in the wrong place as the app i already running and i don't know how to capture the message ?

pine basin
#

Am I missing something from my unity manifest to do this?

pine basin
#

Added lines into my manifest, and now my app crashes when I send the message rather than it saying it can't be found

#

just can't understand how I am meant to handle the incoming intent within unity

#

if anyone could shed some light on this I would be grateful

robust hamlet
#

can you paste the crash log

#
  • on Android / Java your code is a little wrong, if in Unity you want to search for a text with key "UNITY" you should call:
#

sendIntent.putExtra("UNITY", "This is the message which I want to show in Unity App.");

pine basin
#

Ah ok i have changed that - as for the crash log I am not getting anything from logcat that shows a crash, my android device just goes to the home screen and leaves both apps running in the background, but if i press one it restarts it

#

it didn't do this until i added this into my manifest -

        android:name="maccs2tablet.kprmidlink.com.SumUp"
        android:exported="true"
        android:required="false">
    </activity>```
#

and changed

#

my java code into -

        sendIntent.setPackage("maccs2tablet.kprmidlink.com");
        sendIntent.setClassName("maccs2tablet.kprmidlink.com", "maccs2tablet.kprmidlink.com.SumUp");
        sendIntent.setAction(Intent.ACTION_SEND);
        sendIntent.putExtra("UNITY","This is my text to send.");
        sendIntent.setType("text/plain");
        startActivity(sendIntent);```
#

the activity is in the unity manifest...

#

the bit i don't understand is where do I put the unity code

#

its not like im handling an event

#

do i have to have it in a script where that code sits in start?

#

@robust hamlet

#

ah just ran the unity logcat and get this -

#
2020/01/10 14:30:13.024 14614 14614 Error AndroidRuntime: Process: maccs2tablet.kprmidlink.com, PID: 14614
2020/01/10 14:30:13.024 14614 14614 Error AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{maccs2tablet.kprmidlink.com/maccs2tablet.kprmidlink.com.SumUp}: java.lang.ClassNotFoundException: Didn't find class "maccs2tablet.kprmidlink.com.SumUp" on path: DexPathList[[zip file "/data/app/maccs2tablet.kprmidlink.com-xrUiweMUN5fXeBQ7iStyPg==/base.apk"],nativeLibraryDirectories=[/data/app/maccs2tablet.kprmidlink.com-xrUiweMUN5fXeBQ7iStyPg==/lib/arm64, /data/app/maccs2tablet.kprmidlink.com-xrUiweMUN5fXeBQ7iStyPg==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]```
#

I do have a class called SumUp though

robust hamlet
#

@pine basin Sorry I don't have much time to spend on this, but here is a link which will help you to achieve this on Android side:

https://developer.android.com/training/sharing/send

Android Developers

When you construct an intent, you must specify the action you want the intent to "trigger." Android defines several actions, including ACTION_SEND which, as you can probably guess, indicates that the intent is sending data from one activity …

pine basin
#

ok - thank you anyway

sacred mountain
#

Hey guys, last time I looked into alembic support for mobile it wasn't really there, has that changed at all recently?

scarlet moon
spice frigate
#

would it not be better to do APK?

scarlet moon
#

it needs to run on a website unfortunately, with the goal to have mobile browser support if possible

formal elk
#

I have been messing around with webGL on mobile. It's not production-ready environment, but.... the client got what he wanted. You basically need to go to the generated .js file jumpboard and remove the lines that check for mobile browser

scarlet moon
#

interesting, I will give that a look Simon, thanks!

odd arrow
#

@twilit bluff This isn't a place for it.

twilit bluff
#

What do you mean

odd arrow
#

If you are seeking collaboration use Unity Connect

glad acorn
#

Should my game be published on the google play store for the services to run or is it fine if I have set them up on draft?

broken tree
#

huh

#

is this channel for mobile users typing on discord or discordians discussing on mobile games

formal elk
#

@glad acorn Yes, you need to publish. At least to internal track

@broken tree

Ask questions, discuss, and share anything related to mobile development!

broken tree
#

o

glad acorn
#

When I am trying to publish my app I am getting this error This release is not compliant with the Google Play 64-bit requirement the x86 is disabled in unity player settings tho

spice frigate
#

i had this issue

#

you need to use LLCAP or whatever its called. let me find the forum page for you

#

IL2CPP

#

thats what its called

glad acorn
#

Lemme try again

spice frigate
#

here you go @glad acorn let me know if that solves it and / if you find it

glad acorn
#

I got this error

#

il2cpp.exe is a windows file

#

And I am using Unity in Linux

spice frigate
#

Oh. then i dont know pal, never used linux

glad acorn
#

Is IL2CPP supported on linux?

spice frigate
#

it could be. but there is an option to use ARMV64 or something like that, i cant remember the exact details, you miught have to google round abit. there will be a workaround on forums etc

glad acorn
#

I having an error when I am trying to build however I found online that I should manually install the NDK in Unity I did the error was not solved

spice frigate
#

did you install the NDK via unity hub?

glad acorn
#

At first yeah

#

But I got the error

#

And after googling I found out that you should install it from the official zip

#

I did that

#

But the error still exists

spice frigate
#

you might need to go into preferences and assign the NDK

glad acorn
#

The NDK is fine Unity has recognized it as it should do

glad acorn
#

So after examining a bit more the huge error I found out that it does not have the permision to use this file /home/dimitris/Documents/Block rush/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/583E6FDCD0E7695E90227FAAAF784053.o. The file does not even exist though any idea?

#

Gimme a second I got an idea

#

Nah

#

It did not work

#

Well It kinda did?

#

I mean now I am getting a smaller error

#

So I just marked clang and clang++ as executables manually

#

What is the unity hub default ndk version?

spice frigate
#

Im not entirely sure, i think it depends on what version of unity you are running

glad acorn
#

I'm going to try to reinstall it manual

glad acorn
#

Okay so I installed the NDK manually

#

Now I am facing this error Error building Player: Win32Exception: ApplicationName='tools/bin/sdkmanager', CommandLine='--list', CurrentDirectory='/home/dimitris/Documents/Block rush', Native error= Cannot find the specified file

spice frigate
#

Do you have to use linux?

glad acorn
#

I have access to no other os

spice frigate
#

im at a loss mate

glad acorn
#

Everything was compiling fine when I used mono as backend tho

glad acorn
#

Yeah I can create apk using mono... IL2CPP seems not to be working

#

So let me summarize the problem, I am using Unity 2019.2.17f1 on Fedora 31 (with KDE) building the android game is working fine using mono but google play store requires 64-bit support to the app so I have to swap to IL2CPP but that won't build the app despite the fact that the il2cpp folder exists

spice frigate
#

when setting IL2CPP, have you also ticked ARM64? it is not visable if IL2CPP is not selected, and ARM64 is located just below it, as a tick box

#

@glad acorn

glad acorn
#

Yeah I have enabled ARM64

spice frigate
#

still same issue@?

#

sorry for the slow replys. @ me so i can see you sent a message 😛

#

holy fuck minons art is on here

#

anyway yea @glad acorn

brisk raven
#

Why is my application only detection my front camera?

#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class PhoneCamera : MonoBehaviour
{
    private bool camAvailable;
    private WebCamTexture backCam;
    private Texture defaultBackground;
    public RawImage background;
    public AspectRatioFitter fit;
    public Text error;

    private void Start()
    {
        defaultBackground = background.texture;
        WebCamDevice[] devices = WebCamTexture.devices;

        if (devices.Length == 0)
        {
            error.text = "No Camera detected";
            camAvailable = false;
            return;
        }

        for(int i = 0; i < devices.Length; i++)
        {
            if (!devices[i].isFrontFacing)
            {
                backCam = new WebCamTexture(devices[i].name, Screen.width, Screen.height);
            }
        }

        if(backCam == null)
        {
            Debug.LogError("Unable to find back camera");
            error.text = "Unable to find back camera";
            return;
        }

        backCam.Play();
        background.texture = backCam;

        camAvailable = true;
    }

    private void Update()
    {
        if (!camAvailable)
        {
            return;
        }

        float ratio = (float)backCam.width / (float)backCam.height;
        fit.aspectRatio = ratio;

        float ScaleY;
        if (backCam.videoVerticallyMirrored)
        {
            ScaleY = -1f;
        }
        else
        {
            ScaleY = 1f;
        }
        background.rectTransform.localScale = new Vector3(1f, ScaleY, 1f);

        int orient = -backCam.videoRotationAngle;
        background.rectTransform.localEulerAngles = new Vector3(0, 0, orient);
    }
}
#

(mention me)

brisk raven
#

Someone who can help me?

#

He's not detecting my back camera

spice frigate
safe mortar
#

@spice frigate I can't find it. Is it region specific or worldwide?

spice frigate
#

Worldwide, I can send you a link direct to the page if you like @safe mortar

safe mortar
spice frigate
#

<3

safe mortar
#

I can see myself spending way to much time on that game

#

Maybe if you walk in the right direction, let the player stay looking in that direction.
Currently everytime i go to the right after I let go he looks to the left

spice frigate
#

Yea. I'm planning on changing the player, as it's terrible. I did everything myself and clearly I'm not good at animation

glad acorn
#

So I tried to run the il2cpp.exe from my bash terminal and I go the error
bash: ./il2cpp.exe: cannot execute binary file: Exec format error
So I am pretty sure that linux can not recognize the ".exe" file

uncut lark
#

Anyone knows some good publishers that i can contact?

rough ravine
#

@here hello friends, can someone help me in unity am a beginner and would have some questions, sorry for my bad english come from germany
dm pls

odd arrow
#

@rough ravine Please don't advertise your questions in multiple channels. And if you have questions ask them.

tulip grail
#

@rough ravine stop asking to ask a question and just ask the question you want to ask publicly

rough ravine
#

I ask if someone can help me so that I don't bother others

spice frigate
#

most people in here are friendly and will help you regardless of your technical ability

#

However, generally just ask in 1 channel. if no reply within however long, ask again. but dont spam it

odd arrow
#

@solemn quail This is not the place to advertize

pseudo prism
#

@spice frigate i instalez toate app

#

Instal*

spice frigate
#

What? @pseudo prism

pseudo prism
#

I test yoar game

#

I fine

#

Is

#

Fine

spice frigate
#

Oh thank you man <3 if you could leave an honest review on it too on the app store that would be fantastic

pseudo prism
#

Ok

#

I want help

#

@spice frigate You not have ads in game?

spice frigate
#

There are no ads in the game @pseudo prism

lean glen
#

are you literally just going through all the channels asking for help about getting ads into your game!?

pseudo prism
#

No

spice frigate
#

Thanks for the rating @pseudo prism <3

white sierra
#

Hello everyone!

I hope this is the right place to ask this.

I am working on a Unity app that will run on Android.
For the first time I need to create an Android library that extends the default UnityPlayerActivity.
(For more on what I want to do, you can follow this link: https://www.reddit.com/r/redditdev/comments/3lahqw/authorizing_an_app_from_unity3d/cwqibs3/).
So I have exported the project for android, using Android Studio I am able to edit the code and now I need to create a library from it.
This is where I get struggled. When I go to File > New > New Module > Android Library I am asked to update my project to androidx.* dependencies.
I thought that Unity did come with old namespace libs so I went into Refactor > Migrate to AndroidX but it says that "No usage (is) found in the project".
I don't know exactly what I should do, how I can build a .aar file from here.

If someone could help me on this I would really appreciate! Thanks a lot!

robust hamlet
#

@white sierra Why do you need to extends the default Activity?

#

In most cases you can achieve whenever you want without doing that, it really depends on your case

white sierra
#

@robust hamlet It's a complicated topic haha. Well here is more informations about what I am trying to do (and if there is a better approach, of course I take it).

Goal

Request gmail HTTP api to be able to fetch mails.

How to?

Of course the API is protected, the user needs to be signed in. There are two ways to sign in the user :

  • Google Sign In
  • OAuth 2

The case of Google Sign In

The package Google Sign In for Unity isnt maintained anymore, even the examples doesnt works. Now we should use Google Play Games. But Google Play Games only works with Android and I need to ship my app on both Android and iOS.

The only solution?

So I have to use OAuth2. The thing is I don't know how to integrate it properly, OAuth needs to run in a browser since google will send us a redirect response, open HTML forms that will be filled up by the user and of course, my whole app have no idea of what happens here because in OAuth, your app never knows the username and the password.
I wanted to do a Application.OpenURI to open the browser. The thing is after the OAuth process I need to get the generated JWT back to Unity. This JWT will be used to make requests to Gmail API. But using Application.OpenURI is not the solution since I can't have the token back. Once the browser is opened, Unity cant talk to it.
I have read this reddit post where someone overrided the default activity (in android) and was able to send the token back from the browser to Unity
UnityPlayer.UnitySendMessage("AccessManager", "OnURI", uri.toString());.
This is what I am trying to achieve.

My point is : if I am able to do that in android, I'll just have to do the same in iOS and everything could be great!

#

(I hope I made myself clear, english isn't my mother tongue sorry)

robust hamlet
#

So as far as I understand, you want to open a web browser with login and after that get the token to your base activity and do whatever you want to do?

white sierra
#

yes 🙂

robust hamlet
#

Since you are exporting your project to use Android studio I don't see why you need to create a library for that

#

you can extend directly everything inside your projects, without overriding the default Activity

#

Or, you can create another Activity which you can use to communicate with the web browser / getting token and return everything to base activity

white sierra
#

this is the part when I am a newbie: in order to do so I need to export my Unity project to Android (to generate the android studio project) right?

robust hamlet
#

yep

#

Or you can create a library which does that and import it inside Unity project

#

this way you need to create a Java Wrapper in Unity to be able to use the library

white sierra
#

so maybe this is my issue: I'll work in that Android studio project but whenever I'll work on Unity, I'll have to generate it again and redo everything, this is why your solution based on a library sounds good to me.
I thought that creating a library was about making a .aar file that will be read by Unity!
I'll read some docs about creating that Java Wrapper around Unity 🙂 Thanks a lot.

pine basin
#

Was about to sugest you import the library

#

suggest*

#

also you shouldn't need to open a browser to oauth if you don't want to

robust hamlet
#

I think you should use Google Play Games for Android and use something else for iOS

white sierra
#

@pine basin interesting, I dont know about this. How the user can fill up the forms and provides its credentials to the provider?
@robust hamlet seems the easier solution and it seems easy to maintain too. But maybe I havent searched enough the thing is I cant see something else for iOS. This lib is the one that isnt maintained anymore.

robust hamlet
#

probably because of Firebase

#

not sure if you want to use it in your project

pine basin
#

if you are unsure you could take a look at the following assets - or maybe at least sneak peak the documenation if you don't use them to give you some ideas
https://assetstore.unity.com/packages/tools/network/web-api-kit-core-19663
https://assetstore.unity.com/packages/tools/network/web-api-kit-oauth-token-interceptor-extension-40572

WebGL Demo | Support

Build maintainable REST APIs on top of popular HTTP clients such as BestHTTP , UniWeb , HttpClient , UnityHTTP and Unity's built-in WWW and UnityWebRequest.

1-2-3 SETUP    The process of building your API is done in three easy steps us...

WebGL Demo | Support

Configure interceptors for any OAuth 2.0 API!    Fully configurable interceptors with zero code to write.

FEATURES

  • Manages the entire flow from granting consent to refreshing expired tokens
  • Failed HTTP requests are queued and retried...
#

we used this originally within our company they work well

#

we have an android app also that works via oauth though not through to google services theres no reason it can't

#

those links came up a bit larger than I thought they would - sorry !

white sierra
#

Haha, thanks a lot to both of you! I'll retry Google Sign In, maybe I missed something. And I'll also try out those packages. Just to make sure of something: @pine basin you can read your JWT tokens from Unity?

pine basin
#

yes

white sierra
#

Okay @pine basin . Thanks a lot for your help!

pine basin
#

as long as you are using 4.x

#

i believe

#

framework

glad acorn
#

So I built my game using IL2CPP and I built an app bundle, however I am getting this error on google play when I am trying to upload my app Your Android App Bundle is signed with the wrong key.

spice frigate
#

i had that few times, i just created a new keystore

#

glad you fixed the old error 🙂

amber plume
#

I use a 3d model in my unity app, I made the model with UMA. It works perfectly on my computer, when I test the app on a real phone, the model's shirt rips.

#

is this the right place to ask?

spice frigate
#

If its about a mobile application, then yes

amber plume
#

it is

glad acorn
#

@spice frigate I did not, I just understand that I would lose too much time trying to fix it so I dual boot my system using 60GiB for windows 😂

spice frigate
#

well, atleast you got a work around 😛

amber plume
#

any ideas as to how to stop a 3d model's shirt from ripping during transfer to a phone?

spice frigate
#

not entirely sure what you mean potion

amber plume
#

I put an animated 3d human model in my app. when I test the app on my computer, the model looks normal.

spice frigate
#

photo etc?

amber plume
#

but when I build and run to a real android device instead of the in engine test the model appears with holes in the shirt

#

hang on

spice frigate
#

do you have unity remote 5 installed on phone? for actual testing

amber plume
#

unity remote 5?

spice frigate
#

google play store it

amber plume
#

downloading

#

now what?

#

got it

spice frigate
#

plug the phone in via a suitable data transfer cable

#

run the game, and it shgould displayt on the phone

amber plume
#

its loading

spice frigate
#

flip your phone to whatever orientation you're wantingf your game to displayt

amber plume
#

ok

#

why does building it without this cause problems?

spice frigate
#

its replicating the game from your monitor onto the phone

#

have you tried making the shirt on the model Slightly bigger?

amber plume
#

how

#

I made the model with UMA character creator

spice frigate
#

show me the hierachy

amber plume
#

its the uma_dcm

#

that is what you meant by hierachy right?

spice frigate
#

is scarlet your women model?

amber plume
#

not exactly, its where I store the model's programming

grim gate
#

do you know if the shirt mesh vertices are modified by a vertex shader at all? Precision on mobile is usually half of desktop

amber plume
#

im not sure what a vertex shader is

grim gate
#

oh, sorry. Meshes are rendered in Unity by giving them a material. In unity a material has a shader that is used to color the faces of the mesh. On top of that, the shader can also modify the vertex positions if needed.

spice frigate
#

find the shirt model on the object, and enlarge it, is the easiest way. if its a seperate object

amber plume
#

I created the model in engine, then saved it to a string called recipe

#

the hirearchy appears after I run the app

#

found it

#

how do i increase its size

#

?

#

gotta go

spice frigate
#

Sorry I was afk. Just use the scaling tool

amber plume
#

im back, how do you change the size in the inspector

spice frigate
#

Scale too, next to all the movement stuff

amber plume
#

I can't find the mesh in my avatar, but i can find it in my files

spice frigate
#

Never used UMA what whatever it is, so I'm not the best person to ask. Try asking in the 3d models section

amber plume
#

ok

spice frigate
#

i forgot how long it takes to compile a 64bit game, Holy moley

pine basin
#

I still need some help with getting my stand alone java application to send a string across to Unity if anyone is available who knows how to do it

velvet hare
#

@pine basin Were you able to manage using UntiyPlayer.SendMessage? If yes, could you share how, stuck on it :/

pine basin
#

No - I don't think I can do it that way unless it is a java plugin inside unity

#

I have a completely seperate application

#

so i am trying to do it via Intent

velvet hare
#

In my case, I have an android application, which needs to open the unity module and both run parallely together

pine basin
#

your unity module is inside the android application? or seperate app

velvet hare
#

seprate app

pine basin
#

you are trying to do similar to me then

#

i can send messages from unity to the java app, but not the other way around at the moment

velvet hare
#

Wait lemme explain more in detail.
I have an android app, to which I added a Unity module.
This Android app is the main app, and needs to open the Unity module and send realtime data to the Unity module

#

Someone told me that I need to fragment the Unity Module Activity but I really have no idea of Android Studio projects

velvet hare
#

@pine basin btw how did you manage to send from Unity to Android? Using UnityPlayer.SendMessage only? Can I get the scripts for them?

pine basin
#

            AndroidJavaObject ca = up.GetStatic<AndroidJavaObject>("currentActivity");

            AndroidJavaObject packageManager = ca.Call<AndroidJavaObject>("getPackageManager");

            AndroidJavaClass intentClass = new AndroidJavaClass("android.content.Intent");
            AndroidJavaObject intent = new AndroidJavaObject("android.content.Intent");
            intent = packageManager.Call<AndroidJavaObject>("getLaunchIntentForPackage", "maccs2tablet.kprmidlink.com.sumup");
            intent.Call<AndroidJavaObject>("setAction", "android.intent.action.MAIN");

            intent.Call<AndroidJavaObject>("addFlags", intent.GetStatic<int>("FLAG_ACTIVITY_NEW_TASK"));
            intent.Call<AndroidJavaObject>("putExtra", "SEND_COMMAND", "LoadLogin");

            ca.Call("startActivity", intent);```
#

unity3d code to send over data

#

then in MainActivity in onCreate in the java app I do


       Package = intent.getExtras().getString("SEND_COMMAND");

   if(Package.equals("LoadLogin")){ ```
#

so basically i pick up the commad i send over and run the equivalent code i want

velvet hare
#

Thanks! This should work out for me too then!

robust hamlet
#

@pine basin still need help?

velvet hare
#

Well, I could use it

pine basin
#

@robust hamlet yes I still can't get any comms back to my unity app from my stand alone android application - I have even moved onto possibly using a file now, but files are hidden on internal storage which presents yet another problem!

robust hamlet
#

have you tried with broadcast receiver?

pine basin
#

I don't know what that is?

velvet hare
#

If you don't have a latency issue then you could try Firebase

pine basin
#

both apps are on the same device in this instance

#

basically my unity3d app is controlling a java app which is processing mobile chip and pin payments via a card reader

#

and i want to send back the receipt details to my app

#

it takes payments fine - just can't send the data back at the moment - googling broadcast receiver

robust hamlet
#

this is the android documentation

#

the idea here is that you should create a broadcast receiver in library and import it in your unity app

#

than you can registerListener for that broadcast receiver let's say in Start function in your MonoBehaviour and unregisterListener on OnDisable let's say

#

in your other java app you just need to send and intent with the right action and the data

#

and if your broadcast receiver is registered as public / that means other apps can send data to it, you should be good to go

#

but be careful, you need a way to validate your data, because in this situation every app will be able to send intents to your app and can send invalid /fake data which can make your app crash

spice frigate
#

how do i increase the reponsiveness of my buttons? i mean ive put the number to 1million, and the player still stops moving if i tap 2 different directions too fast

#

(Touch controls)

glossy sluice
#

I need some help with writing files on iOS13, before, I used the following to extract values of a textbox:

string writerFile = Application.persistentDataPath + "/*.txt";

I could then go to iTunes to extract the created file from the App. Now the file won't get updated anymore. (Ever since the update to iOS13)

I guess there were changes made so that persistentDataPath doesn't work anymore. Is anyone aware of what else I could try?

brave crow
#

Hey guys. Anyone experienced with Google Play Games (Android)? I implemented the funcionality at the point that it's working, but not the way it should. I also saw that GPGS brings many problems to other developers. While opening savegame, there's a paremeter called DataSource, and the options are DataSource.ReadNetworkOnly and DataSource.ReadCacheOrNetwork. I use DataSource.ReadNetworkOnly, because I must prevent the user from using local/cache savegame, so I must force network savegame. But even if I start my game with the device disconnected from internet, the cache savegame is loaded (after an exactly 60sec timeout trying to load network data). So, even with DataSource.ReadNetworkOnly, it's recovering savegame from local storage. Can anyone help me with this? I searched all the web, but it's terrible to find anything about GPGS. Thanks for now.

spice frigate
chrome phoenix
spice frigate
#

@chrome phoenix so there would just be a black bar their instead?

chrome phoenix
near prism
#

Does anyone know in addressables if duplicate asset warnings from analyze each load their own reference in memory?

near prism
#

For example I have a prefab with references to a sprite atlas that is also in a scene and let’s just say one resource as well. When I analyze the build it gives three errors if I load the prefab scene and addressable would I have three copies of said sheet?

glad acorn
#

I am facing an error with my app, I have built it using IL2CPP from Unity 2019.2.17f1, the error was detected from adb 01-17 17:44:56.728 15583 15598 E Unity : (Filename: currently not available on il2cpp Line: -1)

#

The game is running perfect from the editor

#

And when I am compiling with mono

#

But I have to use IL2CPP for the ARM64 support

vocal junco
#

try compiling to your host platform with il2cpp and see if it craps out

glad acorn
#

What about the google play services libraries? They are designed for android, won't building for windows fail due to them?

velvet hare
#

@vocal junco Erm, I can't see the message here but I saw in the notifications so

Basically the android app is calculating a position from the camera, and then these values are supposed to be sent into the unity module so that it will use these positions to render some things

noble agate
glossy sluice
#

Hi, I am new to this industry and I have a little question that grinds me, I do not excel in mathematics and my question is, how much math do you have to do a car type simulator game, simulator bus for android and tell me like what math stuff I have to learn, formulas, etc.

sour oyster
#

learn.unity.com is a great resource for starting out and might give you an insight into what you dont understand.

noble agate
spice frigate
#

they're warnings

noble agate
#

I'm asking about the meaning of the warnings.

#

Whenever I build my project, I get these warnings, and then the build doesn't work on my phone or computer. (Even though it works perfectly in the editor)

#

I have no game object called "NoAuthObjPrefab" or any of the other mentioned names, so I don't know what any one of these warnings are referring to.

spice frigate
#

reimport project, or transfer to a newer version of unity

#

@noble agate

noble agate
#

I'll try reimporting, and report the results.

#

Okay, I reimported my project. I still get one warning when building, and the build still doesn't work (even though the editor version does). This is the warning:

#

When I play my game in the editor, it works perfectly, with no issues. However, when I build it and play it, it crashes as soon as it reaches the main menu.

#

I'm using Unity 2019.2.18f1.

spice frigate
noble agate
#

@spice frigate
I'm afraid that's not my issue. The same crash occurs whether I run an Android build, or a Mac build.

#

I've made this game work on Android many times before. The problem only showed up this morning, after months of developing this on Android.

spice frigate
noble agate
#

Hm... I've read through this page, and it doesn't seem relevant to my issue. I'm not sure what to take from it.

spice frigate
#

thats the warning message you hjave

noble agate
#

Yes, it's the same type of exception (UriFormatException). However, the exception in the link you provided says:
UriFormatException: URI scheme must start with a letter and must consist of one of alphabet, digits, '+', '-' or '.' character.

#

Whereas, in my screenshot, it says:
UriFormatException: The URI is empty

#

For that matter, my situation is nothing like the original poster in that link. I have not created a package of my own to import. My warning does not appear when booting the project up (It appears when building for Windows/Mac/Android). And unlike the situation of the poster, my game crashes.

#

I'd appreciate more substantive responses.

spice frigate
#

then i would recommend doing some research yourself.

sour oyster
#

@noble agate Regarding the warning you have a script that you've either deleted or renamed, and now all the placed that used to use it don't know what happened to it, so they "freak out".

#

That implies that the components that you use to have on there will no longer run, so things might not work as expected.

noble agate
#

@sour oyster Hm... what confuses me is that I have never used "Unity Performance Reporting Service". So I'm not sure why any of my components would be related to it. I don't even know what this service has to do with my project.

#

I'm not aware of having deleted, renamed or replaced Unity Performance Reporting Service, since I've never seen or heard of it before.

sour oyster
#

I'm not worried about that warning. I was thinking of the other warnings that said that prefabs were missing scripts.

noble agate
#

Ah, that. That's something I've solved. The issue remaining is the single warning, the UriFormatException.

sour oyster
noble agate
#

I'll try that right now.

#

Hm... looks like I don't have anything enabled there to begin with:

sour oyster
#

Then I'm unsure why it complains.

noble agate
#

If it helps, I think I added TextMeshPro to my project for the first time earlier in the same morning that I discovered the warning. So is there any chance that could be related? (I don't have any TextMeshPro objects in the hierarchies though)

sour oyster
noble agate
#

Hm... I don't see any illegal characters in the folders or filenames within my project.

spice frigate
#

try building on a different version of unity, see if that works

noble agate
#

I'll give that a try. I'll use a Unity version from a couple months earlier.

spice frigate
#

Make sure its a stable version though

noble agate
#

Definitely. My current version is stable too.

polar hound
#

can someone help me

glossy sluice
#

maybe tell the problem and people could decice if they can help or not

twilit niche
#

can someone tell me how to create reflections in game

robust hamlet
proud urchin
#

Windows defender prevents Android support module for unity from running?

austere swallow
#

So in the future I plan on trying to write a mobile game and I've got a question: how does one test mobile games on their mobile devices?

spice frigate
#

For inital testing i just put the APK on itch.io as a draft and download it on my phone

#

Or you can install Unity Remote 5, which streams the game to your phone so you can test it that way

#

@austere swallow

austere swallow
#

But streaming to your phone won't test the phone's ability to actually process the game

spice frigate
#

Then the first option i wrote

austere swallow
#

Tbh I've never heard of anything you wrote there 😂 I'll do some googling

spice frigate
austere swallow
#

Can someone on an iPhone go to that site and download games?

#

Or do they play them in-browser or something?

spice frigate
#

Iphones dont let installs from anywhere other than the app store as far as im aware. you will have to jailbreak your phone if you want to download from the web

austere swallow
#

oof so that's what it comes down to xD

#

I'm not sure how apple expects their devs to test on an iOS device when they limit so much like that

#

Is there some sort of "dev view" where you stick something on the app store but it's only available to your Apple ID? 🤔

twilit niche
#

yes thank you i get it

robust hamlet
#

@austere swallow No need to upload an apk to some website or jailbreak your iphone

#

Build your game using Unity and directly install it from there for Android

#

And for iOS you will have to build the game as xcode project and than install it on your iphone using xcode

#

It's faster than uploading somewhere and downloading again on your phone

austere swallow
#

I don't have an android device lol

#

xcode 🤔

#

thanks for the tidbit, I'll look into that in the future

robust hamlet
#

What OS are you going to develop the game for? @austere swallow ?

gentle magnet
hazy kiln
#
AndroidJavaClass intentClass = new AndroidJavaClass("android.content.Intend");

Guys, Why are we passing android.content.Intent as a parameter in constructor

#

Anybody know?

austere swallow
#

@robust hamlet oh you know what I saw this question yesterday and my phone was almost dead so I forgot about it. What exactly do you mean by OS? I’d like to get it on the Apple App Store and Google Play, so I guess Android + iOS?

robust hamlet
#

Ok, so for iOS Unity can only generate Xcode project and for Android you can directly build an apk file or Android Studio Project

spice frigate
#

Plus iOS is $99 a year whereas Google play is $25 one time payment

austere swallow
#

Didn't know iOS was yearly. I'll look into that when that day comes :p

#

Again, I have an apple device so if I wanted to play my own game (which I very well may!) then I'd need to get it on iOS lol

#

And on the topic of mobile development and the way you build the game for different devices, is there any sort of OpenVR-like API for me to work with in Unity that would basically allow me to write code one time and would automatically translate the code I have that doesn't work across both types of devices into the necessary code to work on both devices?

#

Like, OpenVR allows me to write my code once using a set of abstracted input classes derived from OpenVR itself, then the code behind that API basically creates those input classes out of the different VR Devices based off of what it detects you're using

#

So I only need to program my game for one type of input, which OpenVR then automatically maps to the different possible devices a person may be using

#

Is there anything like that for mobile devices too?

#

OpenMobile? 🤔

frail seal
#

Anyone know how to use gyroscope in a way that once the device has tilted 90 degrees it will then do something. In other words using an "if statement" if (phone tilts 90 degrees on x axis)

robust hamlet
#

@austere swallow that's the whole point of using Unity, you write one code which runs on different devices

spice frigate
#

Keyword: Hybrid native

austere swallow
#

@robust hamlet o u right lol

normal heart
#

Hi, does anyone here tried using BuildPipeline.GetBuildTargetGroup( BuildTarget.iOS ) to get the BuildTargetGroup of iOS?

#

it seems like it will return BuildTargetGroup.iPhone now, which is obsolete and I can't set the define symbol with this BuildTargetGroup

#

It would be great if anyone can tell me the correct way to get the BuildTargetGroup 🙂 thanks!

#

oh and I am using Unity 2019.2.0f1 🙂

pine basin
#

Hi - getting this error when sending an intent to unity3d
"Permission Denial: starting Intent"

#

anyone know what permission i need to set in the manifest to fix this?

true hearth
#

hello , if we are talking about android , is OnApplicationPause or OnApplicationQuit ? (Saving and Loading)

hazy kiln
#

Guys, Do I need to have a payed developer account to get monetized from the google playstore

hazy kiln
#

Guys I'm going to upload my first unity game to playstore. So do I need to integrate Google play sevices and Google mobile ads unity plugin to upload my game?

manic coyote
#

@true hearth Quit?

#

@hazy kiln you have to pay for an account to upload your products to store

#

And you dont have to include those services if im not wrong

hazy kiln
#

@manic coyote Then how can I monetize from my game if I out that in Play store

manic coyote
#

Oh if you wanna monetize your game then you would need ads

hazy kiln
#

okay

velvet hare
#

@hazy kiln Use admobs for inserting ads in your game to monetize it, also you need to pay a fee to upload to playstore (I think its a one time of 25$)

hazy kiln
#

@velvet hare , If we are publishing our game as free version , then ads are the only way of monetizing right?

pine basin
#

or selling items

hazy kiln
#

Okay

scarlet moon
#

hello I have a question, I built a webgl platform build and put it on simmer.io, resizing the iframe seems to keep it locked in a 16:9 resolution, is this from the build settings in unity or from simmer.io? is there a button somewhere in Unity that I can press for dynamic resolution?

velvet hare
#

@hazy kiln essentially yes, there is some payout I think over a lot of downloads, like 100 downloads is 1 cent, not sure, but it's really really low

astral hinge
#

Hey everyone, so I'm currently trying to add touch behavior, so when a user swipe up down left or right on an object, call a specific method.

Any idea where to get started?

Everything I find is pretty old and whatever is used is no longer in Unity documentation.

low whale
#

looks wank

spice frigate
#

I wouldnt install an APK like that. put it on google play for alpha testing and im sure you'll get testers

#

That looks Suspicious

hazy kiln
#

Okay,@velvet hare

limber parcel
#

Hey, I'm doing a native iOS and Android integration with unity, using the unity as a library from 2019.3. The app is going to have localization so I need to pass language setting between native and unity module. To avoid writing bridge script and passing language parameter each time the native/unity module switches, is it possible to use player prefs for that?

#

Like, if I change the language from the native side, it will save the setting to shared prefs / ns user defaults

#

And if I change the language from the unity side, it will save to player prefs

#

And is actually player prefs == shared prefs == ns user defaults?

#

Can native modules read/write to the same file that player prefs from unity save to?

uncut lark
#

should i use x2 or x4 antialiasing?

spice frigate
#

Why are unitys canvas system so unreliable

formal elk
#

Unity's canvas system is very reliable and it gives powerful configuration options. If something is rendering wrong here it is most possibly bad canvaas configuration and incorrect object placement

robust hamlet
#

probably you are doing something wrong and that's why it's not working as it should be

finite storm
#

What's not working?

#

@spice frigate you talking about the scale of the canvas on different device screens?

#

If so you can add a canvas scale component in the root canvas.

chrome haven
#

Hi, how can add ads in game (magazin play)

#

?

robust hamlet
#

@chrome haven by reading how to do it

#

Choose which ad provider you will use and integrate it's SDK and that's all

finite storm
#

@chrome haven right click> add new window> services tab>follow the instructions for add

merry acorn
#

Hi all, I am experiencing slow game loading time, when i start the game on my laptop with unity editor everything is good and the game load instantly since i have quite strong laptop but once i build the app and install it on my Android phone the loading time is approximately 10-14 seconds, I tried to disable all my code that runs on Awake and on Start or Update and the loading time is still the same. What would be the best way to track/debug the problem for this kind of thing?

pine basin
#

put development build on the phone, then usb debug and attach the unity profiler to it ?

merry acorn
#

got it, didn't know i can attach that, thanks 🙂 will look it up!

spice frigate
#

What does this mean?

robust hamlet
#

@spice frigate which part is unclear for you?

spice frigate
#

I think I understand now

#

Requests is how many time the ads button has been pressed, and impressions is how many actual ads has been viewed by players

robust hamlet
#

Not really

#

'Ad request
The game client makes an ad request to the Unity Ads network during SDK initialization. If an ad is available, the ad caches and the server tallies a received request. When a player views the cached ad, the game client sends a new request.'

#

'Impressions (see also, Ad start)
Impressions indicate the number of times an ad is fetched from the server, and tally every time a video begins playing. Impressions earn revenue, however, the quality of impressions vary (see section on interpreting the data, below).'

#

Unity Ads has pretty good documentation and explains everything, you should better check it first before asking a question

glossy sluice
last herald
#

Hi, calling GetPixels is crashing my game on Android.
I’ve been trying to debug this for at least a week, so I’ve gone through a lot of different methods to improve things, including visiting an empty scene to Resources.UnloadUsed as well as explicitly destroying Texture2D objects, calling System.GC(), waiting for GC to make up its mind, and so on.

I am forced to merge many textures together in order for this game to work. I cannot change this because it is a port of a Flash game (and Flash didn’t crash all the time when you tried to merge textures) we cannot redesign the game we’re trying to update and bring back to the store.

Are there outstanding issues with Texture2D? Is there a way I can allocate the arrays for Texture2D that won’t cause a crash? I’d appreciate any help - please bear in mind I have been back and forth with a number of devs for solutions. I’ve come here because I’ve completely ran out of options.

last herald
#

addendum: This morning I found out about System.GC.WaitForFinalizers. It seems to doing the job of clearing out the arrays that were allocated to make textures.
Still looking into other things I can do to partition memory, but I can load scenes without crashing now.

pine basin
#

Does that kick in between scene changes? or can it be ran at any time during a scene?

uncut lark
#

Is HDRP usable for mobile games?

spice frigate
#

I have ads on my game, and have 50 impressions but the ad revenue is $0.00. I would of thought id of got a few pence by now?

tame kettle
#

Hi! I have a problem with Unity and the Facebook SDK.
I've logged in to Facebook with my app and then I make an AppRequest - a native FB dialog pops up asking me to log in again.

#

Anybody have any insight to this?

formal elk
#

@spice frigate depends on the rates you have for eCPM

#

also most ad networks aggregate for such traffic especially because diff regions have diff eCPM

spice frigate
#

i saw on the forums that 1000 impressions net between $6-$12 so by now surely i should see atleast $0.50 right?

#

Im using the UnityAds SDK

formal elk
#

depends on the deals that you have with your ad provider. they can go as low as < 1$ and as high as 130$

#

and for example u can have 6$ for impresions in the US, and like 0.15$ for impressions in kazakhstan or sth.

spice frigate
#

so value per impression is based on region viewed>?

formal elk
#

yepp.

#

also per kind of game, audience in the game and the impressions/month

spice frigate
formal elk
#

and sometimes even per the ad that is being presented

spice frigate
#

theres only 30ish active installs currently, only just released

#

and i dont really know how to promote it other than paying for adverts in the AdMob network

formal elk
#

sometimes u need to wait for the data to show up, because of how it is constructed

#

don't worry too much before u'll achive like 500 impressions

spice frigate
#

I dont think thats likely 😛 app store is very oversaturated

formal elk
#

well. depends. the entire hyper casual thing is based solely on releasing semi-decent games stuffed with ads with UA costs lower than single ad impression

#

so companies run crazy UA on app stores for those users

#

I don't think any game works on organic traffic atm

#

(unless it alreeady has 1M+ downloads)

spice frigate
#

my game tags are ojnly 3 aswell, so i donmt think much traffic will come to it :

formal elk
#

there is significant evidence of tags having really low impact on ASO

#

so wouldn't count on that

spice frigate
#

ASO?

formal elk
#

appstore search optimization

#

basically what should your game name/subtitle/desc/tags be to be higher in the search results

spice frigate
#

So it doesnt matter all that much

#

So what is the best method to get more installs and more users

formal elk
#

user acquisition

#

facebook, appsflyer there is ton of options

spice frigate
#

ive posted to my twitter facebook instagram and relevent reddit pages

#

Does it also work alot on the art style of the game and Icon displayed on google play?

formal elk
#

no. I mean real user acquisition. like. u pay to a company like facebook, and for a certain price you get a guaranteed install of your game

#

icons and screenshots are only revelant for organic search/store browsing

#

so depends where you're focusing

#

so like user first needs to find your game, and only then screenshot and icon mattersa

spice frigate
#

I thought UA was just actual installs, or are you meaning the routes to go down to actually get UA

formal elk
#

you can actually do AB test stuff like icons or screenshots performance on GP store

#

I mean that you pay (for example) facebook $ to show ads for your game. you set the budget to like 50$ and you will pay like 0.1$/install and you will only pay if the user will actually install your game

spice frigate
#

Oh that sounds interesting

uncut lark
spice frigate
#

or does it only update per 1000 impressions

cerulean grail
#

Hey yall. When I build and run my game on android, some TextMeshPro objects's text does not update. The objects are connected to a script via a public reference and will initialize the text input in the inspector; however, will not change their contents when changed in a script. After some Googling, I have tried using SetText(), manually setting the text member, force mesh updating, and deactivating, setting the text member, then reactivating to no avail. What is unusual, is that I have other TextMeshPro objects in the scene similarly referenced and updated (from script) without issues. I have no idea why it isn't working.

#

For reference, it works fine in the editor. It will update everything properly. If I build and run then the problem will arise.

robust hamlet
#

@spice frigate it updates every day, from quite some time a few times a day. If there is no data that means there is no data. Your game has 10+ installs on Play Store, it's something pretty normal if you ask me.

last herald
#

Looks like I’m still in crisis mode - I thought I’d solved my memory management issues but all I’ve done is delay he inevitable crash:

Android is not garbage collecting.

I’m using 2019.2 but I have tried other Unity versions and they do the same thing. I am calling GC.Collect() to clear memory whilst waiting in an empty scene. On other platforms the memory is reclaimed.

ONLY on Android the memory usage increases. Sometimes it simply doubles. On windows or in the Editor the garbage collector works fine.

I’ve have been trying to fix this for over a week. I have read every memory management tutorial and everything I do simply delays when the game will crash. Can someone please tell me what is happening?

noble arch
#

@last herald did you try to use Profiler to check maybe there are some allocations you could avoid?

last herald
#

What use is checking my allocations when one specific platform refuses to manage them?

#

I’ve already been profiling the memory for days. I discovered a leak with Texture2D which I fixed. I then started getting an out-of-memory crash when I attempt to get an array with Texture2D.GetPixels32.

this does not mean the error is caused by Texture2D. It is caused by allocating memory.

On Android the memory is never released. On Windows the memory is released. If I avoid allocations then how will that help? It will simply crash at a later point.

In fact I already tried to reduce allocations. It crashed at a later point.

noble arch
#

maybe if you could post some example code showing the problem people might help or point to what may be failing
also on which Unity version are you @last herald ?

last herald
#

2019.2.4f1 - I’m building for console as well so jumping between versions costs me half a day fixing stuff.

#

The project is pretty large so I can’t post an isolated test case. I’m currently trying to reproduce the error on Android, but can’t find out what locks up garbage collection.

It is exceptionally hard for me to communicate any issues because I must wait 5 minutes with my computer unusable due to it compiling for Android. The issue only ever occurs on Android, not in the editor, not on Windows, not on iOS.

pine basin
#

Do you change scenes at all or is it all one scene when it crashes?

#

if you stay on one scene a lot, you could try calling Resources.UnloadUnusedAssets() - this has fixed crashes on an android app for me in the past @last herald

#

infact i used it to basically cure the same problem you are having

#

worked on windows but not on android and only happened when i was showing and deleting a lot of images over time

last herald
#

Already tried that.

#

I just now tried a build on iOS. It works perfectly, I’ve even got it showing my current memory usage, which resets every time I reload the scene.

Inbetween scenes I go to an empty scene.
I call Resources.UnloadUnusedAssets.
I call System.GC.Collect
I call System.GC.WaitForFinalizers
I wait ten frames.
I wait ten more frames around EVERY memory management method.
I make sure all static variables are null.

It still crashes only on Android. Smart allocation will not fix this, it only delays the crash.

#

I have tried several other builds of Unity. It still crashes.

#

I’m now going to spend what might be the next few weeks stripping down a project. I don’t know what else to do.

pine basin
#

try a different android device, might be specific to the model

last herald
#

Good point. Worth ruling out all of Android, or maybe just ARM7.

last herald
#

Okay this issue doesn’t occur on Android 9

#

I does occur on another Android 8.1 phone (we have a couple of Moto G5s in the office, one is my phone)

As an aside on memory management: A coworker came over to offer some advice on the subject. Then he looked at my code and saw how many systems I was already using to flush out the memory.
He laughed and said, I shouldn’t have to write code like that because it makes it unmaintainable.

noble arch
#

@last herald may also worth trying Incremental GC option

robust hamlet
#

@last herald As far as I understand it's causing OutOfMemoryError or?

last herald
#

@robust hamlet The phone crashes with a gsl out of memory error
@noble arch I’ve already tried incremental GC.

noble arch
#

@last herald are you on il2cpp or mono?

last herald
#

I tried compiling with both, same error

#

Managing the memory of my project is not the solution.
It is like slapping a band aid on a severed limb, it’s still going to bleed to death.

#

This is definitely a bug, it only happens on Android 8.1, no other platforms affected.

noble arch
#

Worth filling it then

last herald
#

When I have something to file. The project is 2gb. I still don’t know what the cause is.
The memory leaks when a scene is loaded, I’m beginning to suspect it’s something to do with ScriptableObject as I have several asset libraries split across the project that are normally unloaded.

I tried removing all sfx from the project and the memory leak went up slower. Still trying to create an isolated case. That’ll be my task today.

noble arch
#

@last herald also maybe a newer Unity (and thus android player) have this bug fixed?

last herald
#

tried that already. I spent most of my week installing new Unities

noble arch
#

That sucks

nocturne oak
#

Im getting this error, everytime I try to build for Quest/Go
CommandInvokationFailure: Gradle build failed.
Help!

robust hamlet
#

@last herald I would go with checking in detail what actually cause that issue in that Android version, probably some system stuff which are not working correctly on Android side and see if it's reported and etc. On Android (not really sure about Unity) you can't actually trigger garbage collector even if you call it. It may run, it may not , it really depends on 'his' mood

last herald
#

@robust hamlet Saying that you can’t trigger GC on Android is false, this problem exists only on 8.1. I can collect GC on Android 9. That means the GC not listening isn’t a generalised thing. I can also call GC on an empty project on Android 8.1 and I see an impact. I have read Stackoverflow posts saying that triggering the GC does nothing, these statements seem hyperbolic in the face of the evidence I have been gathering over the past week,

I don’t know where to look for reports of memory leaks on Android 8.1. Removing Unity from my investigation parameters does not narrow the search - instead it gives me hundreds of false positives.

spiral ledge
#

Hey everyone how do i change the Input.Getbuttondown.(Fire1) to to touch instead of mouse and keyboard i have a Handle set up for it just cant get it to work

spice frigate
#

Use a button maybe

sharp quiver
#

@spiral ledge A touch should register as a left mouse click by default

spiral ledge
#

Like when i build the game and touch the screen it works but i just want to be able to press the button and my touch is left mouse click

glossy sluice
#

Probably this is just a random and quite easy to fix bug but I'm currently building my first game and I have a bug which has been eating my soul for the past 7 hours.

After creating a character selection menu using PlayerPref (Which can be found here: https://pastebin.com/fQ5nYizw) the chosen character's (a car) controllers aren't working anymore. (RCC V3) It works when it is outside of the GameObject (which is using the character selection script) but not when it is inside.

What could be the problem?

sweet mason
#

Hi, I have a performance problem while dragging an object on the screen by finger, on 2D game for Android. The object I'm moving is just a small sprite 16x16 pixels in world space. The app sets transform.position on OnMouseDrag() events. In general it works but I have concerns regarding the performance. I don't mean frame drops but some lag between finger touch and the rectangle which is following the finger with a distance - rectangle is not always exactly below the finger, but has some distance depending on speed of movement. Please see this effect on video: https://youtu.be/AAY7sigJt24. App running on Samsung Galaxy S8. I tried lots of different things to improve this - update movement in FixedUpdate() insetad of OnMouseDrag(), use rigid Rigidbody2D.MovePosition() instead of transform.position, Forward and Legacy Vertex Lit rendering paths, using IPointerDownHandler, IDragHandler instead of OnMouseDrag(), move on Canvas instead of world space, move camera (using ProCamera2D) instead of moving object itself, but nothing helps - the lag is still the same. Here is the whole code: https://gist.github.com/kbogucki/72d3e3abebb587fe7678ee7a06eb0108. I can share the example app if you want to try it out. Do you know if there is some other way to do such movement with better performance? Thanks in advance for any help.

dusky harness
#

There is a problem that keeps happening when I try to put something on mobile. It say my cursor texture is invalid? I have been looking in the textures and can’t find anything about a cursor

spice frigate
#

on mobile you dont have a cursor, unless you're making one? @dusky harness

dusky harness
#

I am making something to put on mobile @spice frigate

spice frigate
#

Yes

#

Im gonna need more context

dusky harness
#

I just got done making my game and setting everything up to get it on the iOS App Store, but when I had finished with building it I was told there was an invalid texture for cursor but I could find no reference to a cursor anywhere. @spice frigate

spice frigate
#

its in player settings

#

and i hope you know ios is quite difficult to get an app published

#

Not to mention expensive

#

@dusky harness

dusky harness
#

I know

#

Thank you

robust hamlet
#

@sweet mason It's not something with your code, it's a general problem with mobile devices at all. That's normal to have some delay when moving your finger faster

sweet mason
#

@robust hamlet Thank you for your response. Anyway I'm wondering how this is implemented in other games available in Google Play, since there are some games without such issue. Maybe this problem is Unity specific?

robust hamlet
#

Mostly it's display responsiveness, but keep in mind the implementation in Unity is tied to your game's fps

#

If it runs on 30 fps let's say, your 'dragging' will be 'lagging' because you have 30 frames per second to calculate the movement and etc

#

More fps, more smoother movements. Another thing to keep in mind that Unity by default set the fps on mobile devices to 30

sweet mason
#

I will check it, thanks.

viscid shell
#

Hey, am I able to change needed version of NDK?

#

i've downloaded like 3 zips with ndk

#

and all of them are wrong 😠