#📱┃mobile

1 messages · Page 27 of 1

latent osprey
#

you gotta do what it says there

slim nexus
#

Guys im into mobile developement i dont know why but it seems like my games are always laggy and slow

hybrid hill
#

You have to set the target frame rate to 6p

#

60*

#

It defaults to 30, and doesnt change unless you manually set it in a script

river fulcrum
#

Hi! i'm developing a mobile game, and currently i'm quite stuck in figuring how to hide the in app purchase button after the user chosen the buy button. My app uses auto renewal subscription.
I've stuck with this for a few weeks. Current i'm testing with android

This is the latest code that i'm not sure why no receipts detected.

hollow gull
#

@river fulcrum just a guess - is everything configured correctly on Google Play store, app signed and uploaded to GP?

river fulcrum
#

@hollow gull yeah, and the in app button works and the subscription as a tester is shown. The issue is i don't know how to hide the button to check whether the user is in subscription or not

broken marsh
#

Hello. I'm trying to build my app for android. I get this error on build, and I have no idea what it means. Any idea?

broken marsh
#

I think this is the error

slim nexus
#

i already set the target frame to 60 but it fees like the frames are visible

#

can someone who builds mobile games give me his exact quality and render settings

#

cause i have seen videos but it doesnt solve my issue

pallid heath
#

What do u mean by "Frames are visible"?

slim nexus
#

my project is a single spirte that when i drag on the screen i shoot it (its a 2d game)

pallid heath
#

@slim nexusmobile perfomance optimization is very tedious
I am also stuck in it now...

slim nexus
#

I hsould have performance issues i have 1 sprite and 1 ground in the scene

#

i should'nt have performance issues

pallid heath
#

Ohk anything more about the project?

slim nexus
#

when my sprite moves (a square) it seems like it's laggy we can see other squares if u know what i mean it's liek we see some frames

pallid heath
#

Yeah

#

I get it

#

Can u send yr movement script?

slim nexus
#

ofc

#

those are the only scripts on my projects

#

and a 2 square sprites nothing else

pallid heath
#

Wait up

#

If possible can u paste the text over here?(only player movemnt script)

slim nexus
#

ofc

#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(Rigidbody2D))]
[RequireComponent(typeof(LineRenderer))]
public class PlayerMovements : MonoBehaviour
{

public float power = 10f;
public Vector2 minPower, maxPower;
public TimeManager timeManager;

[SerializeField] private float _bounceMutiplier = 2f;

TrajectoryLine _tl;
Rigidbody2D _rb;
Vector2 force;
Vector3 startPoint, endPoint;
Ray ray;
RaycastHit2D hitInfo;
Vector2 _directionToBounce;

private void Awake()
{
    Application.targetFrameRate = 60;
}
pallid heath
#

Hello
My problem is with optimizing the game

Currently there is a value called Semaphor.WaitForSignal in the unity profiler under cpu usage under Others......so...this value is takin approx 80% of cpu usage and takes 50ms which i think is per frame...
Its consequence is that i am having a gameobject of which i am simply changing velocity with time ...this object should move smoothly right? but its stuttering

latent osprey
#

@broken marsh you have a using UnityEditor in a runtime code file, probably.

#

@slim nexus it's more likely you have not written the drag behaviour correctly

#

which is a pretty common error

#

otherwise, on iOS, you have to disable V-Sync

#

not sure what the dragging behaviour is here

slim nexus
#

@latent osprey i didnt get u

#

have u sawn my scripts?

latent osprey
#

i think you have other issues

#

related to the scripts

#

maybe start with the physics documentation

slim nexus
#

like i said the game isnt laggy from the scripts its rendering probelm

latent osprey
#

how do you figure

#

do you see a report that FPS is less than 60

#

a number, on the screen

slim nexus
#

i feel like my only spire ( a square ) is shown on top of another square when mooving (frames)

latent osprey
#

"no"

#

i think try starting with something simpler

#

and add little steps of behaviour and build to device over time

slim nexus
#

dindt understand

#

im sorry

#

@latent osprey can u refere me to some materials where i can look up for the things ur metionning ?

latent osprey
#

sorry man i think you'll figure it out 🙂

slim nexus
#

? ok thanks anyway

broken marsh
#

@latent osprey thanks for the asnwer. Is it in a script that I have it? Or? I don't quite understand

latent osprey
#

i think you should search for using UnityEditor and some part of your error message on stackoverflow and the details will be there @broken marsh

broken marsh
#

Okay thank you so much

patent parrot
#

Guys I just published my Android game

#

Do ads play for me, being the developer, or possibly because of the same IP address? I was playing the game testing it (after it was published) and ads weren’t playing, but they worked fine in the editor and everything. Should that be happening?

#

I was wondering this

broken marsh
#

I’m not so sure in that point but I think it should show for you. But I’m not sure

glossy sluice
#

wait so if the dev watches ads they gain money

patent parrot
#

theres taxes you have to pay when you earn

#

i fixed the ads system though

#

it was because i had already installed the debug version and was running that and android got confused in the playstore or something

red wedge
#

how do you guys debug for android? do you build and then use the android device monitor? test it out on android studio?

#

my game just goes to black screen and doesn't start 😦

#

i don't see my debug.log messages on android device monitor and i added them on the Start method for the first scene

still sinew
#

Hi, i get weird result when using marshaling on android. ```cs
public static byte[] Serialize(this IPacketBase packetBase)
{
var size = Marshal.SizeOf(packetBase);
var arr = new byte[size];

        var ptr = Marshal.AllocHGlobal(size);
        Marshal.StructureToPtr(packetBase, ptr, true);
        Marshal.Copy(ptr, arr, 0, size);
        Marshal.FreeHGlobal(ptr);

        return arr;
    } ``` and my packet looks like this ```cs

[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Control : IPacketBase
{
public OPCode Header { get; set; }
public float Value;
}``` usually the first byte from the byte array should be the header , in this case an enum OPCode.Control. But with this packet and on android its never working. So my questions, is there a something im missing because of android and marshaling ?

latent osprey
#

@still sinew what's the objective here? you should be using System.Net sockets

#

the size of a packetbase interface type is not going to be the size of the struct

#

sizeof returns constants in C#, it is not what you think it is

#

it will not know that it's looking at an implementation of the interface

#

mono does not necessarily follow the spec

#

but il2cpp on android almost certainly will

still sinew
#

Well im tryin to use marshaling to convert packets that will be used for socket communication. On windows everything is working, on android some packets are working. I never tested sizeof with interface, I just assume that it works like I expect. Would it better if I use Layoukind.Explicit and FieldOffsetAttribute ?

#

@latent osprey

still sinew
#

Nvm I just removed pack=1, due to different layout it results in differences between android and windows. Sadly it increases the packet size but thats nothing I have to bother.

dim acorn
#

hey guys, how can I integrate this thing in my mobile game as well? it seems like it's provided by google play

#

I basically want to save user data on google's platform. I have installed the google play services plugin and set it up correctly, but this dialog doesnt popup

latent osprey
#

@still sinew i just think that, as you saw pretty much right away, there are going to be differences, struct layouts are not adequate messaging formats

tough estuary
#

@dim acorn There can be many reasons why it isnt showing up, you have to provide more info for us to help you.

#

This is also very helpful: https://developers.google.com/games/services/android/troubleshooting. In case none of these help you, look into the logcat. The logcat display ALOT of info, but you can get the relevant info by piping the output to a file (cmd: adb shell logcat > mylog.txt) right before you perform the action that fails, then hit ctrl+c (this will stop saving the output to the file) 1-2 s after you performed the action. Then open the file (mylog.txt) and search for google play games errors. This is how i fixed my authentication error which was failing because the google account i tried to authenticate with wasnt listed as a tester account in the google play developer console.

#

@red wedge the adb tool is pretty good for debugging because it gives you shell and remote access. Wasnt the android device monitor deprecated for some time ago? also there can be numerous reasons for why your game doesnt work on your phone, you should look into logcat like i mentioned over here and the build settings in unity editor.

red wedge
#

thanks @tough estuary , i have tried a million different build setting and player settings but nothing seems to be working out. the logcat doesn't have any warning or errors specific to unity, just generic android errors.
I have however, noticed that my Debug.log messages don't appear, which probably indicates that it isn't even reaching my code? If so, it has to be something with the build/player settings right?

tough estuary
#

Stick to the default androidbuild settings. Your game will start as its own process so you should search for logs related to the package name of your game (com.examplecompany.mygame) as well. A good way of finding relevant logs is just to save all the output like i mentioned over here, and then search for "google play" or "gms" or any other related names (like unity f.ex).

pallid heath
#

Hello
My problem is with optimizing the game

Currently there is a value called Semaphor.WaitForSignal in the unity profiler under cpu usage under Others......so...this value is takin approx 80% of cpu usage and takes 50ms which i think is per frame...
Its consequence is that i am having a gameobject of which i am simply changing velocity with time ...this object should move smoothly right? but its stuttering
Im stuck with this error since days...
Any help would be appreciated!!

chrome haven
#

Hi, why my game in unity see perfectly and in phone he is pixelated?

vocal grotto
#

hi guys, for mobile device target, how much is the maximume size for texture to make it smooth to load in 1 level?

twilit niche
#

Hy everyone
I am working on a game like angrybirds but in 3d so i can't able to find the slingshot mechanism in 3d. Kindly help me in this regard.

#

Thank you !!!

glossy sluice
#

hiya. I've made a mobile game using unity and I am trying to update it but I am unable to figure out how to change the version code... Any ideas?

quartz kernel
#

Under player settings > Other

glossy sluice
#

thanks, I feel so stupid now lol

azure plaza
#

How can I report 2 person. He have say they nuke my server 😭😭

fast olive
#

Hi guys, Im trying to use the free particle asset pack from unity tech. Its the explosion that I use, and it uses the LWRP. It all compiles fine but the explosions don’t show on my Android. Looks fine in editor though. What am I doing wrong? Any pointers welcome, I am quite a rookie.

lapis hull
#

Hello everyone! I've been trying for some time now to build my game(for android) but I run into the same problem: I've selected the sdk path and it is under preferences, but it still asks me to select it when I try to build the game. Does anyone know how could I fix this? I'm also not able to select the sdk when that window pops-up.

tough estuary
#

@lapis hull This issue has been gone over many times in this room, look up older messages.

lapis hull
#

Oh. Thanks for letting me know!

glossy sluice
#

Would it be wrong for me to assume that people playing games on their phone, also is using Facebook?

tough estuary
#

Most mobile gamers in UK (source: https://www.statista.com/statistics/300522/mobile-gaming-in-the-uk-by-age/) are between 16-34 and most (almost) facebook users (source: https://www.statista.com/statistics/376128/facebook-global-user-age-distribution/) are also between that age so its a good way of making the authentication easy.

glossy sluice
#

Thank you. Guess FB is a good first try-catch authentication method

#

Well, perhaps there are easier way to achieve what i want:

#

The -only- thing I'm primarily is interested in is an account-unique (Google / iOS) variable like email-address or the hash of the email address to use as an identifier for my database backend

red wedge
#

you should use an unique identifier of your own, user might lose access to his e-mail account and wants to change to a new one, for example

glossy sluice
#

I'm not sure if that really is my problem? A user losing access to his email

#

I could map the users email to an internal GUID but if the user has lost access to his or hers previous email address, it's the issue of proving authenticity

#

Displaying the users internal GUID with a "don't loose this, it's important"-message seems pretty cheap

#

But as you say, the email-address might be the wrong identifier. Unless I'm mistaken, the Facebook SDK will give me the users Facebook ID

tough estuary
#

Either way, IOS or Android, i think the best choise is google play games services for android and gamecenter for ios. They already have implemented the social aspect (leaderboards, invites etc) so you dont need to build that infrastructure.

glossy sluice
#

but those invites are only for your friends in GP and GC?

tough estuary
#

Yes, not even sure google play has invites anymore, i thin this was part of the multiplayer api which is now deprecated.

glossy sluice
#

So for social, Facebook should be the defacto standard

tough estuary
#

But you can use invites within a multiplayer framework like photon for example

glossy sluice
#

Absolutely, but why keep your friends in many places?

#

just more to manage and to take into consideration

#

I'd say Facebook for the social aspect and Google Play Services / GameCenter for Leaderboards?

tough estuary
#

Google play services is a social aspect of gameplay, every android user must have a google account so its not that hard to convert a android user into using google play games services. And the same is for IOS where its really easy for users to use the integrated game centers

#

You can still use facebook in all of this, for sharing stats for example, which is a good way to engage others to join

glossy sluice
#

Ah yes, but with social I meant stuff like "Hey Look, I just finished level 85 on my CarCrush Game" or Invite others to play the game

tough estuary
#

Yeah you can do that, i just meant that you might get more players with using the integrated games services rather then only facebook

glossy sluice
#

but the "people" you referring to in the integrated game services - are those strangers or people I've befriended within the service=

tough estuary
#

Strangers

glossy sluice
#

Goood we love strangers.. err..

tough estuary
#

You either put all your money on most of your players having facebook or you use a integrated service - then later on in the mobile game you can still let them authenticate with facebook to invite/share stats tec

#

Why only have 1 when you can have both?

glossy sluice
#

That is the truth

red wedge
hardy fractal
#

So I am trying to make a joytick appear where the user touches the screen
To do that I equated the joysticks position with the 1st touches position and set the joystick active
And whenever the touchphase is ended I deactive the joystick
The joystick is appearing where I touch but is not working when I move my touch

#

Pls help...

#

@red wedge have u tried installing apk in other devices ??

sacred creek
#

What you mean? @hardy fractal so the joystick itself is not working? Where does the joystick come from?

#

And where do you set the position of the joystick? Maybe you are overriding it all the time with the function of showing it

red wedge
#

well @hardy fractal , I had tried on a Samsung tablet, and my old Xiaomi Mi A1. But now that you said that, I realized that I hadn't tested it in my new Xiaomi Mi 9T. And it worked!!! And now Tomas1856 also answered the thread with some very useful info! Thanks a lot!

latent osprey
#

@glossy sluice really depends on the game and the objectives. honestly don't overthink it, just do whatever login you feel good about and move on, spend as few resources on it as possible

hardy fractal
#

@sacred creek sry for the last response...
I meant that the joystick would go to where the user touches the screen but wouldn't work(meaning wouldn't detect input if I dragged the same touch....) I eventually got around it by just have a setting icon which allowed the player to reposition his joystick....

#

I initially want to achive something like the joysticks in brawlstars(a supercell game) not exactly like that but the same concept

#

@red wedge wlcm...

sacred creek
#

Where is you rscript then? Like what or how have you tried to achieve the joystick to work? @hardy fractal

hardy fractal
#

I downloaded the joystick asset frm the store ..

#

Was feeling too lazy to code it

#

(the free joystick pack frm unity asset store)

sacred creek
#

@hardy fractal hm dont know the code. Can you like paste it on hastebin or at least the parts you are placing the object and the part it should be working on user input?

hardy fractal
#

It's really long...

#

U can find it on unity asset store there is 1 free joystick (grenn bg and white text) you can see there

#

If u can't find let me know I'll paste it then..

lapis hull
#

Hello everyone! I've found a piece of code online that enables the Gameobject to follow touch. The only thing I dislike is the fact that it still moves, even if it's a tap. My goal is to enable movement only when the player is holding. I've tried to add a drag distance so it detects the swipe, but that only makes it worse. What could I do to achieve what I want?

quartz kernel
#

Could always add a small delay before it starts following. But yeah a drag threshold should work as well

#

To do it with the distance, you just need to store the touch position on TouchPhase.Began. Then you check the distance to that every update

lapis hull
#

alright. Tysm!

#

I'll give the drag distance another try, maybe I did it wrong

lusty flume
#

After creating a new update for a mobile (ios + android) AR app and uploading it to Apple, I've gotten an error about UIWebView being deprecated. How do I fix this? I have no idea how/why Unity uses this, but I hadn't gotten this error during my february update and I haven't updated Unity in the meantime, so I'm not sure what may have caused this to suddenly be a problem...

quartz kernel
#

Yeah @lusty flume it’s an internal engine thing. They have made comments about it on the forum. It should be gone in the 2019.3 version and I think they said they were gonna backport a fix to 2018 LTS as well

lusty flume
#

We're on 2018.3.14 due to non-updated plugins, any chance it'll work there as well?

quartz kernel
#

Most likely not :// you could ask on the forum

polar leaf
#

What good solutions are there for low latency audio?

#

I'm mostly looking at Native Audio, wonder if there are other recommended solutions out there besides that.

wise dagger
#

Hi

#

Well anyone can make android games
Like build with unity
Coz I'm getting SDK error no matter what I do

#

Failed to update sdk is what I'm getting

#

What shud I do?

latent osprey
#

@wise dagger use preinstalled android sdk

#

@polar leaf audiomixer

dim trellis
#

Whats a good list of websites i can publish my mobile game on, that would pay me whatever i get from views of my ads?

wise dagger
#

@wise dagger use preinstalled android sdk
@latent osprey
Pre-installed with unity?

#

Dosent work

indigo condor
#

should i use the class timer? does it have any inconvenience?

subtle spear
#

Hey guys i imported the CloudOnce package and i get this error

#

Assets\Extensions\GooglePlayGames\Platforms\Native\Platforms\Android\AndroidClient.cs(31,36): error CS0535: 'AndroidClient' does not implement interface member 'IClientImpl.SetGravityForPopups(IntPtr, Gravity)'

#

Using unity version 2019.3.7f1

wise dagger
#

I am getting an error in building for Android
SDK tools version 0.0 < 26.1.1

static jetty
#

How do I get gpu and cpu temperature on mobile?

latent osprey
#

useeee preeeinstalled aannnnddrooooidssdkdkskkdks

#

@static jetty you'll have to use a plugin / native API call using [PInvoke]

static jetty
#

Know of any plug in?

#

@latent osprey

subtle spear
#

I have made a Keycode for my Game and then put the new version of my game onto my mobile device and now the app doesnt open up what could i have done wrong?

latent osprey
#

Not sure

junior stratus
#

Hello guys 🙂 I'm almost ready to release my new android game, but I'm having an issue I am unable to resolve.
The app is not authenticating google play games services. The initial sign-in page never opens.
I have set up the game properly in the Google console, I have generated all keyStore files, I have linked the Game Services with the SHA1 codes and added myself as a tester. And of course I'm running the the authentication script as the official Google documentation suggests.

Might be a stretch to ask, but does anyone know what the issue could be?

junior stratus
#

The app is "pending publication" in the Play Console. Does this matter at all for the Play Services not working?

glossy sluice
#

I don't think.

hardy fractal
#

I am learning webview in unity I have managed to get it working but can't get it to full screen..

#

It occupies only 1/2 of the screen and the rest is bg color...
Any idea how to get it to full screen

true hearth
#

hello , have someone a good tutorial about permisions ? ( file permision)

sweet flax
#

How do I support multiple aspect ratios?

balmy vine
#

@sweet flax In your canvas do you mean?

sweet flax
#

Yes

junior stratus
#

You can set the canvas to "scale by resolution" or something similar in the inspector

sweet flax
#

scale by screen size

late mulch
#

...

broken marsh
#

Hey, I am trying to use Unity Remote 5 to try my iOS game on my phone. When I try to choose my phone in unity, it says "Any Android Device", "Any iOS Device" and "Unknown: iPhone (pid...)"

I'm using Unity Remote 5
I'm using Unity 2018.3.0f2 Personal

graceful reef
#

has anyone ever implemented a "touch-to-move" like in stardew valley?

tough estuary
#

@junior stratus Did you fix the auth error? You should enable debug logging like this: PlayGamesPlatform.DebugLogEnabled = true; and see if the logs for the game PID through adb logcat has any relevant info. Usually it does, if not then double check if you did the the auth process (keystore pass, fingerprint etc) correctly.

neat kayak
#

@junior stratus I recently had same problem with authenticating in case when requesting id token. Only solution for me was to add Firebase to my app in google games services console and inside Firebase added google games authentication method. Then I had to update web app id in Unity to this from Firebase which you can find in Google APIs console. You can search in youtube for configuring Firebase Google in Unity if having troubles.

candid cloud
#

heyo idk if anyone would be able to help me here, im quite new to unity(came over from unreal xD) but im struggling with a small bug on a mobile game im messing about with. Basically I am using a dynamic joystick from the free joystick pack to control the player. Because its the dynamic variant of the joystick the player can click anywhere on the screen to control the character. This was all working fine until i created a new scene for my start menu. Now once the player clicks start and goes into the game scene the dynamic joystick is not able to be created at points where the previous menu scene's UI elements were. I am able to select small portions of the screen where there were no buttons or images on the menu to create the joystick but thats all. Its really confusing me because its a new scene that is being loaded on the play button that doesnt draw the menu or anything i feel like there is something small im missing that will solve it, any help would be good.

hot sky
#

When you load it from the menu, how do you switch scenes?

candid cloud
#

so i have a main menu empty game object that has a script on it that i have called once the button is pressed.

#

public void PlayGame()
{
SceneManager.LoadScene("TestScene");

}
#

thats all it is

hot sky
#

If you initialize anything specific on the joystick when the menu is loaded, I don't think it will be persistent...

#

Pause the scene after loading "TestScene" and look at your joystick... is it still dynamic?

candid cloud
#

well the thing is this only happens on android when testing in unity it doesnt happen

hot sky
#

oh ok

candid cloud
#

it still detects touch inputs, only the joystick wont be created where a previous scenes UI was

hot sky
#

I'm not super good at mobile so I can't help you anymore than this, but are the items in your canvas set to "don't destroy on load" if so, that means that they are still there just potentially disabled.

candid cloud
#

where is that setting located? is it on the canvas itself?

hot sky
#

I think it's on all the items in the canvas

candid cloud
#

i cant see that option at all idk where is is

hot sky
#

it should be at the very bottom of an object that you click.... again, I can't help anymore because I'm not super good with mobile and I just wanted to see if desktop development carried over with debugging.

#

Maybe have a text thing on the canvas in your example scene that is updated through a script with whether a joystick is dynamic or not... then use it on a phone and see if it says your joystick is dynamic. You could also just push the cs Debug.Log(""); output into it.

candid cloud
#

alright ill try that thanks for the help

stoic haven
#

hi
im having a performance issue
basically i started with the urp scene and created a character controller, a character model with three animations and 3 cubes
its working fine on pc (no wonder lol)
but once i build it and run on my Android phone, it lags like hell

does anyone know if its a problem because of urp's settings?
ive lowered down everything, vsync is off
can smone help me with this?
thanks!

normal glade
#

you gotta profile it, i think you can profile if you connect your phone to PC and open up the profiler in unity editor

stoic haven
#

i did,
im using unity's default renderer now, ditched urp
this is all that i have in my scene

and rendering is taking up 90% of my phone's cpu
still cant figure out what is so intensive in this scene

golden remnant
#

hi, i'm having some problems on exporting a game. So, it is working on the unity preview but i want to test it on my phone, that means i need an .apk file. How can i get the game that file format?

quartz kernel
#

This is covered in any tutorial in android development in Unity. You need to do a build, but you might need to set up some things before that

golden remnant
#

Thank you!

shut finch
#

So im developing a little UI-Heavy game for android in Unity... Most UI elements should be able to get chained after another, for example dialogues etc... Are there any UI-Frameworks or librarys for unity to make such development steps simpler ? Things that unity is missing are typicall Screen-Behaviour and flows ( Screen stack ), passing params or results from UI-Elements to another etc...

true hearth
#

hello .have someone a goot tutorial about android file permissions ? i`m trying to save files to internal storage , but after i close the aplication the files got automatically deleted

latent osprey
#

@broken marsh try to reset your location and privacy settings on your device

#

@true hearth android file permissions models change a lot, if you do not have a modern device you'll be in trouble anyway. consider targeting a newer device

#

@shut finch i usually use the MaterialScreen and ScreenView classes from Material UI for screen management. there are a lot of useful things in the Unity UGUI UIExtensions project

#

authoring what you're talking about, a router, with history, is very easy, less than 30 lines of code @shut finch , so don't overthink it

#

the answer though is no, there is no standard router. it isn't web development

#

@stoic haven you can't profile the editor. you have to profile the device

#

it still looks like you're profiling the editor? it's hard to tell

#

@stoic haven anyway, you are probably using an ill-suited android device. does it run any games well? try monument valley or hearthstone, big unity games.

stoic haven
#

im profiling using my device
also i can almost run any recent games
it got 3gigs of ram and a quad core processor

shut finch
#

@latent osprey Does this Material UI asset provides utility classes/components for Ui development ? :D thanks a lot... Never heard about Ui Extensions, looks great... But the documentation is lacking

latent osprey
#

yes

#

@shut finch it provides some very useful ones, like the ones i said

#

it does not provide a router

#

a router is easy to make though

#

you might want UniRx to help you with any ui stuff

#

that is ReactiveX / RxNet for Unity

#

it is not the same as React.js, they are not related

shut finch
#

@latent osprey Thanks :) its a pitty that unity does not fome along with such solution by itself

latent osprey
#

i think this is int he spirit of what runtime UIElements will do for you @shut finch

shut finch
#

@latent osprey you mean the upcoming css like elements ? If so, i really hope, ui in uniy is a pain for ui heavy games or apps right now :/

broken marsh
#

Hey. I'm trying to build for android. I get an error while building. I couldn't find out what the problem was in it, but there is a place where it says "Applikationen skal bruge Administrater tilladelse" which means "The application requires Administration Permission" and I have tried to run unity as administrator. Any idea?

hollow loom
#

So I have a game for web which uses discord login for accounts. Ive started building an app for my game using unity,but cannot find any sort of unity3d discord library for login.Any suggestions/resources I could use?

junior stratus
#

@eager tendon You could use a large invisible button together with an Event Trigger component to get events from tap begin and tap end 😄

latent osprey
#

@hollow loom use an oauth2 based login SDK

#

@broken marsh it sounds like you have other issues with your install, and that message is a red herring. also you attached an unrelated piece of code

glossy spear
#

Can you put a unity project on an iphone using a windows computer?

#

I really mean the whole process, so get an app on an iphone (not on the app store), without using a mac

odd arrow
#

I think so. I've created deployment package for the iOS once, it was huge, I didn't have fast upload at the time to transfer it for testing, so I didn't test it on actual device.

glossy spear
#

Yeah building is possible on iOS

#

but I think transferring the build to the device requires xcode?

odd arrow
#

I think that package was designed to be ran on mac to deploy on iOS

glossy spear
#

Ah so that would require a mac

odd arrow
#

Somebody should probably confirm it. I don't remember exactly now.

glossy spear
#

Alright thanks

tough sentinel
#

im buildin an AAB yet it doesnt support both 32 and 64 bit on the play store. any help?

robust hamlet
#

@glossy spear to build for an iOS you need a Mac device + XCode

#

There is an asset in asset store which let you build for an iOS device from Windows but you still need a one time mac os device to gather some files as far as I know

#

Never used it though

glossy spear
#

Aah too bad

#

Thanks guys

latent osprey
#

@glossy spear

Can you put a unity project on an iphone using a windows computer
no

glossy spear
#

Rip

latent osprey
#

your journey has only begun

glossy spear
#

Mobile hell :(

sacred creek
#

You can use cloud build if you have it , but not with like Xcode on mac @latent osprey @glossy spear

wise dagger
#

How can I add smooth tilt controls

prime fox
#

is anyone having issues building android on 2019.3.7f1, i build what looks like an bunch of android studio files but i dont seem to be able to make an APK file?

junior stratus
#

Hey guys. I have completed my game for Android and I am now ready to add iOS support. I am using google play games services for login/achievements/leaderboards for android and I am going to use Game Center for iOS. When I switch the platform from Android to iOS in the editor, I get the error
"The type or namespace name 'PlayGamesPlatform' could not be found (are you missing a using directive or an assembly reference?)"

#

How can I fix this? Does iOS not support the google services classes?

glossy sluice
#

hello, I am working on a new mobile platformer game. I couldn't find a working tutorial on how to make player controls using touch input. Any suggestions

latent osprey
#

@prime fox you can create the apk by running ./gradlew.bat assemble from the directory you got, or just google "export apk android unity3d"

#

@junior stratus you have to use compiler directives to prevent references to android-only plugins

#

@glossy sluice try ray wenderlich's tutorials

glossy sluice
#

hi! I am trying to make touch controls for my 2d platformer and I am unable to find a tutorial to help me.... I also imported standard asset, CrossPlatformInput. Can anyone help me make touch controls for my platformer game. Many thanks 🙂

glossy sluice
#

Hi! I am working on a game and I would like to know if there was any way to carry on preforming an action when a button is being held (like hold a button to move) (by button i mean on the screen button / UI button). But when I hold the button it only completes the action once (like moves once and doesn't carry on). Any ideas?

mild aspen
glossy sluice
#

thanks @mild aspen

hardy fractal
#

I ran into a weird prblb
So I always test the game on my phone but when I tested it on a smaller phone the screen display was different
In that scene I had a image on screen and below it a some text(canvas was set to screen size) but the scene looked diff in the smaller phone(the text was a lot left to the image

latent osprey
#

@hardy fractal what is the question or objective?

#

everything seems normal here with the way UGUI works

haughty jewel
#

Hey everyone, have they moved the Lightweight render pipeline in the latest versions of unity? I tried upgrading my project and now all my materials are pink, I think I need to install the LWRP but I can't find it in the packages

EDIT: LWRP is now called URP and I fixed the issue

polar leaf
#

Input System doesn't work with Unity Remote 5 yet.

#

It makes testing very difficult 😔

prime fox
#

@latent osprey thanks 🙂 thats awesome, do you know how to maniupluate the version number and the build number from those files? I need to correct the version number outside of unity.

glossy sluice
#

Hi! I'm struggling to find an easy to follow tutorial for a way to save my game's data for my mobile game. Does anyone know of any good and easy to follow tutorials?? Thanks 🙂

slim nexus
#

GUYS HAS ANYONE HERE USED URP FOR A MOBILE PROJECT I JUST HAS SOME ISSUES

latent osprey
#

@prime fox there are a few ways to do it. On android it’s called something else (version code) and you can regexp find and replace in your favorite scripting language in the two gradle files that contains the values. You can get the latest version google play will accept using fastlane

hardy fractal
#

@latent osprey the text seems a bit to the center in first screen shot

#

I want to fix that

latent osprey
#

the text seems a bit off center you mean? @hardy fractal

simple canyon
#

Hey. Anyone else having problems with publishing updates/releases on Google Play right now?
They state there's a 7 day minimum review time, but our update hasn't been approved in 14+ days now.

hardy fractal
#

@latent osprey yess

lost sapphire
#

when making Android plugin, after you put java files into plugin folder how can you add manifest to it?

#

I need to add receivers to the project

robust hamlet
#

@lost sapphire Just add your Manifest file in Plugins/Android or yourFolder/Plugins/Android

#

at the end all manifest files are being merged

junior stratus
#

Hey my Xcode build fails with the error "MapFileParser.sh: Permission denied"
Does anyone know how to resolve this?

latent osprey
#

@junior stratus sounds like you're trying to add a plugin in an incorrect way. MapFileParser.sh needs to be marked executable using chmod +x, but on the other hand, this isn't a unity issue

#

@hardy fractal i think just try moving it down, until it looks centered? am i misunderstanding your objective here?

junior stratus
#

@latent osprey I tried running the command without any effect. From the research I've done this has to do with moving files from Windows to Mac

latent osprey
#

Yep

#

That was my guess

hardy fractal
#

@latent osprey in the screenshot the number is a bit to left of High score while the other one is centred
I want to fix that ...

prime fox
#

@prime fox there are a few ways to do it. On android it’s called something else (version code) and you can regexp find and replace in your favorite scripting language in the two gradle files that contains the values. You can get the latest version google play will accept using fastlane
@latent osprey I got it mate, thanks, legend!

frosty vigil
#

Hi guys I got some problems with Android Manifests merging ! i'm working on Unity 2018.3.4f1 and I get a manifest merging errro when I build that suggest me to add ' tools:replace="android-debuggable" ' to my AndroidManifest-main.xml but this doesnt solve my problem can someone help me ?

robust hamlet
#

@frosty vigil You have probably a few Manifeet files from other assets or plugins you are usint inside your project and both of those manifests has different values for android debuggable variable

#

So just search all your manifest files and make the value equal to false

frosty vigil
#

@robust hamlet i'll check thanks for the help 😉

subtle spear
#

I have a problem, i am using the cross platform native plugin and i have script that manages the Play Service and the leaderboard. i have that script attached to an empty gameobject and i have put it into my game scene. if i start my app with the download via playstore i can open it see the main menu if i click on play and get to the game scene the application crashed

#

If someone has some knowledge with this things would be nice if you could help me i will provide every info that could help

#

pictures, screenshare

#

what ever is needed

glossy sluice
#

I have just published my first game to Google play. Does anyone have any advice / knowledge on how to get more downloads and stuff. Thanks

robust hamlet
#

@glossy sluice everyone wants that

latent osprey
#

@subtle spear guess you have to run a debug build on device

subtle spear
#

Already fixed it thanks alot for answering tho

left wigeon
#

Hey fellow programmers!
Can i get a help on implementing touch inputs (never worked on them before)

#

What i want to build is
character(C) goes right when touched within R limits and similar for left and if pressed in middle it jumps

So far i done this but for keyboard i.e with a, d and spacebar
Can anyone help me with how to apply touch controls for this one ?

fast olive
#

I think you can just make three big invisible buttons and do it that way? Maybe there are better sollutions.

#

@left wigeon

sick minnow
#

why is the second material of my game object showing on pc but not on android

wanton narwhal
#

Hey, does anyone know if the new device simulator also simulates performance for the specific devices?

hazy yarrow
#

Hi guys, Has anybody used the new input system with gyro and can me give some help setting it up correctly?

red beacon
#

The mobile SCP:containment breach is horrible honestly

latent osprey
#

@wanton narwhal no, it does not

#

@hazy yarrow usually the problem is not the code, it's that you want to do something with gyro that is impossible

wanton narwhal
#

Okay, that's what I thought. Pretty unfortunate. Would be awesome if there was a way to do that

latent osprey
#

the new input system will give you events

#

"but i want an orientation" —> the iOS api calls this attitude, and that's what you should search*

#

you probably will want to access the iOS attitude directly, and on android... it's tough

glossy sluice
#

If you look correctly to middle of aquarium, you can see a bone.

#

What should I do?

#

You can send me message, I'm waiting for the help!

lime vessel
#

Guys I have a question

#

How much money can you earn if you sell a really good mobile game to a mobile games company?

cinder void
#

really good is a super subjective term. whats *really good *by your standards might not be what companies want or need.

#

you need to deep dive into entire mobile games ecosystem and mobile ecosystem in general to get better understanding of the state of affairs. its broad and deep.

#

more importantly this is perhaps not the right channel to talk about business of mobile games. its a programming channel for unity mobile games specifically. @lime vessel

high basin
#

Hey guys!! I m working on a new game for mobile and there are lot of resources and i want some of them to be downloaded online after the game has been installed.Line in game installation like in heavy games lo ike pubg,etc.

high basin
#

Thx

glossy sluice
#

What about my problem guys?

prime quest
#

Hi, Im having issue to code the speech interaction with touch interaction for handheld augmented reality? I already did the touch interaction, but the part of speech interaction i do not know how to do and implement it for android device.

vagrant kindle
#

Hi I'm having difficulties to work with Unity AndroidJavaClass, AndroidJavaObject and AndroidJNI.
I try to call a method which takes a double[] as first parameter, an Enum as a second parameter and return a double[]

// Instanciate object
var ReframeLib = new AndroidJavaObject("com.swisstopo.geodesy.reframe_lib.Reframe");

// Get enum for method parameter 2
AndroidJavaClass projectionChange = new AndroidJavaClass("com.swisstopo.geodesy.reframe_lib.ProjectionChange");
var _lv95ToEtrf93Geographic = projectionChange.Call<AndroidJavaObject>("LV95ToETRF93Geographic");

// method parameter 1
var input = new double[] { east, north, height };

// Call the desired method with parameters 1 and 2
var output = ReframeLib.Call<AndroidJavaObject>("ComputeGpsref", new object[] { AndroidJNI.ToDoubleArray(input), _lv95ToEtrf93Geographic });

// Extract data from double[]
IntPtr outputRaw = output.GetRawObject();
longitude = AndroidJNI.GetDoubleArrayElement(outputRaw, 0);
latitude = AndroidJNI.GetDoubleArrayElement(outputRaw, 1);
altitude = AndroidJNI.GetDoubleArrayElement(outputRaw, 2);

But my output is always null..
Here is the documentation of the JAR I try to use in Unity https://www.swisstopo.admin.ch/content/swisstopo-internet/en/home/products/software/dll/_jcr_content/contentPar/tabs/items/dokumente_und_publik/tabPar/downloadlist/downloadItems/1397_1465281583240.download/Manual-reframedlle-09-07.pdf
If this can help to understand what I'm trying to do.

Any help would be nice, thanks !

austere birch
#

Hello Everyone,
I currently training Unity Mobile (Android) and Windows using C# as main script code.
I don't understand much and cannot find about mobile from google and other source about mobile build i hope any of you can teach me the basic of build mobile.

After building An Empty Apk and installing it Into my Phone or Nox Emulator,
I tried open the App and It work but When I trying to Find Material Resources, There none at /storage/Emulated/0Android/Data/com.MyPackageName.appname/ There are nothing other than Cache and files Folders.

The Target i wanted learn right now is how to put data on mypackage folder and how to access out side mypackage folder for example of outside folder /storage/Emulated/0/foldername

Thanks for reading and helping this chat, please Tagged me for answer or any problems.

odd arrow
austere birch
#

thanks for guide, i'm going to try that first

odd arrow
amber gazelle
#

hi guys i have a problem with buttons, so they dont have detection on the entire size just like the half button works or just the middle part, how to fix this?

#

(in unity player it works well but in mobile build its not)

odd arrow
#

Need to test the layout for the different resolutions. On mobile resolution some panel or text element can obscure touch areas.

amber gazelle
#

got better with the canvas scale with screen size

low jewel
#

Hello All

final iron
#

Hello everyone! I'm having problem with Unity as it doesn't locate the Android SDK directory... can anyone give a help, please? I've tryied almost everything: reinstall Unity; change Unity versions (2018, 2019); reinstall Android Studio main directory... and always, even when I changed manualy the directory, the same message appears:

quartz kernel
#

You sure you have everything in your SDK folder? What folders are in it?

final iron
#

@quartz kernel Hi! I think so... this is the default installation directory by Android Studio...

low jewel
#

i have to build a project for mobile in the next couple of weeks I usually use unity 2018 is there a reason to move to 2019 and urp. Is there an instant frame rate improvement or battery improvement?

quartz kernel
#

@final iron What folders are in it?

final iron
quartz kernel
#

Yes, but I mean the folder you have set in your Unity preferences, what's in it?

final iron
quartz kernel
#

And what's in that folder?

#

I'm asking because a common cause of this problem is the SDK folder not having the correct stuff in it

final iron
#

That's what Android Studio installs. I've tryied to point to any specific directory, like "built-tools"

low jewel
#

did you open andoid studio first

#

i think you need to open it to download the rest of the files it needs

final iron
#

hmm... yeah... why?

#

It's open right now

low jewel
#

when you download andoid studio i think you need to open it then it downloads the sdk

final iron
#

The directory structure is as the first images I've shown here...

quartz kernel
#

You're missing a tools folder, that might be something

#

Is there a reason you're not using the unity-installed SDK? Usually I would recommend people to do that unless they know what they're doing

final iron
#

Actually, this problem was solved when I installed the 2020 version of Unity (the beta one)... but it doesn't have any Cardboard assistance... so I can't make any VR Cardboar apk

#

@quartz kernel and how Unity installs it? I mean, from Unity, or from Android Studio?

#

I've tryied to download this "tools" directory manually, and it didn't work. I guess...

#

Let me try something... coming back soon...

#

Is there a reason you're not using the unity-installed SDK? Usually I would recommend people to do that unless they know what they're doing
@quartz kernel As a matter of fact, this only worked when I installed the 2020 version... this 2018, doesn't...

quartz kernel
#

Install it via Unity Hub

final iron
#

@quartz kernel I tryied to copy the "tools" directory from a zip archive which I downloaded from Android.developers once... it seems to have worked...

quartz kernel
#

Nice

#

Maybe 2018 doesn't have the SDK and NDK

#

You can still use cardboard in 2019 btw

final iron
#

2019 has this
@quartz kernel Yeah, I know... Actually I pointed manually the NDK and JDK directories and it worked too... But, I'll try the 2019 (since I have it installed too)

#

@quartz kernel thanks a lot! I will try this now... will come back later if I have any other issues! You helped a lot! 😆 👍

low jewel
#

anyone have any thoughts on
i have to build a project for mobile in the next couple of weeks I usually use unity 2018 is there a reason to move to 2019 and urp. Is there an instant frame rate improvement or battery improvement?

quartz kernel
#

If you're under time pressure I'm not sure I would recommend it, depending on the scale of your project. But yeah for mobile the improvements should be there. Unity has had some stats in their talks on URP

low jewel
#

you think it would just out of the box preform better?

#

have a couple of weeks to build the project

quartz kernel
#

It should do. Setting up a benchmark scene relevant to your use case might be worthwhile

glossy sluice
#

I have ui buttons set to either reload the gameplay scene or load the main menu, but after using each button once they no longer work.

frail summit
#

i have made an IOS game its a idle game but when i start playing my coins wont show up and the prices for upgrades is 0 so its free to first prestige, but when i prestige its fixed with prices but not with coins like how much i have. i have no clue whats the problem https://hatebin.com/nqmqfqlntp

glossy sluice
#

Closed unity app after opening and showing logo

Hi! After building application to mobile, the app was open, showed logo, and at once close. Why? Thanks for answer.

quartz kernel
#

Because it crashed 😛

latent osprey
#

you probably want to start the app with Xcode/Android studio connected so you can easily see the log

boreal spear
#

heyyy

#

How far am I away from having these open links when you click on them? Or display information in a window?

#

it seems pretty easy but I don't want to start if I can't really finish

stuck void
#

Does anyone know off some good tutorials for making a 3D character move using a mobile joystick, all the mobile joystick tutorials I've found so far don't work for various reasons such as it being for 2D when I want 3D or some use the standard assets which Unity have taken off the asset store now

polar leaf
#

Any joystick just gives you a 2D vector, it's up to you how you translate this 2D vector into a 3D movement of your character.

static blaze
#

Hey. I am making a 2d mobile game, and my issue is that the camera resolution scales outside my tilemaps etc. I was wondering what the easiest way to get the different landscape aspect ratios to include the same image basically.

#

Simply include contents of one resolution to all aspect ratios

fast olive
#

Im working on a game for android and couldnt get particles working in my 2019.2.17f1 build (LWRP). I updated my project to 2019.3.xx to try and make it work with URP. So I got it working but now my apk has jumped from ~26mb to ~100mb. I tried compressing textures and removing unused assets but so far only got it down about 2mb that way. Is this a normal size increase?

glossy sluice
#

@fast olive I have prob like u. My game is 350mb, but it's too small sized game.

static jetty
#

I'm debugging my Android. Anyone knows why this is happening? 1min+ into the game, 55+ fps drops to only 25+ to 30

shadow wasp
#

Hey guys. Question about aspect ratios. I'm making a landscape oriented game and I'm in doubt about how to properly do my UI for different devices. Is there a way to lock into one or a couple different aspect ratios instead of the device just croppin' out the top + bottom of my ui on the newer crazy devices that are more 1:2 in terms of width and height

#

Basically i just want to l just want to know if I'm gonna be fucking myself over if I don't make ALL of my UI to fit 19:9 aspect ratio for the S10 for example. It looks great on all other devices but the newest ones it doesn't.

Is there a way to make sure that any device that has those crazy aspect ratios will just try to fit the closest one or something?

wanton narwhal
#

These are 2019.3 update notes. Does this mean I have to use >= iOS 10? Is 9 not supported with Unity 2019.3?

#

Just checked. I can't even change it to 9.0. Well that's a bummer

latent osprey
#

@shadow wasp you have a few options. you'll want to start with Device Simulator, a unity package, and notch solution, for weird details. then, if you're just familiar with HTML style layout, use a physical scale canvas scaler. you should probably look at how the NotchSolution SafeArea component does letterboxing to create your "container" that manages aspect ratios for you

#

@wanton narwhal no i don't think iOS 9 is supported anymore, the last device to be limited to that is the iPhone 4S, which was released 7 years ago

glossy sluice
#

But dont understand what they mean

#

Anyone down 2 help?

#
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
austere birch
#

hi guys i have a stupid idea, is there a way to detect movement of mobile?

quartz kernel
#

Yes @austere birch you have the gyroscope and the accelerometer

#

But not all phones have both of those, just be aware of that. Most do though

austere birch
#

the gyroscope and the accelerometer
thanks for info

#

time to find theory drawing 3D using phone XD

fallow harbor
#

Can anyone help me today threw a call I’m missing a couple coding stuff which I don’t know how to do it’s a 3D mobile game if yes pls contact me so I can call u and I can show u my screen so you can help thank you 😊

meager edge
#

I've been breaking my head for hours, basically I have an invincibility Bar Slider which works fine in the editor, but doesn't work on the android build (It's a mobile game). So basically the images don't scale to increase or decrease according to the values set through the code, they are just constant, whereas in the editor everything works smooth as butter. Can someone PLEASEEEEE HELP ME ;_:

glossy sluice
#

Can i use my mouse to check that my touch function is working properly, without having to export it everytime?

quartz kernel
#

@glossy sluice look up Unity Remote for faster prototyping on mobile

glossy sluice
#

Sat for 2 hours straight and it didn't work 😦

#

I have everything but it just dosen't work

#

Is there any other way, idn what to do lol

quartz kernel
#

Ok well what I normally do is when I add some mobile input, I also write a mouse version of it so I can test it inside unity. But that won't give you multitouch

glossy sluice
#

multitouch?

quartz kernel
#

several touches at once. Like pinching

glossy sluice
#

But like i wanted to make sure that like it detects touch

#

not what happens after

#

The other stuff don't really matter

quartz kernel
#

Well you don't need a huge build just to verify that, just make a test scene with some basic UI reacting to touch

glossy sluice
#

Oh yeah i could like make buttons/necessary stuff and make sure it works there and just double check the new code

meager edge
#

I've been breaking my head for hours, basically I have an invincibility Bar Slider which works fine in the editor, but doesn't work on the android build (It's a mobile game). So basically the images don't scale to increase or decrease according to the values set through the code, they are just constant, whereas in the editor everything works smooth as butter. Can someone PLEASEEEEE HELP ME ;_:
@meager edge BUMP https://paste.myst.rs/svj

balmy lotus
#

Anybody have issues building ECS for iOS? No member named 'get_address_of_ecb_0' in 'U3CU3Ec__DisplayClass5_1_t713C0FF0AFF2CC377EAAE683E9F7D820B8BCB45B'

fallow harbor
#

Anyone here is good at building mobile games bc I have a problem with my game and I don’t know how to fix it if you are or have at least 1 month experience pls message me on private thank you

ripe sigil
#

hi , how can i set a default resolution that will work on all phone types ?

fallow harbor
#

@ripe sigil I’m pretty sure that when u export ur game u change it there and just search on the internet what resolution the iPhone 6 can have and put it or android if ur doing it for android

austere birch
#

how to set my data to Data Folder com.mypack.myprojname in mobile?
i tried use streamingassets, assets, resources but no folder in my Data Folder

stuck void
#

Could anyone tell me how I could make a 3D character move using a mobile joystick? I'm developing for Android on Unity and this one part I'm stuck on, basically I want to be able to move the character with a joystick and then be able to rotate through touching the screen.

#

I can show my current code if needed

sinful slate
#

Hello, I am having an issue when unity remote 5

#

is not working at all.

fallow harbor
#

@Ayresia#2327 what version of unity do u have? It also did not work for me but now it works

cosmic laurel
#

Can anyone point me in the direction to code a time based system like Soccer Stars?
Like Turn 1
Player 1 is selectable
Player 1 moves
Turn 1 ends
Turn 2 begins
Player 2 is selectable
Player 2 moves
Turn 2 ends

https://youtu.be/Af7daSP9hQM?t=196

Thanks for every Like and Favorite! They really help!

Google Play download URL:
https://maximumandroid.net/detail/soccer-stars?id=com.miniclip.soccerstars

It's the last minute of the game and your opponent has the ball... but he's lost it! What a chance to score the winner....

▶ Play video
latent osprey
#

@balmy lotus i don't know if ECS is tested for iOS

ripe sigil
#

hi, how do i copy the game to my iphone ? like only my iphone and not publishing it

quartz kernel
#

Do you work on a mac @ripe sigil?

ripe sigil
#

nope , windows

#

@quartz kernel

quartz kernel
#

Then you can’t, unfortunately

ripe sigil
#

sad

tulip grail
#

Anyone using the Input Manager and developing for iOS/tvOS with controllers and on LTS? Is the left movement stick working properly for you? I believe Unity has broken controller support.

balmy lotus
#

@latent osprey yeah doesn't seem to work. Works fine on Android using mono 2x but fails using IL2CPP with same error. I tried Mono2x and IL2CPP on iOS but no luck.
No member named 'get_address_of_ecb_0'

polar leaf
#

@balmy lotus ECS has some weird code stripping issues when building, I've had that happened to me.

#

If you can read C++, open the IL2CPP it generates and check out the line it throws that, and find it in your C# script

#

Then it's basically guesswork, change things around.

#

In my case I had something like

int count = ... ;
if (count > 0) {
    Entities.ForEach( ... );
}

and after changing to

int count = ... ;
if (count <= 0) {
    return;
}
Entities.ForEach( ... );

And it works.

#

Unsure the root cause of it but it seems to be about code stripping in combination with the new ECS stuffs.

austere birch
#

0-0/ how to make app play in background (mobile)?

balmy lotus
#

thanks @polar leaf, managed to hunt down the code that was trouble some. Had to reorder some code where my CreateCommandBuffer was being called. Also related to If statements and ForEach. I had something like

var ecb = m_EcbSystem.CreateCommandBuffer();

if () {
Entities.ForEach... => { ecb.AddBuffer() }
return;
}

Just moved the ecb inside the if since I wasn't using the ecb outside of that anyways

polar leaf
#

👍

#

I didn't look deep into it, but it seems like these variables are converted to getters/setters (makes sense, because worker threads need to access them too) and somehow if statements cause them to get stripped.

stuck void
#

My character carries on the run animation for a few seconds even after standing still, does anyone have any idea on how to fix this?

Another thing the character carried on moving even after I stopped doing anything, it seems that turning the drag up has helped a lot but I feel like there's probably a better solution if anyone knows one

lethal gyro
fast olive
#

I have a problem that I am struggling with, I kind of messed it up myself by not taking enough notes but hope to get some help. I upgraded my project to 2019.3 in an effort to get my particles to show correctly on android. Using a tiny explosion from Unity Particle Pack. I made a build that works (and I still have that apk), but then I changed some things to make apk smaller, compressing textures and what not. Another build changed the number. Problem is I dont remember what I changed and now I am back to it not working. 😬 Any ideas for good working settings? Anyone have an idea what I screwed up?

modest vault
#

hey so i was building a game to Android and it gave me this error, seems this file is missing and i'm not sure where i can find it. any suggestions?

quartz kernel
#

Work with version control @fast olive then you can easily jump back and see what you've changed

kindred zephyr
#

I click on yes, then its installed.

#

But not working

quartz kernel
#

Do it through unity Hub @kindred zephyr

kindred zephyr
#

how

#

i am in unity hub now, explain me how.

quartz kernel
#

if you go to installs you can add build modules to an already installed unity version

kindred zephyr
quartz kernel
#

No that's the install button

kindred zephyr
#

oh

quartz kernel
#

press the ... button on the version your project is in

kindred zephyr
#

hmmm...

quartz kernel
kindred zephyr
#

its not showing that for me

#

why

#

its only showing ''Show in Explorer'' and remove from hub

quartz kernel
#

Because you're clicking on the project, not the unity install

kindred zephyr
#

i am not

quartz kernel
#

Then it might not have installed properly

kindred zephyr
#

And what can i do

#

?

quartz kernel
#

Remove it and install again

kindred zephyr
#

found this on forum

#

''Hello !
You can only add modules to the editors that are installed through the hub. Your 2018.4 editor is installed outside the hub (the proof that you see "remove from the hub" but for the others you see the "uninstall" option). You can remove that editor from the hub then install it through the "ADD" button.''

#

wait let me see

#

so i remove it from hub

#

and add it back ?

quartz kernel
#

Yep

kindred zephyr
#

ok

#

lol

#

its not showing

#

:<

kindred zephyr
#

(its connected to the pc with the usb)

modest vault
#

enable usb debugging

#

developper options

kindred zephyr
#

i did that

#

nothing is working

#

i aleardy have 3 hours trying to solve this

#

i am angry

modest vault
#

i have an issue too that is frustrating me

#

by the way if u have a password or a trust computer pop-up make sure to allow that

kindred zephyr
#

i did and its not working

#

rip

modest vault
#

ow

#

rip

odd arrow
#

@kindred zephyr Some devices need additional drivers to be recognized. Installing support PC apps from the manufacturer will usually install needed drivers.

kindred zephyr
#

I use a samsung galaxy s9, i still cant find the fix.

odd arrow
#

Did you activate developer mode?

kindred zephyr
#

Yes i did.

#

Debugging mode is ON.

#

So first i cant select my phone, and second this.

#

The path are selected, i checked 3 times.

modest vault
#

you sure you installed the android SDK

kindred zephyr
#

I dont know what is wrong..i spent 3 hours trying to fix it

modest vault
#

@odd arrow you have any idea about my issue? i am not able to build the apk to android

kindred zephyr
modest vault
#

do you want to build the app

#

or

#

using remote

kindred zephyr
#

I want to remote it to my phone

#

Just to see how its looking

modest vault
#

weird i was able to yesterday

#

i have a question @kindred zephyr do you have in Program Files\Unity\Hub\Editor\2019.3.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools AndroidNativeLink.xml ?

kindred zephyr
#

I am not at pc rn

#

But if i have, what should i do?

#

Or if i dont

#

I will message you tomorrow, maybe you can help me.

grizzled spire
#

Any one know of a good way to simulate wind on my own assets (not terrain) for mobile plateform ?

#

working with unity 2018.4

fast olive
#

I don’t think your phone needs to show up there for it to work, although I also had issues with the remote. I just set it to ”Any android device” and mine worked after a few tries and messing around.

#

I.E unplugging and replugging the phone and restarting the Remote App

kindred zephyr
#

I did the same..i dont know why its not working

#

I will try tomorrow again

tiny girder
#

is adb on?

command line> adb devices > do you see your device listed?

timber ether
#

is there a way to detect if the game was not installed through google play store?, i have a game that has iap (in app purchases), and with lucky patcher i can create a apk version of the app, and i would be able to buy the stuff for free, so my idea is how can i prevent that?

#

@ me if you know the answer, thank you

frozen plaza
#

anyone know a fix?

modest vault
#

download android ndk from google and link it's path

lethal gyro
#

This is in the location android studio says the sdk is installed

stuck void
#

@kindred zephyr Make sure you connect your phone before opening Unity otherwise it won't show up, so if you have Unity open then close it, connect your phone with USB with the right settings (USB debugging) and then open Unity

#

Could someone have a quick look at a small bit of code for me or just help me, I'm trying to make my character rotate through touch input which I technically have done but now ever since adding the touch input, my character won't move with the joystick as he just rotates instead, I know there's probably a simple way to fix it but I'm not sure how

lethal gyro
#

is the panel coverinf the joystick?

#

like is it on top of it on the canvas?

#

if so just move the joystick to the top

stuck void
#

The joystick is in a canvas

lethal gyro
#

yea but it needs to be on the top layer otherwise it will only take the touch input if you get me

stuck void
lethal gyro
#

hmm how does the touch input work?

stuck void
#

Shall I show you the code, the screen rotate code isn't that long

lethal gyro
#

yea

stuck void
#

Hmm seems it won't let me post it

lethal gyro
#

post a pastebin

polar leaf
#

My iOS build crashes here, while Android works fine, any idea why?

lethal gyro
#

hey I have an issue with my collider where the code says its never used and it doesnt call the function

#

im dumb fixed it

lethal gyro
#

My unity wont detect the andriod sdk even after I tried downloading it via th uniity hub it still shows that it needs to be installed

modest vault
#

if your using 2019 unity you might be facing a lot of issues with sdk that happened with me this week

#

so i'm downloading another version of unity

#

probably 2018 LTS

#

and do not install it from the hub you can try to install it from google and link it to unity

quartz kernel
#

Try and uncheck 'installed with hub' and check it again to refresh the path @lethal gyro. Or whatever the checkbox is called

lethal gyro
#

i got it sorted thanks just needed to reintall unity via the hub

kindred zephyr
#

Guys

#

Can i add every music i want to my game that is no-copyright?

quartz kernel
#

You can use royalty free music

kindred zephyr
#

thanks

frozen plaza
modest vault
#

im trying to make a game and i have no idea how to make the resolution work for any device an not make all the buttons go everywhere any suggestions?

quartz kernel
#

You want to set your canvas to scale with screen size, and anchor your buttons to the corners

modest vault
#

i've done that but now all my content is gone

#

like i wasn't using a canvas then i added one and put all my gameobjects in there and they won't appear now in scene/game view

quartz kernel
#

Look in the game view

#

or press F with the canvas selected to see the whole canvas

modest vault
#

thanks i think i got it fixed

fossil grove
#

hey i need some help with android joystick implementation

#

anyone?

fossil grove
glossy sluice
#

@fossil grove check out the virtual joysticks sample from the new input system - even if you don't use the new input system you can borrow the idea

subtle spear
#

Anyone here has experience in Distributing a Unity Game to the App Store?

west sky
#

Can we get good graphics for android? (Sorry if this is overused question)

subtle spear
#

if you polish your game and know what you are doing then yes

runic mortar
#

can someone help me make a mobile game?

glossy sluice
#

you might want to be a little more specific, are you hiring or do you have a question?

runic mortar
#

im not hiring, i just want a little help

fossil grove
#

@glossy sluice yo thanks man that helped

#

Also can anyone link me some information about optimizing games on Android ?

astral kayak
#

Hello, I'm pretty new to Unity (especially for 2d mobile games) and I wanna make a specific movement mechanic for my first game, can any body help me?

subtle spear
#

Anyone here has experience in Distributing a Unity Game to the App Store?

modest vault
#

@subtle spear i haven't tried this at all but i guess you have to make a developper account which you have to pay for then upload your game after building it same thing goes for Apple Store/Google Play

quartz kernel
#

Yes @subtle spear

kindred zephyr
#

hi guys

astral kayak
#

Can I get help with building mobile game movement mechanics? If someone can help please DM me I really need help

#

It's a 2D game

subtle spear
patent turtle
#

I've downloaded android sdk and i've switched a new unity project to IOS platform. I've also selected my phone from the dropdown list in project settings, but it won't show up on my phone even when I hit play. Does anyone know any fixes?

quartz kernel
#

Android and iOS are different operating systems

#

And it won’t show up on your phone when you press play unless you use unity remote

#

Watch an introduction video on mobile development

patent turtle
#

Yeah, I have unity remote 5 open while i press play, and unity is detecting my phone and everything

#

But when I press play nothing shows up on my phone, it just shows the screen it always shows

quartz kernel
#

Have you watched a tutorial?

patent turtle
#

Yeah I've watched a bunch of online setup tutorials

#

They all say to just open the app, connect to comp, make sure the device is selected in project settings, then run

#

I've also seen some that say you should download android sdk

#

I've tried 2 devices, neither works

quartz kernel
#

Are you on iOS though?

patent turtle
#

yeah,i have the platform on ios

patent turtle
#

Got it to work by downloading ITunes (I'm on windows)

#

that took way longer than necessary lol

deft rose
#

Question, do I need to re-work some parts of my code when exporting them to mobile? (IE: GetMouseButtonDown should be re-written to something else before exporting it as an APK)

astral kayak
#

can anybody help me here with connecting my android phone to unity (watched a couple of tutorials did exactly what I was told you know with the SDK and stuff but still wont work)

quartz kernel
#

Yes @deft rose you need to handle touch input explicitly

kindred zephyr
#

@deft rose i can help you

worthy solar
#

hi) can you help me? i create a script for 2d unity spaceshooter (code in file) but i dont want my ship teleportation to the finger tap place, because i want to control it when i touch the screen... can you help fix my code?)

glossy sluice
#

Playerprefs not working friends, what should I do?

steel pecan
#

@glossy sluice What is not working , Writing data , loading data loading after restart?

deft rose
#

@kindred zephyr Alright, where do I start? Kinda having to redo most things as the tutorial I followed is outdated with my current unity version. :x

kindred zephyr
#

@deft rose just pm me, i will explain

worthy solar
#

hi, can anyone help me to create touch control for my 2d spaceship? in Internet i not find information what i need

odd arrow
#

@worthy solar And don't cross-post

earnest violet
#

Anyone know how to add the ability to use a gyroscope as input in Unity?
I finished the roll a ball tutorial but I wanna do it with rolling the ball around with a gyroscope instead of WASD/Arrow Keys

steel pecan
earnest violet
#

Thank You 👍🏽

left wigeon
#

Can anyone help me with where can i find MK glow free asset?
(I saw a video and it was free few months back, but now its paid... and am pretty new to Unity and hence don't wanna spend)

rotund wave
#

Hi, everyone! How to check screen is dimmed? User tap to get screen brighter, and this tap go to game input

safe bison
#

Hey, anyone know a way to get the real-world azimuth, pitch, (and roll) of the device? I think it should be possible by combining readings from the compass and gyro, but I'm super bad at figuring out the math in-between, would love some help!

glossy sluice
#

@steel pecan I solved man thanks

steel pecan
glossy sluice
#

I drop the coin value in a script, save it with set and call it with get to start function. Should I lower the coin value and save it with a set while doing an operation in the script b, and call it with get in the start function of the script b? Then if it calls the coin value twice, is there no problem?

glossy sluice
#

@steel pecan Do you have any idea dude?

steel pecan
#

sorry im currently unable to understand what you like to accomplish

glossy sluice
#

Playerprefs.SetInt("coin", coin); it's for script "a"

#

PlayerPrefs.SetInt("coin",scripta.coin); it's for script b

#

Playerprefs.GetInt("coin"); I'm gonna write this script to start function in script a

#

Does it work in both?

steel pecan
#

You can write and read from the playerprefs in any script

glossy sluice
#

Yeah! Thanks for your answer...

patent turtle
#

About how many particles can most mobile platforms take? Just wanted to know so I don't add to many lol

patent turtle
#

Another question, I also want to use URP in my project in order to add 2-3 shaders that are pretty easy to make using the shader graph, can I do this? Or will this also lag on most devices?

royal merlin
#

Does anyone know how to use the new input system with touch support?

rotund wave
#

@steel pecan Thx i found this article too, but seek more universal decision for ios/android. Using timer from last anyKeyDown intuitively not the best solution

covert rampart
#

hey so my game freezes (audio stll plays) but works perfectly fine in editor

#

any way to find out whats causing it?

#

well i get this in xcode: 'MTLTextureDescriptor has width (2147483647) greater than the maximum allowed size of 16384.' where can i find this in unity? i get no errors in editor...

rotund wave
#

@covert rampart maybe, check all textures what you use in project

covert rampart
#

what would i check for though

rotund wave
#

look at their resolutions

covert rampart
#

is there an easy way to see that or do i have to go into properties for every texture?

rotund wave
covert rampart
#

@rotund wave

#

the 10.5mb one has been in my proj forever tho

#

so idk why im getting this

long kindle
#

hi guys i want to Drag and drop an object around the X and Z axis instead of the X and Y Axis with touch control ..below code but i cant figure it out. can anyone help me pls ?

balmy vine
#

Hello, i don't know how to calibrate the accelerometer

viscid flicker
#

Can anyone give me a starting point to creating a Mobile Idle Game's Tabs/Menu? All tutorials I find are for PC, and have unnecessary features I don't really need.

#

Also, will buttons work fine on mobile as they work on PC or do I need to do special tweaking to make them work on mobile?

trim ermine
#

anyone know how to get vertex lighting to work with lightmapped geometry?

#

none of the default shaders do both

#

plz @ me if ya know something

viral onyx
#

bruh

hardy relic
#

Has anyone figured out how to build for Android in 2019.3.10f1? I am unable to install the Java Development Kit through Unity Hub. Seems like this is due to a bug in Unity https://forum.unity.com/threads/setting-up-android-jdk-and-ndk-for-unity-2018-4-18f1-lts.838015/#post-5549776

trim ermine
#

odd Im using 10.f1 and had no issues building

#

still trying to figure out vertex lighting on top of lightmaps

#

if anyone knows how to do simple vertex lighting on top of a lightmapped scene hit me up plz

balmy vine
#

@trim ermine

#

sorry wrong # xd

vocal gust
#

Hello everyone!

Is there a way I can lower and/or get uniform touch sensitivity across mobile devices? I have a platformer with an on-screen joystick and jump button and I am getting differing levels of jump between my touches while using an android phone and tablet to test.

Any thoughts/ideas?

trim ermine
#

Sounds like poor implementation

#

How would a button have sensitivity?

glossy sluice
#

how can i make ai polie cars in unity that follow the player when cerstain distance and avoid obstcales smartly, etc. or where can i find a package?

vocal gust
#

@trim ermine I'm not sure. I am translating keyboard key inputs to touch screen and I'm guessing that from the time the touch signal first occurs to the time I lift my finger again, the engine registers all those signals as "touches". I am not sure.

I followed the "Touch Controls in Unity" tutorial from Brackeys

trim ermine
#

I mean that sounds like extra poor implementation lol

#

most people track multiple touches and fire events on touch start and touch end

#

no matter whats going on a button shouldnt fire over and over unless you coded it that way

#

which would be an odd thing to do

vocal gust
#

ok, i'll look into the touch start and touch end functionality and see what i can do

#

thank you

#

@trim ermine

trim ermine
#

🤘

gusty radish
#

hi

#

did anyone here integrate a mobile unity game with firebase before?

grand dove
#

Hey guys, my app is currently using unity ads, everything works fine.
Iv'e just downloaded AdMob from google, imported to my project and simply added a script as follows -

public class AdMob : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        //Initialize admob
        MobileAds.Initialize(initStatus => { });
    }
}

After doing that the build just breaks (I can debug fine), the error that is thrown is -
CommandInvokationFailure: Gradle build failed.

Would love some pointers, thanks

grand dove
#

Duplicate class - android.support.customtabs.ICustomTabsCallback ?

latent osprey
#

@vocal gust it sounds like you are using screen space measurements for an on screen joystick, when you should probably be using physical coordinates

#

oh

#

nevermind

#

@grand dove it sounds like you didn't import everything correctly, e.g. the android library part of the admob sdk

grand dove
#

hmm, I'll try to remove and re import the admob sdk and post back.
thanks

grand dove
#

@latent osprey
Hey mate, so just to make sure Iv'e reverted back to an older working version.
I even removed UnityAds plugin just in case it might cause some duplications.

I followed the get-started guide of google admobs and after importing and resolving the library this is the error I get -

#

any ideas?

latent osprey
#

i guess remove one of the copies of the DLL

#

like it's saying to

grand dove
#

like is it common approach in unity lol?
shouldn't packages work from the get go?

#

I guess the MDB file is different?
so I should just delete the DLL and meta combo from on of the folders?

glossy sluice
#

Hi

#

How I can public my game in app store? Any tutorial??

vocal gust
#

@latent osprey ok, I will research this further. thank you

grand dove
#

Hey guys, kind a confused on how admob mediation works.
so far I simply had an adUnit in admob that Iv'e showed on my app, now Iv'e configured a mediation group so I can show both admob and unity ads.
But how do I actually load the mediation group ads in my app? it doesn't have an adId or anything like that, it seems like admob API only supports loading single ads ?

short barn
#

hey, have a question for those who's working on mobile game dev. in the ballpark, how much your first game made with ads in the first month after launch?! kinda want to compare.

uncut lark
balmy vine
grand dove
#

@balmy vine
Im still confused mate .. saw the video, followed the steps which basically explained how to configure mediation in admob dashboard.
and regarding the code it only said to import this package - https://bintray.com/google/mobile-ads-adapters-unity/GoogleMobileAdsUnityAdsMediation#files (which I did).
But it doesn't say how I actually make use of the mediation.
For example instead of loading a speicific RewardedAd by its AdUnitId. how do I load a mediation group? so it will also load unity ads?

kindred stag
#

it will be loaded automatically, as long you have the mediation sdk for the other ads

#

you should set what mediation you are using on the admob dashboard

grand dove
#

Forgive my repetetive question ... just trying to be sure. here is how I currently show an Ad on my app -

        string adUnitId = "ca-app-pub-{adId}";
        rewardedAd = new RewardedAd(adUnitId);

        rewardedAd.OnUserEarnedReward += HandleUserEarnedReward;
        rewardedAd.OnAdClosed += HandleRewardedAdClosed;

        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();

        // Load the rewarded ad with the request.
        rewardedAd.LoadAd(request);

The above loads a specific rewardedAd to my app.

Iv'e now configured a mediation group for rewarded ad in my google admob dashboard, and configured both the ad above and another one from unity ads.
Do leaving the code as is will trigger the mediation group and show unity ads as well? (even tho I specifically request for an ad and not referring anything to the mediation group?)

#

how does it even know to use the mediation group ?

#

@kindred stag ty!

kindred stag
#

yep, as long as you set up the mediation correctly, the ads id, the app data. admob will handle the rest

#

but keep in mind that, admob will become priority

grand dove
#

Yeah sounds good, I dont mind admob being a priority.
Just still can't confused why admob would choose to use the mediation if my code above requests a speicifc ad lol...
Weird they havent made a way to load a mediation group instead.

#

ty gyan!

kindred stag
#

well, there's some condition, e.g there's no fill rate from admob, or maybe other ads have better revenue

#

if that condition were true, admob will load the ads from other provider

grand dove
#

As in - legally

kindred stag
#

not yet, i just add a privacy policy for user to read before they play the game

grand dove
#

👍

kindred stag
#

to be honest, i didnt know google had sdk for that, lol

#

have you implemented it?

grand dove
#

on it now, I'll let you know mate.
looks easy just trying to figure out how to import the actual package as its not a unity package as is.
But seems like you just load the form, and they know to do it for each user once per app (getting his consent)

kindred stag
#

nice, will try to use it on my next game if it easy enough to implement

#

thanks @grand dove

forest token
#

Hello, I've been trying to implement AdMob to just a basic testing project (press button recieve test ad) but have been running into a few issues. After importing the plugin from https://github.com/googleads/googleads-mobile-unity/releases/tag/v5.1.0, and running the resolver, I try to make a script referencing GoogleMobileAds.api but visual studio does not recognize it when trying "using GoogleMobileAds.Api;" . Has anyone ran into this? I'm new to Unity and Visual Studio, any help is greatly appreciated

chrome haven
#

how to make random ads appear?

tribal totem
#

Hello guys

#

Has anyone here ever used Xcode?!

pseudo notch
#

Hello everyone, I'm trying to make a java library via Android Studio. When I stay in android studio, I make an application, I generate an apk file with a manifest file configure for an API via (sdk osmi dji) it works perfectly. What I am trying to do is a library in android studio to output a .aar file and in unity3d use the plugin. I manage to communicate without worries if I make a simple class with string functions with return values. But when I try to adapt the project, I do not know if already to start I have to put the info of the manifesto with notably my API key in the library in android studio or else to make a custom manifest file in UNITY 3D. Good day to you.

#

sorry for my rough english, i'm french.

glossy sluice
#

how can i make a media player when the person playing clickes on it it asks to let access to their music library and it plays their music
shuffles
or is their a asset from the store?
i would like to integrate that

tawdry arrow
#

Has anyone used Unity's Mobile Notifications package?

sinful light
#

@pseudo notch that’s incredible English

pseudo notch
#

Have you ever worked with Android Studio + Unity3D?

#

@sinful light

sinful light
#

No not yet

#

But hoping to soon

safe bison
#

Anybody know if WebCamTexture's terrible performance is fixable? It has such abysmal framerate unless I pass it an unacceptably low resolution.
Even better if there is some better way to access the camera? (mostly looking for preview, not taking pictures or videos)

quartz kernel
#

Might be worth looking at the code inside ARFoundation to see how Unity does it @safe bison

safe bison
#

Yeah considering doing that but it seemed kinda intimidating, but if there are no other options I'll prolly do it

glossy sluice
#

How do I save My Instantiated object? I just want see my instantiated object when I turn back to game.

past tinsel
#

Wait unity works with Android studio.....HOWWWW

pseudo notch
#

@past tinsel you can create a librairy in android studio and plug with unity3d

#

.arr or .java to unity 3d

safe bison
#

that probably means it won't work for an iOS build, right? @pseudo notch

#

just curious

pseudo notch
#

Android studio it's just android but is there a ios plugin ? I don't know.

robust hamlet
#

@safe bison Yes, they are different OS's, different API's and etc

worthy solar
#

hi! can anyone help?) i make joystick, but dont know why, it has interpretive control, for example, i move joystick down, my pers go up, etc...

long kindle
#

hi.. i need to ask something about itween rotate plugin

covert marsh
#

So how useful is the button on a UI layer for Axis Inputs? Can it be used as a D-pad? 4 seperate buttons, 4 different event triggers and in the button handler script just have a getAxis.Input ?

sick minnow
#

when i set my audio settings to best latency, the build my project and run it on android, all the sounds are laggy and dragged out

#

why is this

#

how do i fix it

half lodge
#

Hey I'm having a bit of an issue with Screen.orientation? I have this class on a button in scene 1. The intention is its a mobile app, so scene 1 is set to portrait by default, and on click of the button scene 2 will open and it will set the orientation to landscape. But theres a really long delay on it - it'll change scene 1 to landscape, then change scene to scene two... anyone got any ideas?

    public void sceneLoader()
    {
        SceneManager.LoadScene(sceneName);
        Screen.orientation = ScreenOrientation.LandscapeLeft;
    }```
worthy solar
#

anyone know how to create shoot button for 2d project? or maybe you have a link to good lessons?

languid zephyr
#

When i try to build android it says select SDK folder.Anyone can solve this?Meanwhile i use unity 5

vast elm
#

have u downloaded Android SDK yet ?

languid zephyr
#

no

#

but i use 32bit computer

#

i cant download it

steel pecan
#

without android sdk not andorid build

languid zephyr
#

After download what i must do?

#

I asked my friend to download it and we will do it with collab

quartz kernel
#

There are plenty of tutorials on this subject

tribal totem
#

Hello guys can someone help me with my canes script pls!!!!

#

It keeps rotating

fast olive
#

Has anyone used the Google Play Games services Achievements system? In my game I put 3 achievements for killing enemies. So I have "kill 100", "kill 500" and "kill 1000". Whats the best practice to report the increments to the server? I tried sending the 3 increments all in one method but not only does it look bad but it also wont give me that unlock when I reach 100 kills. it just stays at 99 and increments the others.

#

This is what I have (not working), i set the increment to 10 for testing and it gets stuck on 90%. I tried commenting out the two bottom lines and that seemed to do it.

languid zephyr
#

@quartz kernel I know but most of them are different and i don`t know which is correct

quaint gazelle
#

Hello guys! I have a question : does unity right now support System.Drawing.dll for mobile devices? On my side is said that : "unable to find gdiplus", but both dlls are in project over Plugins folder.

ruby siren
#

@quaint gazelle no, it don't support

quaint gazelle
#

damn, I have designed to work with it 😦

sacred goblet
#

Hello

prime hare
#

can anyone help me with player preffs?

warm adder
#

With what exactly?

bleak sable
#

Can I ask about building android game here? I have an error everytime I tried to build it.

odd arrow
#

That's the place to ask. Build errors could be quite obscure though. It's better to search them first.

bleak sable
#

I've tried but no real answer come up.

#

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) that's my problem

quartz kernel
#

That's not the whole error @bleak sable

#

Can you screenshot the console

bleak sable
#

I've fixed this error Assets\Script\mainmenu.cs(17,9): error CS0234: The type or namespace name 'EditorApplication' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

#

but it always comes up on the console

quartz kernel
#

Your editor scripts need to be inside a folder named 'Editor'

#

@bleak sable

bleak sable
#

Your editor scripts need to be inside a folder named 'Editor'
@quartz kernel Can you explain it a bit more?

quartz kernel
#

You can not use 'using UnityEditor' in any script that is going to be used in the game

#

UnityEditor is not a part of the built game

#

So you'll need to either move the whole script or remove the parts that refer to UnityEditor

bleak sable
#

So you'll need to either move the whole script or remove the parts that refer to UnityEditor
@quartz kernel I've changed the script so there's no reference to UnityEditor

silent ferry
#

Hi there! Could anyone shed any light on the oldest version of Unity that's still viable for building projects that will pass Apple's basic technical requirements (iOS) now? Can I still go back to 5.x? I have an old but rather large 4.x project that I'd like to bring back to life, but it's full of 2013-era NGUI, MegaFiers, particle emitters, etc. etc. So I'd rather try the approach of 'nursing' the project incrementally up through Unity versions until I get to one that will build to Apple's basic 2020 needs.

hazy kiln
#

Guys, Is there any formal way that I can test iOS build from unity directly in an iPhone

quartz kernel
#

Yes with unity remote @hazy kiln

hazy kiln
#

@quartz kernel , Yeah I found that. But still I can't make an iOS build without having a Mac. Anyway Thank you for replying ◕‿◕

quartz kernel
#

You can run remote from windows

#

But yeah need a mac to build

hazy kiln
#

Yeah exactly that's what the problem is. X Code didn't have a windows version ,right?

quartz kernel
#

Correct

glossy sluice
#

Hey, can you make it so when you tilt your phone your object moves, or can you make it so you have jump on the bottom and right and left above so it moves

quartz kernel
#

yes, look up how to use the gyroscope @glossy sluice

glossy sluice
#

Okay, will do

#

thanks 🙂

#

and which one does that apply for

#

tilt or buttons

quartz kernel
#

tilt

#

And simple enough to do touch interactions like that, you just assign a max distance and calculate the distance between the touch and the corner

glossy sluice
#

Alright, thanks 🙂

#

@quartz kernel Just wondering, does it make any diffrence to have the gyro in a new script or do you have to have it in your current one

quartz kernel
#

It's up to you how you wanna structure it

glossy sluice
#

But can you have it in a diffrent one

quartz kernel
#

Yes

#

But if you have several inputs influencing the same object you might want to keep them in a single script

glossy sluice
#

@quartz kernel But this seems like a world rotation, the idea is that the ball should turn smoothly right/left when i tilt

#

Is that gyro

quartz kernel
#

the gyro returns the real world attitude of your device, it's not related to game space at all

small hull
#

How do you guys go around resolution scaling for mobile? 😄

glossy sluice
#

@quartz kernel Then you misunderstood what I meant

quartz kernel
#

? you want to move your object based on how you're tilting your phone?

#

The gyroscope just gives you the raw data

#

It's up to you how you translate that into gameplay

glossy sluice
#

Either moving my ball by tilt or moving it with buttons

glossy sluice
#

Anybody got a clue on why doesn't work, the ball is supposed to move when I swipe my finger

latent osprey
#

@glossy sluice there's a lot going on there that is wrong, maybe start with a tutorial

#

i would recommend ray wenderlich's

#

@small hull you can use the physical canvas scaler for UGUI and a nice camera package like ProCamera for sprites and 3D. test with the Unity Device Simulator package

#

@silent ferry you'll be seeking the oldest unity that supports Xcode 11 and il2cpp

sick minnow
#

why is my second material on my gameobject not showing up on android?

graceful reef
#

visual studio still marks code with the #if UNITY_EDITOR tag as active even immediately after i build my project for Android. has any one else had this problem before

quaint gazelle
#

Hey! Any can help me with SWIFT_VERSION for unity project? I can't find it in Xcode at all

glossy sluice
#

Hey, can anyone help me with movement thru finger swiping, meaning my ball moves to the left when I swipe left etc

granite valley
#

hey, trying to implement double Tap

#
foreach(var touch in Input.touches)
        {
            //if(touch.tapCount == 1)
            //{
            //    StartCoroutine(StartTappTime());
            //}
            if(touch.tapCount == 2)
            {
                Tapposition = touch.position;
                ScreenTapped();
            }
        }
#

this is in my Update function

#

but somehow it runs the function everytime I tap the screen (even if it is only one time) but sets the Tapposition only on double tap

latent osprey
#

@glossy sluice you should really use eventsystem or the new inputsystem for things that are more gestural

#

@granite valley EventSystem supports double clicking/tapping, maybe that would be more helpful to you

glossy sluice
#

Whats the new input system

#

This is my code, if you would wanna take a look and have suggestions

#

It runs with no error but doesn't do anything when I swipe etc

latent osprey
#

there's a lot of details with a swiping behaviour

#

and there are many ways to tackle the problem

#

abstractly, you're trying to convert a sequence/stream of pointer positions over time into a single "swipe" event

#

if you draw out on a piece of paper finger positions and times, you'll have an easier time visualizing the "when" and the "direction of swipe"

glossy sluice
#

How do you suggest I do this?

latent osprey
#

you can even do it in 1 space dimension for now, like X, so that you can just plot pointer position as a function of time for different swipe positions

#

i would use UniRx, but it's something i'm more familiar with

#

it might be easier to just reinvent that particular part of unirx

#

you can also just use drag events

glossy sluice
#

Sorry but Im actually like jsut new to coding

latent osprey
#

usually, in mobile games, the swipe is fired before you lift your finger off

glossy sluice
#

I've played with Unity for 1 week, so I don't really understand

latent osprey
#

most of the problems you're going to run into isn't from the code, but understanding the behaviour

#

yeah

#

you should probably get an asset store package for this

glossy sluice
#

Yes ik I should but at the same time I wanna learn

#

Do you think I should remove "touches" and type GetTouch instead

latent osprey
#

okay, then first find a game that has a good swipe behavior

#

on your phone

glossy sluice
#

Already do

latent osprey
#

and record, with a different camera, exactly what happens as you swipe

glossy sluice
#

But how do I get that into my game, there's my problem

latent osprey
#

unfortunately i can't help you with that

glossy sluice
#

Alright, thanks anyways 🙂

latent osprey
#

i think the code you posted is alright, and if you try to solve 1 dimension first, you'll have an easier time understanding what is wrong

#

generally, you are mixing mouse buttons with touches, which doesn't work

#

you're setting a state, "swipeUp", for example, when really a swipe up is an event, it happens once

#

rather than being continuously true for many frames

#

so there's a mix of code issues and objectives issues

open grove
#

I have a terrain 3000x3000 and I get massive frame drop when I look at him how to optimize that?

glossy sluice
golden remnant
#

hey there! anyboy got some tips about making a button show a message box?

open grove
#

You mean a button show message after tap this?

#

Search in Google

open mist
#

When i try to Upload my game to google play console, i cant Roll out because I am apparently not supporting 64bit.
How do I solve that?

warm adder
#

In PlayerSettings in Configuration you have to switch Scripting Backend to IL2CPP and then in Target Architectures select ARM64

#

Also not sure if it still works like this but there was something wrong and Google Play was saying build is not supporting 64 bit even if ARM64 was selected. In that case try deselecting x86 in Target Architectures.

stuck void
#

Does anyone know any tutorials for setting up a combat system for mobiles? I've been trying for a while but can't seem to get it right and I can't find any tutorials online for mobile combat

open mist
#

thx Molioo that fixed it. I was already using IL2CPP, but didn't know there was an architecture selection

warm adder
#

Np. I had the same problem some time ago 😉

tulip grail
#

@Molioo that advice is correct, but more specifically, is that Google expects 64bit versions. So you need ARM64, but Unity does not support 64bit for Intel Android devices. As such, if you add x86 to the build, Google expects x64 to also be present. But since Unity decided to not support that (I guess they didn't get money from intel recently?), you can't upload just x86 to Google Play.

lyric path
#

Is it just me or is the performance on mobile so bad

#

I tried every thing

fossil cedar
#

what mobile device do you have? @lyric path

glossy sluice
#

@lyric path IF you mean that Unity Remote 5 is laggy, it is for everyone

open grove
#

Why when I look at terrain (his empty) they make frame drop?

open grove
#

Help me

robust hamlet
#

Performance on mobile is bad if you don't know what you are doing. There are so many articles and talks especially for Unity what you should consider while developing for mobile and how you can optimize your code, assets and etc so it can run much faster even on low end mobile devices

#

Without looking deeper on code, assets, implementation and etc it's really hard to know what cause a bad performance on mobile

#

Most of the time it's a combination from bad code and bad asset management

hazy heart
#

If i forgot to check the ADS button in the services menu, but my game is still showing ads. Will I still get money from those ads?

#

Also how long does it take for revenue to show up in the dashboard?

fluid gazelle
#

revenue takes 1 day to show up

hazy heart
#

Thanks!

#

i see now it's under unpaid earnings

leaden crater
#

anyone know anything about optimisation for mobile? Well optimisation in general tbh, i havent rly dealt with it before. Apparently the renderer is taking up 77ms and gfxDeviceVK.syncSubmission is taking up most of this. Tried googling it but couldnt really find much. There are only 8 batches, 8 draw calls, 5k verts, 1k tris which i would have thought would be fine for mobile but maybe im wrong?

#

im very new to developing for mobile and actually optimising stuff so ive not much clue really

open grove
#

@robust hamlet I find post about my problem the problem with lagging terrain is in unity and I must to convert a terrain to mesh it's true?

reef stratus
chrome haven
#
UnityEngine.Advertisements.Advertisement:Initialize(String, Boolean)```
 This problem affects with something????
chilly folio
#

Hi guys ! Does anyone know what is causing crashes on my phone when I try to change my scene ? It works perfectly on my computer

warm adder
#

@chilly folio you can check your game logs in Android Logcat, maybe you'll find there some errors causing those crashes.

swift quartz
#

Can someone make me controls for IOS and Android because currently I have just for PC

#

If you can DM me and I will explain the controls I need

half plover
#

hi

#

who know how to fix it?

chilly folio
#

@chilly folio you can check your game logs in Android Logcat, maybe you'll find there some errors causing those crashes.
@warm adder Yeaaaah ! Thanks ! It helps me ! The problem came from a nullpointer, does anyone encounter this problem ?

warm adder
#

Well it's pretty common, it means you are trying to use something and that something is null, so it's not assigned or destroyed. You should check the script and function where this error occurs and try to find what can be null there.

chilly folio
#

Actually, it's not a normal nullpoint, I've got a "Error CRASH Cause: null pointer dereference". I understand for the nullpoint but what does the dereference means ? @warm adder

warm adder
#

Hm, didn't have that one. Are there any more messages below this? Maybe some with you classes mentioned in backtrace?

chilly folio
viscid flicker
#

How can I make the screen fit into all types of mobile devices?

lyric path
#

If you are making a mobile game

#

The one simple step literally will solve all the fps problems

#

I don't know why not a single person mentioned this

#

compress all your sprites to 0 quality

#

and set size to max

uncut lark
#

Hello, i am making endless runner. How can i render straight line to be curve? So what i want to do is render straight road to look like curve.

cunning harbor
#

oh just saw this chat

glossy sluice
#

hi i am wondering if there is a way to set a universal position of an object bc of 2d

hardy fractal
#

So I posted my game on Google Play store

#

It was on top when I searched its name(cause on other app had the same name)

#

But now when I search it it's not showing up...

#

Even if I scorl really down

#

The game is still posted as I can see it frm my publishing account

#

Anyone know how to resolve this ??

bright mica
#

Try to change the name of the game to something else...

hardy fractal
#

Why would that help ??

tulip grail
#

Is the name something really common?

#

Also some times it takes a while for Google to add things to its index

#

Also, I think Google Play hides results of games that are not popular. So unless you have a decent amount of purchases/downloads, I think it's going to be hard for your game to appear in results.

latent osprey
#

@half plover use UnityWebRequest instead of a java plugin to interact with a REST API

#

@chilly folio you have a regular old error that will show up in the editor, mind your exceptions

#

@leaden crater set your Application.frameRate to 60 and turn off vsync on Android

chilly folio
#

@chilly folio you have a regular old error that will show up in the editor, mind your exceptions
@latent osprey Thanks for the answer ! My error came for a world anchor that appeared in a gameobject. On my pc, I didn't have any errors. Only on my phone.
Finally, I have my happy ending ! Thanks for the help !

uncut lark
#

How much draw calls should be my limit for mobile games?

#

When i can say that i am happy with my draw calls?

flint jetty
#

Hey does anyone know why when I download a game from the google play store and install it, it comes with a save file

#

I have tried clearing my games data manually but every time I download a fresh install from the play store it comes with an old save file, It does not use google play games either

#

I'm just using persistent data path

sharp salmon
#

Can you please help me? Can't run my game on iOS anymore. After unity's splash screen it's just a black screen and a message in the log

Unbalanced calls to begin/end appearance transitions for <SplashScreenController: 0x105b06090>.

What could it be?

open mist
#

Following issue: i am using unity's IAP system to allow ingame purchases from google play. In the Editor it works (obviously cause unity mocks them in there to always work). I created an internal test release and used the internal test Download to get the app.
But for some reason its not opening the google play in app purchase screen... what could i have done wrong?