#📱┃mobile

1 messages · Page 32 of 1

iron acorn
#

Time.time should be changing properly

#

aaah

#

no

#

The time at the beginning of this frame

#

then system time

ruby robin
#

hmm what about Time.realtimeSinceStartup

#

but I wonder if it gets updated during a frame

final lava
#

using processinTimePerFrame with the value of 1 second actually is much slower

#

( ~ 8 seconds compared to if i remove the yield inside the loop altogether - it runs under 1 second )

iron acorn
#

because then you wait a whole second

final lava
#

the smaller processinTimePerFrame the longer i wait

iron acorn
#

should also probably set it before you start the loop

#

Add this before you start the loop:

nextYieldTime = Time.time + processinTimePerFrame;
#

but then again, it wouldn't yield at all

#

we can use DateTime

final lava
#

it doesn't yield once

#

used ur snipper with absolute time

#
var nextYieldTime = Time.realtimeSinceStartup + processinTimePerFrame;

while ( Q.Count > 0 ) 
{
    if( Time.realtimeSinceStartup >= nextYieldTime )
    {
        yield return null;
        nextYieldTime = Time.realtimeSinceStartup + processinTimePerFrame;

        Debug.Log( iterations );
        iterations = 0;
    }
}
#

ill try DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond *

iron acorn
#
        public float processinTimePerFrame = 0.01f;

        ///before the loop
        float nextYieldTime = DateTime.Now.Millisecond + processinTimePerFrame;

        /// in the end of the while loop
        if (DateTime.Now.Millisecond >= nextYieldTime )
        {
            yield return null;
            nextYieldTime = DateTime.Now.Millisecond + processinTimePerFrame;
        }
#

try that

ruby robin
#
    int maxMillisecondsPerFrame = 23;
    System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();

    private IEnumerator Bla()
    {
        stopwatch.Start();
        if(stopwatch.Elapsed.TotalMilliseconds >= maxMillisecondsPerFrame)
        {
            yield return null;
            stopwatch.Reset();
        }

        stopwatch.Stop();
    }
#

not sure if System.Diagnostics.Stopwatch is ok for mobile tho 😄

iron acorn
#

btw, you can make it even faster by making it into several jobs.

#

a compute shader will be even faster, although I'm not sure if it's available on mobile.

#

Some changes to display progress per frame to the user in real time:

        public float processingMillisecondsPerFrame = 10f;

        ///before the loop
        float nextYieldTime = DateTime.Now.Millisecond + processinTimePerFrame;

        /// in the end of the while loop
        if (DateTime.Now.Millisecond >= nextYieldTime )
        {
            newTexture.SetPixels(newColorsArray, 0);
            newTexture.Apply();
            yield return null;
            nextYieldTime = DateTime.Now.Millisecond + processinTimePerFrame;
        }
final lava
#

DateTime.Now.Millisecond - doesn't work

iron acorn
#

@final lava eeeh, why?

final lava
#

idk

iron acorn
#

Ah I get it!

#

the value was too small

#

it should be in ms, so set it to 10, as I did in the code above.

final lava
#
float GetMS () => System.DateTime.Now.Millisecond / 1000f;

var nextYieldTime = GetMS() + processinTimePerFrame;

while ( Q.Count > 0 ) 
{
    float ms = GetMS();

    if( ms >= nextYieldTime )
    {
        yield return null;
        nextYieldTime = ms + processinTimePerFrame;

        Debug.Log( iterations );
        iterations = 0;
    }
#

that's what i have tried

#

brb

iron acorn
#

hmmm

#

You should probably get the time again after yielding, because now you're passing the value from the previous frame.

#
float GetMS () => System.DateTime.Now.Millisecond / 1000f;

var nextYieldTime = GetMS() + processinTimePerFrame;

while ( Q.Count > 0 ) 
{
    float ms = GetMS();

    if( ms >= nextYieldTime )
    {
        yield return null;
        ms = GetMS();
        nextYieldTime = ms + processinTimePerFrame;

        Debug.Log( iterations );
        iterations = 0;
    }
ruby robin
#

here's another attempt :)

    System.Threading.Tasks.Task.Run(() =>
    {
        long result = 0;
        while(result++ < 100000000)
        {
            // heavy stuff
        }

        Debug.Log(result);
    });
final lava
#

are threads safe for mobile tho ?

ruby robin
#

no idea

iron acorn
#

Did you try with my latest fix?

final lava
#

( Date time miliseconds didn't work , stopwatch worked only for the first iteration then stopped working )

#

ye

iron acorn
#

Weird. Should be working...

final lava
#

ill debug run it

#

maybe the values dont change after all

iron acorn
#

Should be. It's a system thingy. It runs separately from unity...

#

Although...

#

Nah, should be changing.

final lava
#

so while i debug it seems to change

#

ah lol....

#

the delay of me pressings the button is what propagates the time ( even tho its the debugger , DateTime is System Time )

iron acorn
#

? Oo

final lava
#

i put a debug break point inside the loop

#

so each time it stops , the DateTime keeps on going forward xD

iron acorn
#

Lol. Just leave a Debug.Log

final lava
#

heh...

#

ok see u in 10 minutes

ruby robin
#

make it log every 100 or 1000 iterations 😄

final lava
#

hhh yea lol ill do that

iron acorn
#

That's an option, but that wouldn't be optimal, as you have different processing power on different devices.

final lava
#

so those are milliseconds without the seconds

#

what a twist

#

System.DateTime.Now.Millisecond / 1000f

iron acorn
#

Without the seconds?

final lava
#

each 5 k iterations i log the GetMS() value

#

so the DateTime returns the milliseconds part without the rest

iron acorn
#

Ah

final lava
#

Seconds returns just the seconds , hours just that , etc

iron acorn
#

Aaah

#

Yeah, now I remember.

#

Indeed that's how it was supposed to work.

final lava
#

it gets tricky if we use it for an accumulator since there is the turning point at 1 to 0

iron acorn
#

I think so.

#

Perhaps a stopwatch would be an easier solution indeed.

#

Yeah, I'm reading into the DateTime docs and I feel more and more that it's pain in the ass to use it...

#

Or using Ticks

final lava
#

DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond ?

iron acorn
#

Yeah

final lava
#

it seems to be always 10 000

#

for the TicksPerMillisecond

#

system independent

iron acorn
#

hmm?

#

what is 10000?

#

TicksPerMillisecond == 10 000?

#

yeah makes sense, as there are 10 000 000 ticks in 1 second

final lava
#

how is it a thing ?

#

what is a tick anyway

iron acorn
#

it's just a way time is measured in c# apparently

final lava
#

okey

iron acorn
#
A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond, or 10 million ticks in a second.
final lava
#

that's a lot of ticks

iron acorn
#
The value of this property represents the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001 in the Gregorian calendar, which represents MinValue. It does not include the number of ticks that are attributable to leap seconds. If the DateTime object has its Kind property set to Local, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the local time as specified by the current time zone setting. If the DateTime object has its Kind property set to Utc, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the Coordinated Universal Time. If the DateTime object has its Kind property set to Unspecified, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the unknown time zone.
final lava
#

i see

#

well removing the yield's sped it up 100 times fold so its already an improvement

#

right now its tolerable 1 ~ 2 seconds max

#

hopefully it will not die once i try and parse the raster data to vector path

#

🤞

iron acorn
#

Did you not manage to make it run over several frames?

final lava
#

yea with the stopwatch it did the trick

#
if(stopwatch.Elapsed.TotalMilliseconds >= maxMillisecondsPerFrame)
{
    yield return null;
    stopwatch.Stop( );
    stopwatch.Reset( );
    stopwatch.Start();
}
ruby robin
#

oh so this is what I forgot

iron acorn
#

try adding this before the yield to have visual feedback of the progress:

newTexture.SetPixels(newColorsArray, 0);
newTexture.Apply();
#

I wonder how it would look like

final lava
#

🤔 that could be neat

#

ill upload a gif if i get my post-coroutine mess working together with texture apply

iron acorn
#

👍

final lava
#

can a sprite texture be directly manipulated ?

#

post creation

iron acorn
#

I think so.

final lava
#

excellent

iron acorn
#

for speed, perhaps you could use CopyTexture instead of Apply...

#

ah, but it still needs a texture, so nvm

final lava
#

lol , i understand shader is my only hope for maximum speed

iron acorn
#

yeah

final lava
#

hopefully i can get away with partial murder here

iron acorn
#

or multithreading

final lava
#

that is intriguing

#

doubt ill have the time to use more then 1 core for the task at the same time

iron acorn
#

why not?

final lava
#

( afaik regular threads run on 1 core only )

iron acorn
#

you could use jobs to run on multiple cores

final lava
#

and i know nothing about multithreading so it will take me longer to learn about it then its worth for the problem at hand

iron acorn
#

true that

#

Also, I'm pretty sure there are more viable algorithms for flood filling that would run fast even on 1 thread.

#

ms paint somehow manages to do it.

final lava
#

lol

#

boundary fill should be faster

#

didn't try it yet ( nor i know how it works )

#

flood fill was just too ez to implement so i started with it

iron acorn
#

anyways, there's space for improvement.

final lava
#

always

iron acorn
#

nice

final lava
#

maxMillisecondsPerFrame = 10

iron acorn
#

on mobile you can probably bump it to 20

#

since the default frame time is 33 ms I think

#

if vsync is on

final lava
#

🙂 i could bump it to 50 and show a loading dialog

iron acorn
#

yeah

#

still losing to ms paint though 😜

final lava
#

how can it be so fast ?

iron acorn
#

different algorithm most likely

final lava
#

i might try this one

iron acorn
#

you can split your algorithm into pieces and profile to see what makes the biggest impact too

final lava
#

ah yes , the profiling

iron acorn
#

creating new structs for directions might have some impact

#

considering how many times you do it

final lava
#

3 per loop

#

i could reduce it to 2 per loop

iron acorn
#

you could also avoid that with recursion for example.

final lava
#

does Enqueue ( struct ) takes a reference ? so if i change the value after it will not impact the already enqueued value ?

#

recursion was the first thing i tried

#

stackoverflow error

iron acorn
#

hmmm

#

now you changed it to a color array, right?

#

can you upload the new code?

final lava
#

i didn't use the GetPixelS nor SetPixelS yet

iron acorn
#

oh really?

final lava
#

yea

iron acorn
#

try that. I'm pretty sure you'll get some performance out of it

#

perhaps even a lot

final lava
#

k right now im getting 6 ~ 7 k operations per 10 ms ( GetPixel & SetPixel )

final lava
#

using GetPixels32 and SetPixels32 im getting 9 ~ 10 k operations per 10 ms

final lava
#

independent fill regions will have symmetric bug / cut off area where it fails to fill

strong sluice
#

hi! I have a question about android audio

#

when i set the audio manager mode to MODE_IN_COMMUNICATION

#

the volume buttons change the voice volume, but unity still outputs to the media volume

#

is there any way to output to voice volume instead?

timber edge
#

anyone here use BranchIO for their app attribution platform?

grand adder
#

Hello
I there anyway to add PhysicsMaterial (friction) to a top down game?

#

I have spent the whole day trying to find an answer but there seems to be nothing for friction on a game

final lava
#

@grand adder add opposite force based on the current acceleration / or modify the velocity in real time while multiplying it by a scale factor less then 1 ( for example 0.985f )

final lava
#

anyone knows how to make VS debugger work on Android ?

floral palm
#

What does this error means?

ruby robin
#

it scales to the edges of the screen, if you want to use the safe area you can get information about it on the current device from Screen.safeArea

#

also there are plenty of solutions around the unity forum for that, in case you want to save some time

white radish
#

can u set custom android notification with the unity android notification package? And also is there anyway to stop the repeat alarms from grouping?

slender palm
#

Im just looking for documentation/video for 3d mobile joystick movement, thanks and if u can help I would rlly appreciate it.

open grove
#

Simple terrain fps drops from 60 to 20

#

When i look at standard flat unity terrain

#

How to fix that

hazy heart
#

editor runs super slow but my game runs smooth on mobile

#

any ideas what the problem could be?

hazy heart
#

oh apparently unity remote slows down my game to a crawl

sonic quiver
#

In the mobile player settings, I find these graphic settings. Does the order mean anything (I can change the order of em)

#

It seems Unity 2019 is implicitly not working with iOS10 (only tested on one project), if anyone experienced similar issues and solved it, please let me know, thanks!

objc[6058]: Class PLBuildVersion is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x123207cc0) and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x122bb76f0). One of the two will be used. Which one is undefined.
objc[6058]: Class VCWeakObjectHolder is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GameKitServices.framework/Frameworks/ViceroyTrace.framework/ViceroyTrace (0x11f836ca8) and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GameKitServices.framework/Frameworks/AVConference.framework/AVConference (0x11f768cd0). One of the two will be used. Which one is undefined.
2020-07-19 09:06:56.572 myApp[6058:352854] Error loading /(removed)/myApp.app/Frameworks/UnityFramework.framework/UnityFramework, 265): Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /(removed)/Build/Products/ReleaseForRunning-iphonesimulator/UnityFramework.framework/UnityFramework
  Reason: no suitable image found.  Did find:
    /usr/lib/swift/libswiftCore.dylib: mach-o, but not built for iOS simulator

sonic quiver
#

prob something to do with googles unity jar resolve, swift and cocoapods. i will try find a solution

sonic quiver
#

I got it working with the iOS10 simulator when I set "Always Embed Swift Standard Libraries" on the Unity-iPhone target.

Will see if it will work on the user's iOS10 device which reported the issue

#

Is there a quick way in xcode to test the simulator when I set my Target SDK in my player settings to Device SDK, or do I have to rebuild it using Unity with it set to Simulator SDK

sonic quiver
#

Okay I fixed it without the xCode stuff, the underlying issue was I was using a particular Unity asset that messed around with Swift. Sorry for the spam guys. I used an open-source alternative asset instead and it works seamlessly without requiring me to faff about with xcode build settings

wanton narwhal
#

Hello, do you guys have any recommendattions regarding performance optimization tools? I want to optimize performance for android (and iOS) but am not quite sure which assets to go with when it comes to mesh combination, mesh optimization (poly count reduction) and automatic LODs. I would greatly appreciate any advice 🙂

steel pecan
#

@glossy sluice Note: For Unity Remote to work, you need to have the Android SDK on your development machine.

#

nope android sdk

#

do you have enabled the developer mode and usb debiggung on your phone?

iron acorn
#

google

#

it depends on your device and android version

latent violet
#

@floral palm you solve your building issues?

floral palm
#

@latent violet yes I just change IL2CPP to mono

#

but i cant upload it to the playstore

#

because its in mono

latent violet
#

I was able to solve mine with the IL2CPP support

#

@floral palm i was told to update one of my package

#

It seems this error can occur when you have a old package in your project

floral palm
#

so, i have to update the sdk ndk and jdk?

latent violet
#

Not the SDK, Ndk and JDK

floral palm
#

ok

latent violet
#

So you have any package in your project?

#

Like Google mobile ads package, easy save, playmaker e.tc

floral palm
#

no

latent violet
#

Any package that you imported

floral palm
#

i only yace the basics

#

ndk jdk

#

hav*

#

have*

latent violet
#

@floral palm you downloaded from unity Hub.... Right?

floral palm
#

yes

#

no jdk i sowlanded frontal Oracle

#

dowlanded from**

#

sorry my keyboard is in spanish XD

sonic quiver
#

Hello, do you guys have any recommendattions regarding performance optimization tools? I want to optimize performance for android (and iOS) but am not quite sure which assets to go with when it comes to mesh combination, mesh optimization (poly count reduction) and automatic LODs. I would greatly appreciate any advice 🙂
@wanton narwhal I don't know about Android, but for iOS, here's a screenie. Also set the LightMap encoding to low, graphics quality to low, you can also optimise the size of the SFX (and you should use certain audio settings for SFX vs Background Music), Symlink Unity Libraries for faster build times (if you are exporting and using the xcode project in the same machine) and set the Compression method to LZ4HC.

#

I need to make a concise cheatsheet for this

wanton narwhal
#

@sonic quiver thank you so much! Many of these things I already applied to my project, but some are still missing and will hopefully help my game. I appreciate it!

sonic quiver
#

Just found this setting but I left it disabled. Also use TextMeshPro (you probably already do) and not unity text (imo Unity should implement a warning if not already saying TMPro should be used when Unity text component is added)

#

I'll watch more optimisation videos and tips before releasing my game in a few years

dusk nest
iron acorn
#

@dusk nest problems with package. Try updating the ui package.

dusk nest
#

@iron acorn thank you

latent violet
iron acorn
#

@latent violet what's in the console?

latent violet
iron acorn
#

@latent violet can you paste the whole error(the first one)?

eternal violet
#

ye i can barely read that

sharp anchor
#

i connected my android 9.0 tablet to my laptop
@glossy sluice i had an issue with unity remote 5 it turned out i had an error in my unsaved scripts and didnt see the error in the console which was weird.

#

@iron acorn
@latent violet check the NDK is its linked in Unity, and if its updated . in the preference settings

latent violet
#

@sharp anchor it's linked since i downloaded it from the Hub

#

Am on unity 2019.3.5f1

sharp anchor
#

and in the preferences is there any notice note?

latent violet
#

@sharp anchor no not really...... All the NDK, SDK and JDK are all checked

sharp anchor
#

@sharp anchor no not really...... All the NDK, SDK and JDK are all checked
@latent violet and no pop-up error window when your build is failed?

#

@sharp anchor no not really...... All the NDK, SDK and JDK are all checked
@latent violet even if checked unity will tell you if the NDK is the recommended one or not, so not even a notice on that?

#

also make sure your unity hub is updated atleast to v2.0.4

glossy sluice
#

Any mobile HYPER-CASUAL game dev here? Im offering publishing deals! I just got accepted into a mobile publishing company and now i work in that! PM me for more info!

latent violet
#

@sharp anchor am using the latest hub 2.3+ but I discovered that removing the strip engine code in building settings makes it build well

#

But the bad part is that un Enabling the strip engine code will result in big apk size

#

@glossy sluice do you guys test on Android too?

glossy sluice
#

@glossy sluice do you guys test on Android too?
@latent violet Yup!

latent violet
#

@glossy sluice 😀

#

Great

lean orbit
#

.

craggy night
#

Hi guys, not sure if this is the correct place to post, but I am having a problem with URP and android build. In the build, if I have checked "Opaque texture" in URP settings, all the UI is invisible. Anyone had this issue?

golden remnant
#

hi. has anyone got some tutorials about how to do in-game economy (a store where you can buy "skins" and rewarded apps witch gives different amount of coins every time you play it after the level is over)?

tribal spear
#

hi. can anyone help me with unity game app? it does not want to install on my phone

golden remnant
#

what do you mean about "unity game app"? @tribal spear

tribal spear
#

builded app from unity

#

by File -> bulid & run

eternal violet
#

what do u mean it does not want to install

#

waht errors do u get

tribal spear
#

it crash at end of instalation

golden remnant
#

so unity crashes when the build it's over?

eternal violet
#

it crashes.....

#

mmmmmm...

#

do u get any errors tho? i still dont know broo!

wary ruin
#

i need to make a joystick which controls rotation and position at the same time

uneven flame
#

can anyone give me tips (like which application i can download from the asset store) on how to create an app like Shimeji desktop application?

#

I want to create an app like it but on mobile

mild copper
#

@uneven flame you'd have to look into device/platform specific tools (Android Studio or Xcode) if that's even possible.

uneven flame
#

oh okay thank you @mild copper

mild copper
#

@uneven flame noprob, good luck 🙂

languid prism
#

A little late to the party but - if you're talking about just having that behavior inside your own app you can, but doing it over other apps or the homescreen is probably impossible on iOS because they wont let you draw over other apps etc. Android you probably want to look at building a screen overlay.

uneven flame
#

@languid prism Oh okay. Yeah i heard it is not possible on iOS since they do not have the option to allow to draw over other apps. However, for Andriod, do you think a screen overlay from Unity would be more efficient or should I look at Andriod Studio and understand their IDE and code through that like what dcwilson303 was suggesting?

#

from the top of my head and with the little knowledge of what I have about screen overlay in Unity, I just feel like it might not work well when trying to make a chibi do stuff outside my application/draw over other apps

#

but i could be wrong

#

because it might be possible to create a an icon that has a transparent background

#

and have it run around on a screen overlay

vague flame
#

Anyone got any good recommendations of assets/tutorials for NFC communication on Android? I actually did it a few years ago, but im guessing my stuff is out of date 🙂

little finch
#

How do you upload an application to mobile, do you have to contact google play or is there a way to do it privately?

vague flame
#

If its Android, you can sideload it. Look up "Unity Android sideload" on google, theres a fair few tutorials going around

#

If you want it on a private store, you can create a google play listing but keep it private. Or, build it out to an apk, then download it onto the phone, it can be installed by accessing the file through the android (for if you want to use a private webserver etc)

lime vessel
sour moat
#

Has anyone used Unity Remote5? The app has a horrible rating on the app store with a ton of people saying it installed malware that blasts you with ads

glass crater
#

I haven’t used it in a while but 1) I don’t recall there being any ads (that seems strange) and 2) I found the latency to be too much for it to be useful

olive wadi
#

@sour moat Same. I haven't seen any ads in the app, but there is a visible amount of lag and also, sometimes it messes up your UI resolutions. The way that you see the UI in Remote5 is different from what you see once you export it as APK and check it. So if you go about fixing all UI placements and size with reference to Remote5, you are in for a surprise 😄

sharp anchor
#

Has anyone used Unity Remote5? The app has a horrible rating on the app store with a ton of people saying it installed malware that blasts you with ads
@sour moat i use it to directly test and debug on my mobile screen. It is f i n e as i only care to test my screen touch event and remote 5 is only made for debugging and testing on your phone directly from the editor, Unity docs clearly say you will see low res graphic to have better performance while debugging.

#

you can read more about it here:

#

I did not face any ads

sour moat
#

Thank you all for you answers! Much appreciated!

fiery jetty
#

Hi guys

#

I need help

#

Unity remote 5 not working

#

I need to download android studio?

sharp anchor
#

hello

#

exactly at time 1:35 min

#

I need to download android studio?
@fiery jetty you only need Unity engine (build settings should be set to android or ios depends on your phone) ,then you install Unity remote 5 plug it in your laptop make sure you have "usb debugging on" and "file transfer" mode in your phone. open Unity remote 5 then go to Unity software edit > project settings > editor and set the option to your phone (android for example)...hit play, wait about 5 seconds and poof~ it should work

#

Unity remote 5 not working
@fiery jetty make sure your scripts are saved and you have no errors , unity will tell you if there's errors

sick ether
#

Hey guys, I implemented unity Ads correctly, but it seems like they never load. I built multiple times, built my stuff around it and stuff like this, so it should load. I don´t know why, does anyone have a clue?

#

And I also tried to setup Unity Remote, but it says "set up android SDK path", but I think I set it up correctly via a tutorial. Do I have to run an .exe or something?

uncut glen
#

Hello guys, anyone used new Input System for Android device? I need to track more than one position of fingers and i don't know how i should to do that

#

I want to make joysticks for my game, but i can't find any way to made it
EDIT: Oke, like i see on the internet, i can use position from PointerEventData

safe escarp
#

I have a problem, I have a volume slider, that works perfectly on pc, but doesnt work on mobile, any ideas what could be the reason for this

latent osprey
#

@safe escarp you can't programmatically set system volume on mobile devices, only the volume of individual sounds

sick ether
#

Hey guys, I implemented unity Ads correctly, but it seems like they never load. I built multiple times, built my stuff around it and stuff like this, so it should load. I don´t know why, does anyone have a clue?
And I also tried to setup Unity Remote, but it says "set up android SDK path", but I think I set it up correctly via a tutorial. Do I have to run an .exe or something?

safe escarp
#

thx @latent osprey

safe escarp
#

I also wanted to ask: Is it possible to adjust graphics settings with scripts via something like a dropdown menu on mobile?

warm adder
#

You can use QualitySettings.SetQualityLevel to change quality level

#

or change any specific setting, here you can see them

safe escarp
#

thx

polar leaf
#

Anyone know how to solve the issue of entering too many characters into input field crashes the app on mobile (Android/iOS)?
Character limit is set (the crash happens before it reaches the limit) and input handling is set to new package. It works fine in editor but crashes in builds.

charred herald
#

hi I have a Question Kindly Tag me while Answering I Want Touch Controls for movement crouch,prone and stand feature fps for android with touch controls anybody has made if yes pls help me

frail hornet
#

Hi everyone
What is the min Android Target API version in Unity 2018?

glossy sluice
#

I need help with my mobile game I'm trying to make the screen size fit all phone but in some phone the button are way lower or upper to the screen

#

The game is in 2D

eternal violet
#

@glossy sluice ye

#

phone screen sizes have different ratios

#

so you gotta set anchor two corners

#

on the screne

#

of the button

glossy sluice
#

Thanks but how do u do that sorry this the first game I make I'm all new to all this ;-;

eternal violet
#

im not gonna lie, i dont really know never did it myself but i know, or am pretty sure thats what u gotta do

#

just google it i guess

#

but the anchors

#

should be in the buttons transform

glossy sluice
#

Yea I found a video sait now is a tool :) thanks you so much

eternal violet
#

npp

glossy sluice
#

🤗

slow matrix
#

Hello to all. There is a question. The object is directed only in one direction, how to make it so that it can move in the opposite direction

uncut lark
#

Hello guys, i am using mesh combiner in order to optimize game for mobile. This reduced draw calls a lot, but baking lightmap is very wierd. Is this way to go?

little wolf
#

So I'm working with the Facebook SDK and as I work through it kind of seems like there's no way to share a screenshot taken from inside unity directly to Facebook from our app . Is that true ? At the moment ? or am I overlooking something ?

formal yacht
#

May I get some support for In-App purchases?

sharp tapir
#

Hello, does anyone know how you can change the light on a smartphone screen

fickle dust
#

Im trying to use unity remote on my galaxy s10 but it wont work/

sharp tapir
#

wait

#

look that

#

it will help you

shy kayak
#

Hi does anyone know if I can make a build for web and it will work in mobile (through browser)?

orchid wagon
#

@everyone

white radish
#

Hello guys I'm working on an app ivolving some AR content I'm having issues making the app bundle smaller it has 4 challenges as of now each challenge hhas 10scenes times 3 (3 players each one has defferent content showing on each scene) I tried grouping each challenge in one single scene but it didn't change much do you have any solution for big mobile apps for publishing, or is there a way you know I can use to make in app updates (like seen on PUBG)

#

I'm publishing in both iOS and android versions

tame mason
#

Yoooooooo! Wanted to pick some brains and see how and what fallback tools everyone uses for merge conflicts

dusk rock
#

I've got a problem with the Unity In-App SDK and refunding on Android. Got a game coming out for Play Pass and need to be able to revoke a purchase if it has been refunded. Is this even possible?

#

I've checked the GooglePlayStoreExtension.IsOwned bool, always returns true even if refunded. I've checked if the reciept gets cleared if refunded but it doesn't. I've revalidated the reciept and checked the GooglePurchaseState but it always checks as Purchased.

karmic grove
#

Can someone please help ? I need a code like the code on the picture for my Player but mobile, with swipes, it is a 2D Endless Runner.

sharp axle
#

anybody using DOTween? The first time its used in the screen the game lags, after that its ok

glossy sluice
#

Hey there,

I’m Unai, Business Manager from TapNation (Ice Cream Inc, Sneaker Art, Bubble Sort…), a hyper-casual mobile games company!

In TapNation, we publish games and make them profitable thanks to our expertise in user acquisition, monetization and game design.

Involvement, transparency and equity will always be our main focus while working with you!

PM me!

fickle dust
#

How do you Set-up Android SDK path to make Android remote work?

meager cosmos
wary ruin
#

there is a lag when i build for androidso how can ı optimize my project

iron acorn
#

Lag when you build? You mean it takes time to build? Well, it should, depending on your game size/complexity.

blissful geyser
#

I need some help. I'm new to unity, brand new, and I want to make a realistic first person shooter with gun selection, options, etc. Do any of you have tips or ideas? Thank you!

#

To clarify I'm building for Android

swift vapor
#

realistic? android?
yeah no. I don't think any phone can run that.

wary ruin
#

I need some help. I'm new to unity, brand new, and I want to make a realistic first person shooter with gun selection, options, etc. Do any of you have tips or ideas? Thank you!
@blissful geyser i spent a day to optimize my lowpoly shooter game so if you want to make realistic i'll say think that again

uncut lark
#

Hello guys, i have monetize game for guys that im working with, but i never done that before. My question is, should i use unitys service for that? In that case, is all money going on my Unity account? I also saw that people are using this asset: https://assetstore.unity.com/packages/add-ons/services/unity-monetization-66123

Get the Unity Monetization package from Unity Technologies and speed up your game development process. Find this & other Services options on the Unity Asset Store.

chrome haven
south apex
#

Hi. I'm looking for an URP compatible stylized nature pack or separate assets that are mobile friendly. I flipped page by page in the asset store and did only find packages that explicitly state that they are mobile but do not support URP or support URP but no info or untested on mobile. Any1 some hints?

upbeat knot
#

Hey... anyone knows how to get android sdk 10 working with unity?

lime vessel
#

Guys I was trying to add iaps but this appeared

#

how can I add the billing permission to my apk?

lime vessel
#

I investigated a bit and I have to add this line of code

#

but does someone knows in what part of the manifest file should I put it?

quartz relic
#

Tricky question here, I'm generating a 4k RG16 RenderTexture that I'd like to then compress into a 4k EAC_RG Texture2D, but I can't use Texture2D.ReadPixels as it doesn't work on more exotic TextureFormat's any ideas?

glossy sluice
#

I cant figure out how to make the game show up on unity remote 5

#

Ill send screenshots of my settings

#

I have usb debugging on my android phone and I have it connected with a usb cable

#

if you can help me please mention me

iron acorn
#

@glossy sluice you still have the problem?

twilit maple
#

playing in editor never works for me, i have to do build and run

#

it shows remote is connected but wont show in game view

pulsar elbow
#

Sorry for that noob question. In which programming language would you recommend me to write an 2D Android multiplayer card game? (In my experience - 4 Years of C# Programing and 2 years of Vue.JS & Node.JS)

uncut lark
#

Hello guys, i am trying to link my app with google services and i am struggling with package name. How can i find my package name*

eternal violet
#

@uncut lark

#

your package name example is: com.COMPANY.PRODUCTNAME

#

u can find out in project settings

#

player i think

uncut lark
#

@eternal violet oh, so that name is in Unity? Do i have to upload app first? I want to use it as test before i upload game

eternal violet
#

in unity

#

and no

uncut lark
#

Well, thank you so much. For some reason it was so hard for me to find this info on google

eternal violet
uncut lark
#

Thanks!!!

glossy sluice
#

@iron acorn yes

gusty dock
#

I uploaded my game to the Google Play Store and due to extended review times it took 5 days. Do you know the app is re-reviewed (and subject to the same waiting period) if an update to the app is published, or is it just for first-time new releases? Thanks.

#

OK, the developer console fiiinally says "processing" now, so I guess that kinda answers my question. For the longest time it just continued to say "published" but with no actual change in the Play Store.

warm adder
#

Yeah first time is usually long and updates are quicker 😉

elfin salmon
#

Hey, gaia made environment can run on mobile devices ?

ruby siren
#

yes

limber parcel
#

I'm trying to add something like a season pass access to my app. I want the season pass to last untill 1st of October each year. Can this be done via subscription? (so I can have auto-renewal) Or should it be a consumable, that's verified on the backend if it's valid?

high onyx
#

If you want it to expire on a set date, you have two options.

#
  1. Consumable, but this has cons of not being renewable.
#
  1. subscription but every year make a new subscriptionIAP that has the new name/etc based around it.
#

Assuming its related to a theme.

carmine pewter
#

Hi I created a Game , when I activate a Gameobject with 6 pannels with Layout Groups the game crash on Android. how can i fix it?

uncut lark
#

Hello guys, i have question about monetization. Where goes money that i will recieve from IAP and ads, Unity acc or google console?

robust hamlet
#

Google Play Store account, Unity only shows the amount

uncut lark
#

Great, thanks!

bleak shore
#

Hi guys! I have a question: Why when i upload an update on PlayStore, users needs to install all game files again + new files from update instead of new files ?

agile iron
#

Hey guys n gals, any of you experimented with Unity banner ads? I'm having a bit of trouble with them opening multiple browser instances when clicking on them and I'm not sure why...

timber ether
#

Hey guys i am building a apk for Android, and it will usually take up to 10 min, now i upgraded my project and it looks like it's stuck on this

How can i fix it?
@ me if you know

orchid wren
#

@meifyouknow

timber ether
#

So what exactly are you trying to do? @orchid wren

orchid wren
#

you said to @ me if you know

#

wat?

#

:P

crystal kayak
#

Hello, I have a problem with the aab size, to the point that it doesn't make any sense any more

#

Google Play complains that "Your App Bundle contains the following configurations where the initial install would exceed the maximum size of 150 MB: ARM64_V8A, ARMEABI_V7A"

#

but is like this *even with a test where the game consists solely on an empty scene

#

there are several bundles full of stuff and is understandable that the aab is quite big

#

but or Google is wrong with the error message, and the problem is in one the size of one of the bundles, or Unity is including the bundles by mistake in the initial installation, or I totally missunderstood something

#

any ideas of what can be going on here?

#

thanks in advance!

uncut lark
#

Hello guys, do you use ads from asset store or package manager? This is warning that i got while using from asset store:
Please consider upgrading to the Packman Distribution of the Unity Ads SDK. The Asset Store distribution will not longer be supported after Unity 2018.3

agile iron
#

Hello guys, do you use ads from asset store or package manager? This is warning that i got while using from asset store:
Please consider upgrading to the Packman Distribution of the Unity Ads SDK. The Asset Store distribution will not longer be supported after Unity 2018.3
@uncut lark What version of unity are you using?

uncut lark
#

@agile iron 2019.4 i switched to version from package manager and i dont have problem anymore

#

everything works

agile iron
#

Hey @uncut lark have you used unity banners?

uncut lark
#

No, guys that i am working for want only rewarded videos

agile iron
#

oh I see

#

Because Im having trouble with them

uncut lark
#

@agile iron Banner doesnt exist on Unity Dashboard as default, you have to make it. So did you done this part?

agile iron
#

It exists in my version

#

I'm using Unity 2019.4.2f1

#

And you have to use "using UnityEngine.Advertisements;"

uncut lark
agile iron
#

Yes I do

#

the banners do appear in the game

#

but if you leave the scene open, they seem to stack on top of each other, as if they spawned every 5 seconds or so, and if you click on the banner it opens 5 browser instances

#

its weird

uncut lark
#

Well, sorry. I dont know how banner works, never worked with them

agile iron
#

Oh okay

#

thank you for your time

uncut lark
#

Np, i am sad bcs i cant help 😦

agile iron
#

I'm sure I'll figure it out sooner or later hehe

uncut lark
#

Maybe you shouldnt spawn banner on every 5 second. You should find way to check if old banner expired and then show next banner

agile iron
#

Yeah that's true maybe shouldn't have coroutines with banners and stuff

#

I'll try another way

uncut lark
#

Yea, i saw that your reference is form 2017, maybe something changed meanwile

faint perch
#

Hi all, was curious how to best size a panel to fit the screen size for mobile?
Got a gameplay screen that should be in the middle and two menus that I want to have on the side that you can swipe to, but I am curious if there are any good tips for how to handle the scaling on that panel for the UI? I am assuming I will have to do this manually on startup somehow.

#

I know I could just have a UI to fit the screen size and then when I click a button I reveal it, but I am after something a little bit prettier.

mellow plover
#

Hey, I've been scrolling up for a while but I couldn't find any answers that fixed my problem. Basically, I can't get unity remote 5 to work on my android 9 phone. I've tried every solution I can find. My phone's got dev options enabled, usb debugging's on, I've tried unity's built in android sdk and android studio's one with google usb driver and I've got the unity remote device set to any android device. I've been trying for like an hour and nothing has worked!

agile iron
#

This is what I do for mine to work

#

I first open the unity project

#

then plug my android to the computer

#

then open unity remote 5

#

then press play on my project

#

and it works

mellow plover
#

I'll try that

agile iron
#

Oh and don't forget you need the android SDK

mellow plover
#

I tried doing that and it didnt work 😦

agile iron
#

The android SDK thing ?

mellow plover
#

both android sdk and what you said before

agile iron
#

Have you restarted your computer after doing the SDK?

mellow plover
#

bo

#

no

agile iron
#

Maybe try that

mellow plover
#

k

eternal violet
#

what problem u having?

#

sdk expert here

#

well not really but i have had many problems, so wahtchu got

#

@mellow plover

mellow plover
#

I'm not 100% sure myself

eternal violet
#

well how can i help then

#

atleast say wahts going on

#

any errors, whats happening

#

is it not building?

#

like i didnt read anything above

#

so can you sumamrize

mellow plover
#

So I cant get unity remote 5 working. I've tried using the sdk that comes with unity android build support and one from android studio as I've seen a lot of tuts use that. Still neither of them work and I haven't got any errors in console.

eternal violet
#

ok untiy remote 5

#

ok opoen up unity remote 5

#

on yo phone

mellow plover
#

ye?

eternal violet
#

and go to where it tells you

#

and then select optino of any android device

mellow plover
#

i did

#

its been on that setting the whole time

eternal violet
#

mhm. ok so havbe u tried doing it in this order: unity remote 5, then unity, then play

mellow plover
#

I'll try

eternal violet
#

ok

#

Whilst u doing that heres another q:

#
  1. Are u sure its the right cable, do u get a pop up saying like allow data something?
#
  1. did u make sure to do the developer mode thing on yo phone, like turn it on in settings
#
  1. whilst in the phone setting make sure usb debugging is on
mellow plover
#

2 and 3 yes

eternal violet
#

do u get any pop up at all? on yo phone

#

when u connect

#

to pc

mellow plover
#

1 my phone starts charging when i plug it in but no popup

eternal violet
#

then it probs isnt the right cable

#

theres 2 cables 1 for charging

#

seocnd for charging and data trasnfer thing

#

i dont know the names for them but ye

mellow plover
#

ill try other cables then

eternal violet
#

and even if u do, no way of knowing that one of those would allow transfer of data

#

like i also got a ton of cables

#

and i only have 1 taht allows transfer of data

mellow plover
#

ye idk which of my cables would work

eternal violet
#

ye, so try em all

#

and then if nothing works, then search online for cable with chargning and data transfer

#

and then buy it

#

whilst u waiting, just build it to yo phone

#

and u can use android log cat

#

to check for errors

#

which u can install as a package on unity

#

built int

#

in package

mellow plover
#

i understood nothing but ok

eternal violet
#

nothing at the last part?

#

about android log cat?

mellow plover
#

i have built it already tho

#

just to test

eternal violet
#

ye?

#

hmmm

#

can you build it with a chargning cable?

#

hold on

#

ehhhghhh

mellow plover
#

no i transfer it via google drive

eternal violet
#

Ohhhh!

#

smart

#

also ye i just realized ignore the android log cat part, tahts onlyt with the right cable same with the building, true

mellow plover
#

anyway ima go look for some cables lol

eternal violet
#

ye go boii

#

find em

#

catch em all

mellow plover
#

find those thin lines of copper surrounded in plastic or whatever

eternal violet
#

lol

agile iron
#

hey @eternal violet do you have experience with Unity AD Banners?

eternal violet
#

yes

agile iron
#

Could you please help me out with a little problem I'm having?

eternal violet
#

sure go ahead

agile iron
#

I posted the code here if you wanna take a look

eternal violet
#

hol up before anything

#

you arent using the default banner id right?

agile iron
#

What do you mean?

eternal violet
#

same with the video one

#

like when u make an app

#

project on unity dashboard

#

for ads

#

are u using the default oens in the monetization tab?

#

or you created new placement ads

agile iron
#

Mmmm I created a new placement but only for the banner

eternal violet
#

ooh bad, u gotta create em always

#

dont use defaults

agile iron
#

Oh yeah?

eternal violet
#

yeee!

agile iron
#

Why?

#

Are they buggy?

eternal violet
#

well they werent suppose to be used really, i dont know why the are there to begin with if not for use, but still

#

dont use em

agile iron
#

Oh I see

#

Okay but the banner isn't the default

eternal violet
#

okay

#

Oh also

#

i just rmemebered dont show the banner id whenever you post code

#

same with the game id

agile iron
#

yeah I deleted the ID

eternal violet
#

ok anyhow, so imma keep on lookign at yo code

agile iron
#

okay thank you

eternal violet
#

bro

#

do u ever wait

#

hmm

#

ye make sure

#

public bool testMode = false;

#

i mean true*

#

make sure like you give the test mode a bool value

#

and also u can change it after to false when publishing

#

also as you do that make sure it has this [SerilaiableField] public bool testMode = true;

#

Make sure all of those game ids, or ad ids have this [SerilaiableField] ITS very important that u do

#

(the spelling is wrong here, but u can correct it in yo Visual studio code)

#
        if(!Advertisement.isInitialized)
        {
            Advertisement.Initialize(googlePlay_ID, testMode);
        }
``` also i dont know the reason for this if statment? but if u dont got one, remove it
#
        Advertisement.AddListener(this);
``` then remove this, idk waht purpose this serves
agile iron
#

oh I dunno I just watched a youtube video and they had that in lol

#

I'm fairly new to Unity tbh

eternal violet
#

oh my GOD no broo noo!

#

no no dont use yt

#

use the documents

#

unity ad documents

#

would u want a very clean and workign example?

agile iron
#

yes please

eternal violet
#

ok

#
using System.CodeDom;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;

public class ADmanager : MonoBehaviour
{
   [seralizablefield] string gameId = "gameid";
   [seralizablefield] public string placementId = "bannerid";
   [seralizablefield] public bool testMode = true;

    void Start()
    {
        Advertisement.Initialize(gameId, testMode);
        StartCoroutine(ShowBannerWhenReady());
    }

    IEnumerator ShowBannerWhenReady()
    {
        while (!Advertisement.IsReady(placementId))
        {
            yield return new WaitForSeconds(0.5f);
        }
        Advertisement.Banner.SetPosition(BannerPosition.TOP_CENTER);
        Advertisement.Banner.Show(placementId);
    }
}
#

there u go

#

also the seralizable field part is wrongly spelt

#

but u can change that

#

also this is a banenr ad example and it has its initalization

#

Use this document for reference

#

it has for other stuff like interstital ad and rewarded

#

do not watch YTers

#

@agile iron

agile iron
#

Thank you, I'll try it later when I get home!

eternal violet
#

np

lime vessel
#

Hi guys, can someone pls give me feedback of my game?

gritty path
#

Hey if we build for iOS in windows laptop, so can it be exported and run?

quartz kernel
#

No, you need a mac to do the final build

eternal violet
#

@vale crown not the channel to promote ur app

glad acorn
primal arrow
#

Is it possible to use the Back button of Android device with the new Input System ? Can't seem to find it

glossy sluice
#

Hey there, i am currently working on a mobile game, i builded it again and suddenly the resolution is veeerryy low

#

It has always worked fine

agile iron
#

Is it possible to use the Back button of Android device with the new Input System ? Can't seem to find it
@primal arrow Yes but you probably shouldn't do that, many phones have the return button hidden and its just abnoxious for the user. I recommend you add GUI that goes back instead..

primal arrow
#

Okay thx

agile iron
#

No problem!

robust hamlet
#

I don't think that way, I would suggest to implement both ways, some users rely highly on hardware back button, not all have software buttons. Plus with the new gesture navigation in Android it's better to support both. That's what almost 90% of Unity games doesn't support, properly handling of the back button interactions

agile iron
#

I don't think that way, I would suggest to implement both ways, some users rely highly on hardware back button, not all have software buttons. Plus with the new gesture navigation in Android it's better to support both. That's what almost 90% of Unity games doesn't support, properly handling of the back button interactions
@robust hamlet I agree

glossy sluice
#

Hey there,

I’m Unai, Business Manager from TapNation (Ice Cream Inc, Sneaker Art, Bubble Sort…), a hyper-casual mobile games company!

In TapNation, we publish games and make them profitable thanks to our expertise in user acquisition, monetization and game design.

Involvement, transparency and equity will always be our main focus while working with you!

PM me!

agile iron
#

Hey does anyone know if I can track if an user click on certain button? Like have a statistic of that...? Thanks!

eternal violet
#

@agile iron

#

you can do that via

#

i think like public void buttonclick(button){}

#

i think if u set a void to a button it will have a parameter

#

of the butto nwhich triggered it i think

agile iron
#

Right but I want to get that information to for example google analytics or something

#

I don't mean track it in game, I mean track it globally

eternal violet
#

ye that gets complicated fast

#

i think ud have to create ur own server or something

#

or something server website

#

to store the data

#

globally

#

im not good with this tho, as i havent done it before

#

also

#

u dont have to ask that here, use some other channels which are far more popular and they suit ur q

agile iron
#

oh okay thx

vocal ridge
#

Can anyone recommend an easy to use, inexpensive touch control asset? Preferably one with swipe gestures.

eternal violet
#

i wish to make one of those kiond of assets

#

but its so flipping hard

#

to publish assets

#

u gotta put so much detail, and just alot of work, super challenging

#

to publish it

#

not make the asset

#

lol

vocal ridge
#

I looked at two and one still requires you do the write the swipe code or something? The other Idk it has the UI down, but the tutorial doesn't show how it all works. They are all focused on digital buttons. I just want a thing I can bind a function call or or event to a swipe movement.

glossy sluice
#

@agile iron Maybe with GAMEANALYTICS SDK you can do that

civic nebula
#

Hi everyone, new here. I'm mostly a web/fullstack developer who would like to develop a 3d mobile game using Unity as a hobby-project. Any suggestions for tutorials in that category? 🙂

thick rover
#

How to make touches ignore UI elements if they havent began on em?

verbal cove
#

Any1 know how to overlap UI main object by a child object from other object like

A
..B
C

And B overlap C 😐

#

@thick rover maybe set it in Ignore Raycast layer?
Or if its something like button un-check check-box for Raycast Target

ruby robin
#

you can add a canvas to C and make it be lower in the sort order than the parent cnavas

verbal cove
#

❤️ love ya

agile iron
glossy sluice
#

hi, currently i'm trying to get advertisements to show up but they aren't, in fact nothing from the ad manager script i have occurs

ruby robin
#

use pascal case for method names, start() should be Start()

violet bramble
#

Hey guys

#

I'm developing an android app, and I have a problem in inputfield. When the user is putting words in this field then click on Back button, all words written will be deleted. Is there any solution for that?

glossy sluice
#

does muting the audiolistener also mute ads?

eternal violet
#

@glossy sluice id imagine not

#

but go ahead try it out

#

set up a test ads

#

and check

glossy sluice
#

Hey there,

I’m Unai, Business Manager from TapNation (Ice Cream Inc, Sneaker Art, Bubble Sort…), a hyper-casual mobile games company!

In TapNation, we publish games and make them profitable thanks to our expertise in user acquisition, monetization and game design.

Involvement, transparency and equity will always be our main focus while working with you!

PM me!

quartz kernel
#

This is not a hiring platform. Use Unity connect for business connections

late sparrow
#

Hey guys anyone has ever build a save with google play ? I'm having trouble with debuging it

lethal plume
#

Hello. I'm new to basically coding. And I'm trying to create something but I'm curious as to how long it would take to actually be able to. I would prefer to discuss it in pm

sharp sierra
#

Hi. I'm having some big problems with my build to Android. This has only started to happen today and I don't know what the cause could be. When I play in Editor everything looks fine with the ship.

#

This is really worrying. I have no clue why this suddenly started happening. Has anyone ever seen this before?

odd arrow
#

try switching up shaders. It feels like parts receiving shadows maybe get culled.

sharp sierra
#

Ok, thanks I will try that.

#

Although it is an Unlit shader...

#

Same thing with both a URP Simple Lit and Lit shader

odd arrow
#

try different renderer settings, testing with unlit maybe to exclude shadows. Also might get more help in #archived-hdrp

sharp sierra
#

@odd arrow do you mean the Mesh Renderer component on the ship?

odd arrow
#

no URP renderer asset itself

#

lighting, cascade shadows settings if they are on etc.

sharp sierra
#

ok, main light has cast shadows, let me turn that off and see

odd arrow
#

For now just find out what's causing the problem, then ask in #archived-hdrp how to avoid it.

sharp sierra
#

ok turning off the cast shadows fixed it, let me try putting everything else back as it was

#

That looks good now. Thanks for the help @odd arrow 👍 👍

turbid drum
eternal violet
#

Btw, a reminder, when u do relase as production, it really makes no diff

#

coz like chances are no one will play it or see it

#

unless advertised

#

so keep that in mind, that u cna just release to production

crystal oasis
#

I don't experience any errors in the editor, however when I'm building for iOS 14 using xCode 12 I get errors that I don't typically get. Has anyone else experienced this issue? ( It builds successfully, but certain game features are broken. )

eternal violet
#

ye sometimes its weird, where features are broken when built but fine on pc

#

cant say much except trying to figure out stuff in the code

#

i dont think its to do with unity itself, but code

crystal oasis
#

It's also worth mentioning the same code ran fine on iOS 13 w no problems.

eternal violet
#

oh

#

ye idk man, u maybe would have to contact unity about this or something

#

Report it as a bug

#

and see if they can fix it

crystal oasis
#

Alright man thanks for the info.

eternal violet
#

also

#

doesnt unity

#

have this phone emulator

#

package?

#

maybe u can use it and test ur game

#

on all iphone devices

#

see how it goes

#

on the latest 2020 versions i think u can find it

#

of unity

#

@crystal oasis

crystal oasis
#

I'll give that a shot

eternal violet
#

no its not out of date becuase of an update

#

its probs something to do with the fact that theres no touch

#

at certain times

#

u gotta do if (input.touches >= 0) first of all

#

and inside that u do the if statment of its phase

verbal cove
#

But this worked properly month ago and i have "simple project" builded and it keep work but if build it now this doesnt work any more

eternal violet
#

idk

#

but i doubt it was because of an update

tropic atlas
#

uhm hii

#

help me to fix this code please

#

i doesnt rotate as i expected

#

i want it to rotate it 90 degrees

#

then every touch it shall increment by 90

#

@tropic atlas wow I didn't know this channel was dead.....
@jovial wolf i wish someone will help me out

warm adder
#

for starters I would try to do rotation only for one touch. instead of while I would do if(Input.touchCount > 0) { do some checking and rotate}

#

and then when it works, try to implement it for multiple touches

#

and what exactly do you mean by "it doesnt rotate as expected?"

quartz kernel
#

You shouldn't do a while loop inside Update. Update is already running in a loop

  • oops I thought the while condition was different
tropic atlas
#

here is my last saved code

#

i want to rotate it like this every

#

every touch the z axis increments by 90

#

i want to rotate it clockwise when i touch the half of the screen and anti clockwise on the other half

quartz kernel
#

So you press the left side with one finger and it rotates 90 degrees counter-clockwise and then stops?

#

And if you do the same with two fingers it rotates 180 degrees?

tropic atlas
#

two touch? yes

#

first touch 90 degrees
second touch 180 degrees
third touch 270 degrees
fourth touch 360 degrees

limber parcel
#

Hi! I need to fetch items data (name, date created, path) from specific album from devices gallery.

For Android - is it safe to assume that the album will be in DCIM for most manufacturers?
For iOS - how the hell do I access devices gallery, lol

dire knot
#

unity how rewarded ads limit work

rancid agate
#

Hey all. Anyone familiar with Rewired and touch controls? I'm trying to implement touch screen joysticks for my first person game. When I test the touch controls in Unity using mouse input they work exactly as expected. However when I test them on iOS they only respond to the first tap and the sticks don't move when I continue to hold down and try to move them around. Anyone got any sugggestions for where I should look to fix this? Touch buttons work just fine, suggesting that the taps are getting through.

verbal cove
#

Can someone help me understand what do i wrong in moving camera by touch and drag at screen?

Issue is shaking camera when touchMove is close to touchBegan and its possible to move camera only a bit from her position

Theres some code i did https://hastebin.com/nesanumufi.cs

light vector
#

I've been using Unity since late 2017 strictly for mobile. It seems that depending on the version of Unity, whether you use post processing/custom shaders, or use a specific mobile device, the results all change. Has anyone else experienced this? I have a samsung note 5 and s9+. Some differences/bugs have been: bloom sometimes works, sometimes it doesnt. Gamma color space sometimes works, sometimes it looks completely different than what it should look like on mobile, and sometimes it displays black on some devices and Unity builds when on others it doesn't. Sometimes I will run a graphically intensive game on my s9+ and then open another game, and it works fine. If i try the same thing on my note 5, it makes the second game lag BUT only if I run the graphically intensive game first. Otherwise the second game runs just fine. Sometimes shaders from shader graph work, other times theyre not affected by post processing

#

If anyone has had the same experiences or has any suggestions, I would love to hear about them

robust hamlet
#

@light vector I think that's pretty normal even if we don't want it to be. You have all kind of devices in Android, running their own implementation of the OS (some of them change lots of stuff in the core and etc), running different versions of Open GL, have different graphic cards and etc. Even Unity change it's own implementation of it's tools with every version so there is no way in my opinion to build a game which will run on all Android devices without any issues.

light vector
#

Makes sense, I wouldn't be so alarmed but I feel as if maybe I'm doing something because the changes are so substantial. Should I back away from post processing and/or shader graph since it seems that those two are causing the biggest issues? (Or should I say on URP, not on LWRP. Everything appears to work much better on LWRP)

#

@robust hamlet Also, are you currently working on anything in mobile using 2019.4 or later? Have you experienced any of these issues on mobile?

robust hamlet
#

I always try to stay with the latest Unity version actually, currently have mobile projects on 2019.4 and 2020.1.2 which don't seems to have any issues on device range which I am testing. I always use URP and never used shader graph on a production app. Had a few sample projects, but most of them didn't even compile on low end android devices which are lke 2-3 years old @light vector

light vector
#

Ah I see

#

@robust hamlet Do you use any post processing effects? I would love to use the newer versions as well if I can get it working

robust hamlet
#

I don't use post processing on mobile devices, which limits the range of devices your game will run without any performance issues

#

mostly trying to create the look and feel of the game using shaders and the textures

light vector
#

Do you write your own custom shaders then?

#

I will try and experiment without post processing. I did notice a dip in performance in some areas

robust hamlet
#

I am not a shader guy actually, I use mostly shaders from asset store or from github but definitely first I try the performance with and without using the particular shader and based on that decide if I am going to use it for the project

#

It really depends on your target devices and the project itself

#

In some cases you can experiment, based on the device your game will run, use simple shaders for the low end devices and more complex ones for the high end devices

light vector
#

I will keep this in mind and check out the asset store for shaders. I appreciate you sharing your experience and suggestions

#

lastly, have you released anything on the play store? Im curious to know how to deal with mobile devices that don't work

#

can you prevent some devices from downloading the game?

robust hamlet
#

Yep, you can exclude devices from downloading your game from the Play Console

#

If you open Play Console, go to You game's page -> Devices and versions -> Device Catalog -> select the device and click the arrow on the right (Details)

#

But that's not a good option in my opinion, better try to understand why your build is not working on that particular device

#

If you don't have access to that device maybe information about it;s hatrdware, open gl version and etc can help you discover the issue

light vector
#

That is good to know! Thank you for the info on that. Yea, I would prefer not to exclude any devices and I would love to know why these particular issues are coming up.

#

As far as hardware and opengl, I am still a beginner

#

I have resources on opengl but where would I find more information on Unity or mobile graphics stuff?

#

Ive poured over page after page and eventually came here since I have yet to find in depth tutorials/books on this particular topic

robust hamlet
#

There a few good books on that topic actually, but you will have to search for them, I don't really remember the names but I think you can find good tutorials on that. You can find lots of informaiton on learn.unity.com too for optimizing performance on mobile devices and etc

light vector
robust hamlet
light vector
#

Thank you! I will read this as well

tropic atlas
#

uhm hi does someone knows how to rotate an object 90 degrees and it adds 90 degrees every touch?

robust hamlet
#

@tropic atlas what have you tried so far?

tropic atlas
noble arch
#

@tropic atlas does the code require more fingers for each rotate?

tropic atlas
#

nope

#

just one touch per 90 degree rotate

noble arch
#

@tropic atlas I'd replace the while with if then

tropic atlas
#

i tried

#

still the same

hazy heart
#

if im using google admob in my app, what do i put in my privacy policy for IOS?

hexed epoch
#

Hey all any suggestions, tutorials, or assets you can recommend for how to make updatable clients? I'm about to take my android/quest game to friends and family alpha, and this is the last step before I get to show off.

robust hamlet
#

what so you mean exactly by updatable clients?

near lynx
glass crater
#

@near lynx Doesn't look like you need to use tapCount. The deltaPosition is in screen space so it'll vary between devices. The panel code I don't understand.

#

You're missing an item in that Vector3

near lynx
#

@glass crater I have 3 panels and I need to make a swipe between them

crystal oasis
#

I just got done making the UI for my game and it looks great on the resolution I've been testing on: 1125x2436. https://i.imgur.com/6jMr2kF.png I'm assuming things don't scale correctly due to the reference resolution that I chose. How could I go about making it so my UI scale correctly on portrait resolutions w/out having to redo my UI entirely?

eternal violet
#

send the inspector pic

#

of the gui

#

@crystal oasis

crystal oasis
eternal violet
#

ok so

#

at the anchors, for both top y and bottom y, put 1 instaed of 0

#

@crystal oasis

crystal oasis
#

Are you referring to the canvas? @eternal violet For I can’t edit the anchors on the Canvas.

eternal violet
#

no.

#

im refering to the GUIS

#

to the buttons....

#

anything

#

thats out of screen view

#

because it doesnt scale to screen

#

properly

sinful turtle
#

Anyone here who has successfully integrated a IAP subscription?
I want to add it for my app and followed the official unity tutorial and some youtube tutorials, however, they only really tackle one time purchases.
What I want to know is, what happens if the subscriptions runs out, how is the app able to know that and cancel whatever the subscription unlocked?

indigo sierra
#

Hi! I'm having an issue with this application I've made. It's an helper app for the solo mode of a well known Boardgame:
https://zoidbergforpresident.itch.io/7-wonders-duel-solo-mode-helper
Specifically with the android version. The thing is that it goes well but if I let the app on the side and come back to it I may find it unresponsive. I switch to the running tasks then back and I may find the app to restart. It doesn't seem to do it with the other helper app (same profile). What can it be?
Thanks in advance for any help. 😦

itch.io

In case you don't have a printer ready but an available tablet!

final lava
#

im getting "on Initialized failed - no product available " error on my IAP

#

tried few threads and stackoverflow posts but no luck so far

#

its targeting iOS

#

not sure what i got wrong

#

that's how its getting called

private void Start( )
{
    IAPManager.instance.InitializePurchasing();

    IAPManager.instance.OnReady += () => { 
            
        var sub = IAPManager.instance.GetSubscription();

        Debug.Log("Subscription status : " + sub );
    };
}
turbid bear
#

I'm making infinity dropping game using physics, is it better (safe) to just let player drop on Y axis (to -infinity) or should i lock players Y axis and move background and obstacles up?

halcyon hollow
#

unity remote 5 is not working

steel pecan
#

@turbid bear if the camera moves to faar away from the world origin 0,0,0 then stuff gets wonky , you can move the wholw scene back to the center if you get to faar down.

turbid bear
#

@steel pecan Hmm okay but what it too far down?? Like 1 million units or smaller, higher ?

dire knot
#

after i done with game in mobile do i need to wright where i got what asset information? in mobile?

#

i mean sounds and stuff

steel pecan
#

@turbid bear i would try 5.000 to 10.000 units

tropic atlas
#

unity remote 5 is not working
@halcyon hollow on the app description it said it only works on unity 5

halcyon hollow
#

what do you mean?

#

it works for older version of unity?

eternal violet
#

lol

#

Ping me if u still got da problem

fringe galleon
#

I use 3 different rewarded ad units in my game. In first one gives 200 gold, in the second one allowed him to double gold (3-4 or 5) when the episode was finished, and on the third one, an ad that allowed him to try special items (for character testing in this game). Since Admob was opened, I have a strange problem, although the c# files of all of them have different results, for example, when they watch an advertisement to test a character, they give 200 gold, x4 comes when the game is over, and 200 gold comes again. The 1st and 2nd commercials are in different 'empty objects' in the same scene and the 3rd is on a different scene. No matter how much I thought, I could not solve the reason.

Note: Sometimes the ads wont work as they should. Especially in the first ad watched.

eternal violet
#

Admob sucks.

fringe galleon
#

😩

eternal violet
#

use unity ad instead

fringe galleon
#

a great idea

#

all my work go away

eternal violet
#

Well... You can throw the trash out early, or leave it a burden to deal with in the future

#

Its gonna effect your revenue heavily

#

wahts the point of having ads if you gonna use admob, its that trash

#

Your work was gone to begin with, when you started using admob.

fringe galleon
#

You are right. I can not find anything to say, thank you for the information

eternal violet
#

as soon as you would have published the app

#

and people played it

#

admob would have disabled your ads

#

for dumb unkown reasons

#

so your revenue would be gone

#

It happened to me twice, so i stopped using it and used unity ads instead

#

unity ads is easy to integerate anyhow, so no time will be wasted as much as the admob

fringe galleon
#

thanks for this helpfull advices.I will keep in mind for next projects

eternal violet
#

you better keep in mind for every project u do from now on

#

only use unity ads

#

screw admob

lime vessel
#

Guys, can someone pls help me fix my swipe movement? it kind of works but when you move right sometimes it moves the player to the left https://hatebin.com/hjuuwnahwa

glass crater
#

@lime vessel you're comparing the deltaPosition with the position 😑 if (touch.phase == TouchPhase.Moved && touch.deltaPosition.x > touchPosition.x)

#

and I think you mean to modify the position by the deltaPosition, not the position transform.position += touchPosition * SwipeSpeed * Time.deltaTime;

#

You can simplify things a bit by doing something like transform.position += touch.deltaPosition * SwipeSpeed * Time.deltaTime;

#

And remove the ifs with touch.phase == TouchPhase.Moved

frank osprey
#

So this question is a bit more complex, but I have a mobile game that I use serialized binary save files for. On OnAppliacationPause(true) I save the data and when the game starts I load it. It saves to 3 different files and all works really well. EXCEPT, sometimes when I close the app and reopen it, the data is just... reset. As if there's no save files there. This is very rare and has only happened to me once out of the hundreds of times ive opened and closed the app, but I've had others who use it tell me they've had the same issue rarely before as well. Because I have no idea what causes this and it doesn't happen super often I haven't been able to see if the save files get deleted or something or if they just get messed up and so it makes new ones over the top of it, or what. The only thing I can think of is that the app closes too fast or something while its saving data so the files get messed up and it just makes new ones over the top of it on the next load, but its just kilobytes of data so I kind of doubt this theory. If anyone knows what causes this please let me know, it would be really nice to not have to worry about losing everything randomly one time when opening the app.

glass crater
#

How about saving after the player data changes? That way if the game crashes or has an issue that player data won't get lost.

#

As for the issue of player data not being there I haven't heard of that specifically - in general though I wouldn't trust using OnApplicationPause solely to save player data.

frank osprey
#

Ill try removing it from onapplicationpause and just adding saves in other parts I guess and see if that fixes the issue

glass crater
#

So the files still exist but their data is set to some defaults?

frank osprey
#

I believe so?

#

Again I dont really know it doesnt happen super often and I havent seen if the files get deleted or reset or what when it happens

glass crater
#

It'd be good to put some error checking and logging so when it does happen you can look at the logs to get some idea what could be going on.

#

Obviously dealing with player data is sensitive and you want to make sure that code is bullet proof so perhaps you could write some unit tests for that loading/saving code.

lime vessel
#

@glass crater I'm getting an error for putting transform.position += touch.deltaPosition * SwipeSpeed * Time.deltaTime; it says that I can't use the += for vector 2 and 3

glass crater
#

you could do transform.position += new Vector3(touch.deltaPosition.x, touch.deltaPosition.y, 0f) * SwipeSpeed * Time.deltaTime;

lime vessel
#

it worked, but it's choppy. Is there a way to make it smoother?

glass crater
#

Do you still have that code I wrote where instead of modifying transform.position with the touch it modifies targetPos variables and uses Vector3.MoveTowards() to smoothly move transform.position?

lime vessel
#

no

glass crater
#

something like targetPos += new Vector3(touch.deltaPosition.x, touch.deltaPosition.y, 0f) * SwipeSpeed; transform.position = Vector3.MoveTowards(transform.position, targetPos, smoothSpeed * Time.deltaTime);

lime vessel
#

so like this?

#

I checked the code you sent me before and there's also a lastTouchpos vector 3

glass crater
#

You'll want to move transform.position = Vector3.MoveTowards(transform.position, targetPos, smoothSpeed * Time.deltaTime); so it's outside the the if statement since you want it to fire even if there is no touch input

#

then give it a try, adjusting SwipeSpeed and smoothSpeed to see what values feel good

#

Actually you'll also need to adjust targetPos the other spots you're changing the position

lime vessel
#

should the smooth speed be the same as the swipe speed?

#

can I send you the project?

glass crater
#

swipe speed is a multiplier on the touch input. smooth speed is how quickly to move the position to the targetPos

#

I can assist you if something isn't working or confusing though I don't want to setup the project for you

lime vessel
#

Like it just doesn’t feel like a movement for a mobile game it feels kind of weird

glass crater
#

Can you be more specific?

lime vessel
#

it's still feels kind of choppy and I think that the smoothSpeed is not working because I tried it in 10 and then 10000 and it feels the same

glass crater
#

What about at 5 or 1?

#

If its still choppy the value is too high

#

touch.deltaPosition is based on the resolution of the screen so it's going to be a big value

#

Maybe it needs to be .1 - keep lowering it until you notice a difference

lime vessel
#

This is what I have so far https://hatebin.com/nyjkwdgkhz I added a line of code for it to not be able to move in the y axis and I changed the vector3 line of code back to the if Input.touchCount > 0 because I do want it to only move when the player touches the screen

sly palm
#

Hello everyone, I’m just wondering how am I able to hide my UI and have it only shown when I’m near the object such as Door, vehicles?

glass crater
#

You could use triggers or keep a list of said objects and do a distance check

sly palm
#

I see, do I need to use a monobehaviour for it?

glass crater
#

To get callbacks such as OnTriggerEnter/Exit yes. Same with the distance check if you're going to be referencing Unity objects transform.position

dire knot
#

any one made any mobile games which they have posted in app store?

lone heron
#

@dire knot I have, although I'm working on an update that'll improve it's overall feel and add new features.

uncut lark
#

Hello guys, i have one question. When player pay to remove ads what should i do with rewarded videos? Should i disable option for reworded videos? Or maybe is okay is okay for rewarded videos to stay even if player paid to remove ads?

eternal violet
#

@uncut lark

#

keep em obviously, id say

#

because rewarded ads they click on, because they know the consequences of that ye

warm adder
#

Well as a player I would feel it's unfair that I paid to remove ads and I still have to watch it

eternal violet
#

well, because those type of ads are only when the user wants to see em tho

#

if he wants to see it, then sure but watch ad

#

like he cna play the game free of ads

#

unless he does the rewarded stuff

#

i just think it would be kind of cheating, if they could get rewarded items for free ya know

#

it would kinda imbalance

#

the game

#

they can play without ads, or not if htey want to get rewarded stuff

uncut lark
#

Yea, on the one side feels unfair, but on others side actually feels okay because they will get items for that videos

eternal violet
#

ye

#

so keep rewarded ads

#

its users choice

#

whether he wants to watch or not

#

and keeps game balanced

#

as they could for free get items

uncut lark
#

It is balanced, they would a litle bit more coins

#

Thanks for advice, i will keep rewarded videos and maybe give them more coins if they pay to remove ads

eternal violet
#

btw

#

is that ur only ad?

#

in the game

uncut lark
#

No, i have normal ads and banner

eternal violet
#

oh ok ye then

#

they would pay to have those removed simply

uncut lark
#

Yep

#

I didnt know if maybe google will make problem

#

Maybe players can report app or something

#

if they feel cheated

eternal violet
#

mm......

#

try to find

#

games ... hmhmm

uncut lark
#

Yea, i should do research

eternal violet
#

ye

twilit sand
#

Any recommendation on the best way to approach portrait/landscape designs?

For example, I've been give the task to have these 2 distinct layouts when on portrait or landscape. So it's not just a matter of making proper use of constraints... It like completely changes. How would I go ahead and handle this situation?

marble jacinth
#

gidday. I'm trying to set up Unity for building to android. The project I have has already been built for Android in the past, but I'm getting non-specific build errors when I try to build.

#

is there a guide somewhere that goes through everything I might need? I've already got android studio and the SDK set up and the android unity components.

#

ah, found it in the detailed editor log

Burst requires the android NDK to be correctly installed (it can be installed via the unity installer add component) in order to build a standalone player for Android with ARMV7A_NEON32
The environment variable ANDROID_NDK_ROOT is undefined or empty, is the Android NDK correctly installed?```
#

I thought I'd installed it but I guess not.

eternal violet
#

u probs do have it installed

carmine wigeon
#

hey everyone I have a problem, I'm making a mobile game where I want the camera to rotate around a spaceship by sliding a finger across the screen. the problem, when I slide my finger it only rotates one way, whether I slide to the left or to the right it always rotates to the right. I have no clue what is wrong. anyone knows?

warm adder
#

it would be the best to show your code

carmine wigeon
#

do I just paste it here?

warm adder
#

you can post it here using three ` signs, or use website like pastebin

carmine wigeon
#
    {
        if (Input.touchCount > 0)
        {
            Touch touch = Input.GetTouch(0); 
            if (Input.GetTouch(0).phase == TouchPhase.Began)
            {
                firstpoint = touch.position;
            }
            if (Input.GetTouch(0).phase == TouchPhase.Moved)
            {
                secondpoint = touch.position;
                Vector3 rot = firstpoint - secondpoint;
                
                this.transform.Rotate(rot);
                
            }
        }
    }
#

srry Im not used to discord yet

#

@warm adder

#

Anyone knows?

carmine wigeon
#

already fixed

#

in case u wan to know

#

I was using Vector3 instead of Vector 2

queen sundial
#

guys, hello. regarding the new input unity system.
can you please help me to understand if it correctly works with multi touch?
i am trying to create binding for 2 fingers press / move, but it looks like i cannot do such binding via UI to track it.
should i just do like before this new input system in input manager? in Update method check the number of touches and do what i need?

violet yoke
#

Can you use a phone charger cord to hook up your phone to your computer to test mobile unity games, or do i need to get some sort of specialized cord?

#

@everyone

#

idk if that works

#

that would be so annoying lol

violet yoke
#

anyone?

quartz kernel
#

You should try googling questions like these before you ask here

#

What you're looking for is called Unity Remote and you can use a regular cable

eternal violet
#

no

#

u need a special kind of cable that can transfer data and can charge yo phone

#

u can notice one when u get the pop up on your phone of: "allow transfer of data"

#

or along thelines of that

light crane
#

yo have you guys had any crashes with Metal on iOS on 2019 LTS?

eternal violet
#

Tallyon u have an app store dev acc?

light crane
#

yea

eternal violet
#

so how does this work

#

you paid 99 dollars

#

to publish games..

#

but after a year if u dont pay 99 dollars, all ur games are taken out of the app store?

light crane
#

what do you mean

#

itunes connect dev account?

eternal violet
#

what d o umean

#

i mean like

#

the app store dev account

#

to publish games

#

on IOS

light crane
#

yea, when you stop paying all your apps are removed from sale

#

whoever got them can use them as far as i know, but no new people can download them

eternal violet
#

wow thats sahdy

#

shady

#

who on earth would pay 99 dollars a year

light crane
#

thats monopoly for you

eternal violet
#

welp

fast tree
#

I am looking to do a infinite scroll UI in my mobile game, I am not sure where to start. My game will have a list of 300+ items, this list could get to 500-600 in the later game. In my head the game would use the same 30 gameobjects that will swaps out data as the player scrolls. any suggestions?

latent osprey
#

@fast tree the Optimized Scroll View Adapter asset is pretty handy for this

#

it is the best one, although it is a little tricky to use

#

you should also familiarize yourself with UniRx and reactive collections

eternal violet
#

i think i could tell u why on android, but on ios idk if unity is same