#📱┃mobile
1 messages · Page 40 of 1
Nah the assembly is just TagLib
From what I can tel
Might be TagLib-Sharp
Try TagLib first
<assembly fullname="TagLib">
<type fullname="TagLib.Riff.File" preserve="all"/>
</assembly>
this?
can assembly and namespace match?
The namespace is TagLib
If that doesn’t work
Just make it Riff.File
For the type
Looking at the system.core example im not sure
don't know what it is. Let me google a bit
Whatever full name you have to type without a using at the top
Is what the type name should be
understood. Than it should e TagLib.File, bit in the console it referred as TagLib.Riff.File
man, I'm confused 
Maybe the assembly name is TagLib.Riff
But that is weird
Try the other one first
Or just send me the dll
Text is like the worst troubleshooting medium
😞
So I tried to putt in the linkxml all kinds of combinations I could imagine
<linker>
<assembly fullname="TagLib">
<type fullname="TagLib.Riff.File" preserve="all"/>
</assembly>
<assembly fullname="TagLib.Riff">
<type fullname="TagLib.Riff.File" preserve="all"/>
</assembly>
<assembly fullname="TagLib.Riff">
<type fullname="TagLib.File" preserve="all"/>
</assembly>
<assembly fullname="TagLib">
<type fullname="TagLib.File" preserve="all"/>
</assembly>
</linker>
and still no success
If you dm me the dll I can get it working
the buld, I'm debugging with adb shell
Ok send me
sory can i get some help
?
when i try to build my game for android obb
after a few seconds
after build
those errors pop up
and i select byild and run tool
@neon thicket
sory again for pining u
but i need some help with some errors
why these arrors are occuring ?
Don't ping people randomly
You haven't shared the full error, there is not enough info in those images
Open the editor log and share the full stacktrace of the error
my app on google play is targeting users of all ages, thus **Admob **ads must adhere to the Family Policy.
Should I set both SetTagForUnderAgeOfConsent() and SetTagForChildDirectedTreatment() to true?
Currently I'm initializing ads the following way:
private void Initialize()
{
if (_initialized) return;
RequestConfiguration requestConfiguration = new RequestConfiguration.Builder()
.SetTagForUnderAgeOfConsent(TagForUnderAgeOfConsent.True)
.SetTagForChildDirectedTreatment(TagForChildDirectedTreatment.True)
.build();
MobileAds.SetRequestConfiguration(requestConfiguration);
MobileAds.Initialize(initStatus => { _initialized = true; });
}
Is it the correct way to initialize ads?
I just want to be extra careful and don't violate admob policies. The ads implemented the way described above don't show up on real devices (I tried on several), but work in the Edtior with test ads.
Cant be because newest android OS API level is 11
you're confusing api level with OS version
Android 11 has api level 30
But I was asking about the minimum API level, not the target.
@tough estuary
Min api level same as yours and automatic:highest installed on target api level
Well, mine is 19, but your error was talking about 24(if I remember correctly)
It was right in front of me lol
It fixed it
But now i got a new error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':launcher:checkDebugDuplicateClasses'.
Looks like a resolution error
java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules androidx.core.core-1.2.0-runtime.jar (:androidx.core.core-1.2.0:) and support-compat-25.1.0-runtime.jar (:support-compat-25.1.0:)
Is this a common error when compiling to android?
Hey! Please help. On my game if you just installed or updated it and you make an IAP, it doesn't reward you but charges the money. But if you restart the app it works. It's
It's the same on the editor
On it.
Add debugs to your code. Where do you reward the player?
Add debugs and test on the device
I added debugs on everything, at the end OnPurchaseComplete method doesnt even get called
What about where you make the purchase request?
So 2 different packages use .jar files that have duplicate classes. I've tried to delete the .jar file in firebase but it get's reproduced upon the build process. How do you resolve this dependency conflict?
I didn't he helped me yesterday
What's the other conflicting package?
in gradle
you exclude the duplicate dependency from one of the dependencies
probably need a custom build.gradle file
Hello folks, why is this happening?, the SDK is installed but unity can't detect it!, I didn't restart the PC btw just in case it maybe the reason so
@digital steeple Installing Android build support through Beta Hub had similar problems for me. Use Production Hub or reinstall editor without components, then add them one by one. Seems to be the solution with Beta.
ok will check it now, thank you
I am sure there are, but what is your question? 😉
I'm Getting lots of Errors when I'm trying to add Ads in my game and when I solved that I got Errors while building the game
Some Help would be Appreciated
You gotta tell us your errors and also if you have any scripts that get pointed at from the errors
I'm getting Error from AudianceNetworkAds Scripts
Do you have any Video or Documentation which I can read
and do it step by step
?
You got those installed, right?
Yes
And what errors do you get then?
Phew okay, manifest things going on
Is your SDK/NDK up to date ?
You might try out updating gradle too
For testing I would install another version of Unity, newer one, backup my project and open it with the new one and test to build.
Yes
How do I do that?
Okk, i'll try that
Try the newer version first. some 2020 version might work or the latest 2019, 2021 is still beta, so I wont trust that yet I think 😄
Hello I have A problam with my sdk and do not know hot to fix it I am struggling since 2 days
I can not build it
by activating sdk I get that error at the force resolve
is it possible to downgrade from unity 2021 to unity 2020 without data loss?
I already made backups from my scenes
Data loss won't happen from a downgrade. But you'll need to deal with any packages which are suddenly non-existent, if you're using 2021 versions.
You should be backing your project up with source control though.
how can i make a complete backup?
Source control. Git for example.
You can make free 10gig repos on gitlab.com
Alternatively, you could try using Unity's collaborate. It's their built in version control.
google github tutorial, everything you put in that folder then will be tracked and you push and pull your state to backup any new verison of a file you create.
in which folder? if I google github tutorial there are comming tutorials to start with github
yeah, you should start with github and watch some tutorial, so you know what you are doing.
How can I upload more than 100 files because i have way more than 100
how do you think there is a 100 file limit?
Where did you get that from?
well honestly I never had that issue, but usually I create the repo at the start of the project
I am looking for a tutorial its ok I will tell you if I have more problams
I mean you could just add 100 files at a time, dont know how many you have got, but if you pushing a unity project, use a git ignore file to leave out the library folder for example, which will help a lot
I do not even know if I will downgrade my Unity because i have problams with my sdk and evey tutorial on downgrading unity told me nothing about sdk bugs so I will try to fix it in unity 2021 first and if that realy does not work I will try to downgrade
Oh realy
here
ohhh okay, did not se ethat, sorry. Well, jumping between versions with year difference can always be a problem, try to avoid
yeah but i am fighting with that sdks and nobody was able to help me
I think I tried 90 % from every possible fixes and nothing worked
well, cant tell you much about 2021, as its beta I think, so bugs can happen for sure. So just for the sake of testing, you could just copy yoiur whole project folder to a new place, open that with another version of unity, like 2020, and just see what happens, if its broken, delete the new folder and try again.
ok I will do that thx
still the same errors
the game works fine but it did not fix anything
well there is a n error with that groovy reflection whatever thi sis
maybe try this
I update my jdk and it works now but why has jdk a impackt du sdk?
It all works together, but tbh, I cant tell you all the relations inside
Ok nevermind it did not work
the last step failed i thought it made it over the sdk part so it must work how can i be that wrong 😭
Ok that shit is like completly random sometimes it works sometimes it does not i tried with the 2021 version did not work there I do not know what to do anymore
Clean up the project, remove the library folder and let unity regenerate it, maybe there are some flaws due the project span
It may work now but I do not know I will try taht
the build worked now I do not know why but I will sell my pc now XD 😉
thx for the help
How do i go on about that?
Firebase and mapbox are using same classes
so maybe google about a conflict between them. I bet you're not the first one who encountered it.
I have googled it. Obviously have to change the config file that fetches dependencies manually but not in need of compiling to android right now so postponing it until then.
Has anyone here ever hooked up custom events for their mobile game for event tracking on a platform like AppMetrica?
I'm not a coder and developed my game entirely in Playmaker, but now it's time to get into a bit of code and hookup two simple analytics events for "level_start" and "level_finish". AppMetrica provide the API on how to do it, I just don't know where to start. 😦
Is this normal? I limited the FPS to 60, it's usually around 55-60, but sometimes it drops to 30 and jumps to 80 for a second.
Also when I open the inventory (consisting of three images) the FPS drops to 40-50. I compressed the images and split my UI into multiple canvases, but inventory FPS remains the same no matter what lol
P.S I'm using the Universal Render Pipeline, my scene consists only of the ground, background image, player with a rigidbody, and a 2D global light - is it normal that my FPS is jumping and dropping so much randomly?
it can sometimes hang and freeze of you instantiate a lot of memory heavy stuff or if you eat up a lot of memory with some weird setting. Also your machine of course can limit your project as well as being assure, that the editor will run slower then the build later
Hey!
I just made an ad system
but it always says that the ads arent ready
if I try it out
this is the code
a powerful website for storing and sharing text and code snippets. completely free and open source.
everytime I click on play it instantly puts adsareready like 3 times
and if I click on the button it just says that the ads arent
does anyone have any pointers on recording gameplay in android
trying to build a replay system that records your death and you can replay that
I am not instantiating anymore. I know I posted that code where I was instantiating three objects and destroying them in a single frame, but I watched the object pooling tutorial and rewrote my code. I don't know what else could be causing the issue as I have a similar version of the game where, on top of everything I mentioned here, I also have NPCs spawning in and moving around, and the game works at a solid 60FPS at all times.
no FPS drops, and no sudden FPS jumps to above 60, it's always at 60 which is weird
the only difference between that "old" version and this new one I am doing is the fact that I am using Universal Render Pipeline on the new one with some 2D lights, but surely it shouldn't be the reason my game is performing worse on mobile?
Not an expert in mobile dev but the new Unity pipelines are still lacking stability.
A weird behavior on mobile could totally be induced by the pipeline change.
I'll try to switch back to the default if possible and see how it works out. Thanks! 🙂
Can anyone tell me what the problem is?
Or need more data ?
Well tell me at least the best version of unity for android development
Vsync or target frame rate. And it's not really a problem. More of a benefit. What CPU time do you get per frame?
Or fps
18 ms
18? You sure it's not 16.6?
sry
And basically, this operation (Gfx.WaitForPresent) eats up resources: 100 batches , 100 k polygons and 30 fps, and the phone is not the worst, rather average and pulls a lot of different projects at 60 fps
the default target framerate on most mobile devices is 30 fps
it's kind of an industry standard
same as consoles
that's why you get 30 fps(16.6 ms) and the Gfx.WaitForPresent is part of the process.
I also don't quite understand why the engine can't draw all these objects in one batch one material is enabled gpu instance, Or is it impossible?
What objects are you talking about?@swift dew
the characters?
You can use the frame debugger to see why they don't batch
I'll take a good look, if I don't find it, I'll ask where exactly to look why.
hey does anyone know a good asset I can grab that has mobile controls like joystick and button? prefer free or under 20$
Problem: the game kinda "switches" between running at 30FPS and 60FPS at random times on mobile. On PC it is always at 60FPS.
**Things I tried: ** in the 'Quality' settings I set vSync count to "Every V Blank", but I got a warning that said vSync Count will be ignored on Android, so I just switched back to "Don't Sync".
In the scene I added an empty GameObject with a script on it which has this code:
void Start()
{
Application.targetFrameRate = 60;
}
None of these things worked, does anyone have any other tips on how do I make the game run in 60FPS rather than it switching between 60 and 30?
Note: it is literally only 30 and 60 FPS, it never goes between those two numbers. 
P.S. when I disable the Application.targetFrameRate code and build the game, it's just locked at 30FPS and stays that way without a single frame drop.
I'm on Unity 2021.1.17f1.
Here's a screenshot of the profiler when the game is switching between 30 and 60 FPS, I have no idea what causes this. I hope it is not that the game is badly optimized as I don't have many objects in my scene and it's a 2D game.
I recommend to turn one deep profile, and select an area of 30 fps, go item by item trying to understand which parts for the project is actually causing this drop, based on the graph it is something rendering and not code.
Also, it seems to be really constant, maybe there is a behaviour in your game in the same frequency that turns on and off any graphics. Also, since it is a 2D game, it is full of textures, try to keep them as low resolution as possible, if you select the Sprite on Project View you can see in inspector it's size. Try to keep them as low as possible and in power of 2 values (even if it's bigger, it is better for compression).
Alright, thanks.
I'll resize all my textures to be power of 2 values now, luckily I don't have too many of them yet 😄
I just thought it was weird because prior to updating Unity my game's FPS would be between 50 and 60, but it would often drop to 30 for a sec and then jump back to 60. Now, after updating it only flips between 30 and 60 so I just found it weird.
Also my inventory system which I mentioned in one of my messages above, before updating Unity my FPS would drop by 5-15 when I'd open the inventory, but now it seems that there is no FPS drop at all when it's open.
Just odd I guess.
How are you tracking the fps anyway?
note that you shouldn't rely on fps for optimizations, as it will average for several frames. What you want to look at is the cpu time each frame.
If you're looking at the stats window in the game view, then you should know that it's imprecise and can only give a general overview of performance
float FPS = (1 / Time.unscaledDeltaTime)
I found that code somewhere and used it to count the FPS, don't know how precise it is tbh
It's basically the reverse of cpu time. You could just use profiler instead and see way more useful info.
Alright, I'll try.
Which compression method should I set for my textures to get the best performance on mobile?
I use automatic + 50% crunch.
But compression would only help if you have memory issues
Start from analyzing your profiler data and finding the bottleneck.
Sure, thanks 🙂
CPU time is between 28 and 35 ms each frame on average, sometimes it spikes to 47ms
do you want a screenshot of the profiler?
Sure, just paste it.
P.S. there are some random spikes where the CPU time is above 100ms it wasn't happening before I turned on the profiler though so idk if profiler has any impact on performance
Here's an example where it's 30ms
Rendering takes a lot of time. You must be rendering a lot of huge and unoptimized stuff.
There's something on the input too, but handle the rendering first
Using post processing?
I didn't adjust any post processing settings to be honest
But are you using it or not?
I'm using URP btw and just saw that the "Post processing" checkbox was enabled, and the profile was set to some profile that came with URP.
I'll just disable that.
Should I adjust anything here too?
Disabling it would be enough.
Okay, thanks. Time to check it out.
that's not gonna be enough probably
@mossy ice also, disable deep profiling the next time you take a screenshot.
I hope so, and if it does fix my performance, I'll be sad because it'll turn out that a simple checkbox could've fixed it 😛
Alright, sure.
this graph is very interesting lol it keeps spiking to 30FPS
but yeah this frame is when it's 30FPS
This is 60FPS frame.
a good thing is that my FPS was not dropping below 30 anymore, 30 is the lowest it goes except for that one spike. whether it was fixed because I turned off deep profiling support or post process data, I don't know
@iron acorn but here are the screenshots
i can send the timeline if needed too
Yeah, send the profiler data over and I'll have a look, although I'm pretty sure it's just waiting for target framerate of 30
I don't know why it jumps to 60 though
Which is weird because I set the target framerate to 60
vSync Count is disabled (not that it matters since I get a warning saying vSync count is disabled on Android iOS etc), and Application.targetFrameRate is set to 60
where do you set targetframerate to 60?
and did you try setting it to 30?
Also
what shaders are you using in your game?
Also, are you profiling on the device?
I have an empty GameObject in the scene which has Application.targetFrameRate = 60 inside of the Start() method.
Yes, in that case the game runs at a stable 30FPS, no drops or jumps above that.
okay
Yeah the screenshot says "Playmode" because I turned off the game on my phone before taking the screenshots.
what if you remove the target framerate line?
I'll try it now, but I believe in that case the game will be limited to 30FPS.
and what settings do you build the game with?
Okay
all shaders are from 2D shaders from URP
alright
So my only guess is that the device and the game fight for the target framerate...🤔
the device wants 30, but you set it to 60.
Another interesting thing is that GC allocations much your cpu time spikes...
Yeah it really seems like that, the graph is really interesting because of how it keeps spiking between 30 and 60 FPS 😛
I'll try something, I got an idea, will let you know if it succeeds.
It did not succeed, I'll try to optimize my code and see if there's anything to improve there. Thanks a lot for dedicating your time to help me @iron acorn , I appreciate it. 🙂
Why not just leave the target frame rate at 30?
it:s the recommended for mobile platforms anyway
I'll probably end up doing that in the end, it's just that I personally don't think the game really looks that good in 30FPS so I wanna try and push it to 60FPS.
Thing is, I don't know what went wrong because I already made a game like this which definitely has less optimized code because I did not know as much back then
but it runs in solid 60FPS at all times, and it has more stuff than the current state of this game I am working on right now
the only difference I can find between the two is the fact that here I am using URP whereas on the old game I wasn't using anything
I'll try to disable the render pipeline / set it to none before I look at my code and see if it's the cause of my problems .
bro @iron acorn lol
i disabled URP
and the game is running in 60FPS
not a single frame drop
for some reason when I open the inventory though it limits to 30FPS not sure what causes it but I have bigger problems now it seems
Yeah, URP still has some problems it seems.
Looks like I'll be working with the default pipeline and use some workarounds for the effects I want, such as 2D lights. 
Well, I built the game and it looks like it's locked to 30FPS this time rather than it being a performance issue. I might be wrong because I am still new to using the profiler, but you can see the two screenshots above, and when I enable vsync profiler module, it instantly shows that it's locked the game to 30FPS.
private void Start()
{
Application.targetFrameRate = 60;
}
This is the code I have in an empty GameObject in the scene, and it is the only one that has Application.targetFrameRate, no other script in the game is setting the framerate.
In the Quality settings vSync Count is set to 'Don't Sync' because it's a mobile game and Unity throws me a warning that vSync Count is ignored on Android.
Weird part is it used to run in 60FPS, but I made some small changes to the lighting and stuff and now it seems to be locked to 30FPS.
here's another screenshot
I genuinely don't know what's going on and I'd appreciate it if someone could tell me is there some other setting that locks FPS that I might be missing.
Hi, I use this plugin https://github.com/playgameservices/play-games-plugin-for-unity but I think you could help me without knowing it. I'm using Saved Games On my mobile game and everything works fine for leaderboards and achievements. Let's say I want to send data to cloud, when reading the save data binary with a stream, can I directly use it as a string to be converted to bytes? (so this what I've done and there is error : SerializationException: No map for object 'N'.) If not, please explain how I could make the exchange between the binary save and the cloud? Thank you .
can anyone help me with building for android in unity? I get this error UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <3081d2bcbc4348779c37880b87cdb6a1>:0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <3081d2bcbc4348779c37880b87cdb6a1>:0 UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
There must be more errors. These one just tells you that the build failed.
hello
if i make a game then want to publish it on the android app store, is there a price i have to pay?
hello?
u have to pay a one-off fee to publish app on google play
how much?
25 us dollar
It's the price for the developer account. Once you have it, you can release as many games as you want.
Thanks
I tried that and now I don't get any errors
But now I'm getting new problem
The Ads are not getting loaded
i'm trying to build the apk file for an android app but i keep running into "gradle build failed" error. i've tried downloading and adding a different version of gradle besides the unity recommended one but it still doesn't work....how do i fix this?
What does the error say?
Hi I created a level which is isometric with some 3d models placed and some UI panels attached with it in thr worldspace orientation when I click the 3d model the Ui will be enabled and clicked somewhere it is disabled.This is the setup done in unity.
It is working correctly in unity but when built an apk build this is not working in android.
Any insights or suggestions on how to fix this?
Are you using touches input?
What happens when you run the apk?
yep
No error and its opening correctly
And found out some initialisation problem the UI has to receive the data of the target 3d model like its name and other properties so I used a variable called targetAsset which is of type GameObject.
I called the resetTarget method inside OnEnable so whenever the game loads for the first time it is showing the targetAsset variable is not set so is this what making it not working in APK?
Gotta share some code
Perhaps. Share code and error screenshot.
I had a problem where the apk worked on some mobile phones but on others it became a black screen after the unity splash screen for some reason.
Also on some it only worked for some time before the black screen thing happens.
haven't been able to fix it
version 31.0 is corrupted, but i uninstalled it and added only 30, still doesnt work :/
how do you convert the width of an image from pixels to scene units? i want to create an image target and the target manager is asking me for the width but i'm not sure what to put
my image is 780 pixels in width
it's usually 1 to 1
1 unit = 1 pixel
ahh ok thanks!
since the unit is in meters, i need to scale it down right? @iron acorn
to 7.80
alr cool
hi can someone tell me why the object is above the surface?
this is how it looks like normally but when i play it it suddenly shifts upwards
any help would be appreciated
yeah i figured it out
First of all, you shouldn't be using rigidbody and/or collider with the character controller.
oh ok, i've removed it now
damn is that like unity 2017?
2018, 2021 is really buggy so im forced to use this
oh damn
Why use 2021 then? The LTS is 2020.
Hey
Is there anyone who as integrated both Facebook ads and Admob Ads in there Game?
Hi! Anyone here has any experience with firebase?
I'm running into this issue and I don't know how to fix it :(
I've made a little game for mobile a long time ago. I recently dug up the project and realized the last time I did anything with it was with Unity 2019.1.7f1. I've got everything working again in editor, but my movement stops working when I either build and run directly to the phone or build an apk and install manually. In the game the player is constantly moving forward and you swipe to move left and right. In editor the game runs and the movement works, but the movement isn't working on the actual phone. Would anyone have a clue on what I could look at to resolve this? I can post the snippets of code that control movement, if it'll help. To be clear when it's put on the phone with either method the game runs, I can load a level, but when the game starts the player doesn't move. Any thoughts?
You'll need to first look into your movement controls script.
And yeah, you can share it here and someone might have a look.
void FixedUpdate ()
{
// Sets the Player in motion when game starts
if (gameStarted)
{
Vector3 fMovement = new Vector3(0.0f, 0.0f, speed * Time.deltaTime);
GetComponent<Rigidbody>().velocity = fMovement;
}
}
So, the player does not move at all?
Where do you set gameStarted?
//this is declared at the top
private bool gameStarted = false;
private float speed;
void FixedUpdate ()
{
// Sets the Player in motion when game starts
if (gameStarted)
{
Vector3 fMovement = new Vector3(0.0f, 0.0f, speed * Time.deltaTime);
GetComponent<Rigidbody>().velocity = fMovement;
}
}
//down below I have this where I set it to true
public void GameStarted()
{
gameStarted = true;
speed = flySpeed * 60f;
}
In my void Update () is where I do all of my touch controls. My apologies I didn't get what you were looking for the first time. Thank you for taking the time.
Where do you call GameStarted()?@rough vale
I'm still looking for it, but it appears what I do is that private bool gameStarted = false; at the top, and then have that public void GameStarted() across a couple of scripts that are in use.
right click the method name -> Find references
In my Application Manager script I have the following:
IEnumerator StartSEQ()
{
yield return new WaitForSeconds(0.3f);
readyText.text = "Ready...";
audioSource.clip = beep1SFX;
audioSource.Play();
yield return new WaitForSeconds(1f);
readyText.text = "Set...";
audioSource.clip = beep1SFX;
audioSource.Play();
yield return new WaitForSeconds(1f);
readyText.text = "Go!!!";
audioSource.pitch = 1.5f;
audioSource.clip = shoot2SFX;
audioSource.Play();
yield return new WaitForSeconds(.3f);
readyText.text = "";
if (!musicSource.isPlaying)
{
musicSource.Play();
}
player = GameObject.FindWithTag("Player");
player.SendMessage("GameStarted");
scoreScript.SendMessage("GameStarted");
}
And where do you start that coroutine?
In the Application Manager script within the void Start ():
void Start ()
{
audioSource = GetComponent<AudioSource>();
gameManager = GameObject.FindWithTag("GameManager");
scoreScript = gameManager.GetComponent<ScoreManager>();
if (SceneManager.GetActiveScene().buildIndex == 1)
{
player = GameObject.FindWithTag("Player");
pauseMenu.SetActive(false);
gameOverMenu.SetActive(false);
StartCoroutine(StartSEQ());
}
else
{
player = null;
}
if (SceneManager.GetActiveScene().buildIndex == 2)
{
player = GameObject.FindWithTag("Player");
pauseMenu.SetActive(false);
gameOverMenu.SetActive(false);
StartCoroutine(StartSEQ());
}
else
{
player = null;
}
}
someone pls tell me how to add ads to game pls i will die why is noy noy working send help pls
What are the build indexes of your scenes?
Can you clarify that one? Not sure what that is exactly, or I'm failing to remember...
open the build settings window and take a screenshot
Here ya go
Okay
Add some debugs along the way to the fixed update to GameStarted and in the if statement where you set velocity. The last one should probably output the fMovement. Then build the game and see what debugs print.@rough vale
Ok, will do. Thank you for your assistance.
I need help with Android exporting. Why is this happening ?
|| DirectoryNotF oundException: Could not find a part of the path 'C:\Program Files\Unity\Hub\Editor\2019.4.12f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools'. System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) (at <9577ac7a62ef43179789031239ba8798>:0) System.IO.FileSystemEnumerableIterator1[TSource].HandleError (System.Int32 hr, System.String path) (at <9577ac7a62ef43179789031239ba8798>:0) System.IO.FileSystemEnumerableIterator1[TSource].CommonInit () (at <9577ac7a62ef43179789031239ba8798>:0)||
This is the error
it has much more characters but I can't put more than 2000 here
Do you have the Android SDK installed, and the path pointing correctly in Preferences?
Edit > Preferences > External Tools - Also if you installed those while the editor was running you will likely need to restart it.
No I closed the editor while I was installing it
let me check this
What should I do now?
This is the error too
My Android SDK doesn't point directly to the Editor folder its in \users\your profile\appdata\local\android\sdk
Easiest way to fix this is to reinstall Unity
And install Android module separately, after
Can I update the version instead of reinstalling it?
(Beta apparently has problems with it installing at the same time)
version of unity hub
no
is there a proper way to reinstall it or just deleting it and installing
okay
Yo guys need really Help.
I programmed a nice MySQL database in my Game it works Perfect on my PC if i play it in the Editor. But if i export it to my Android it dont work anymore.
My guess is because he doesnt export the many .dll files with. How can i set what he should Export and what dont?
This might sound like a dumb question but, how do I get Analytics to work in 2020.1? I setup the organization, linked the project ID, enabled the service, set the age gate, clicking it brings up the project settings saying that I need to hit PLAY, so I did, waited a bit, went to the dashboard and for the past hour, restarting Unity and doing all the suggestions in "Having Trouble?" still produces "hit PLAY to enable the service", did I miss a step?
HI I was debugging my apk development build and the console thrown an error like this but it is not showing which script or which line is causing this error how to identify that kindly help me with this
And the game is running fine in the editor without this error only in the mobile console I am getting this error
what's in the details of the error?
Details?
It is showing the same thing
Okay, try building a development build and/or use logcat
It was a development build and where to set the logcat?
You can install it in package manager
Let me try it 🙂 thanks..
Any other quick fix?
We don't even know what the problem is yet, what are you expecting to fix?😅
😄 lol I meant fix as a way to find what script is causing the error
The logcat should show more info
Thanks:)
This was incorrect actually because I didn't consider the Unity version. I just upgraded my project to a 2020 version and noticed that when you let Unity do the installation of these SDKs it does in fact put them with the Unity Folder structure. Did a re-installation fix your issue @primal merlin?
I get a warning on this but I'm not understanding the fix it's suggesting. The warning is on DestoryObject(gameObject); which states that 'Object.DestroyObject(Object)' is obsolete: 'use Object.Destroy instead.' I feel like this is a silly miss, but what am I missing?
private void DestroyNow()
{
if (m_DetachChildren)
{
transform.DetachChildren();
}
DestroyObject(gameObject);
}
You should use Destroy(gameObject) instead of DestroyObject(gameObject), since the second one is obsolete
And... that solidifies it. I need more coffee. Thank you!
guys anyone know how to fix or remove unity IAP
hi i use mopub for ads but when i built my project for ios
my project does not generate xcodeworkspace
builded project file has 'Podfile' file but there is no xcodeworkspace file
i tried to make manually pod install from terminal but i took error
thanks
Unity version 2021.1.17f1 my game works in the editor, and in the emulator . But, when I put it on my actual phone via Build and Run or installing it manually - I lose my movement and touch ability. I don't get any errors during the building process and again the scripts run fine outside the phone. Any suggestions on what I should look at? I wouldn't be asking if I had some error to research - but I'm not getting any.
On iOS, is WebCamTexture limited in framerate by Application.TargetFrameRate? My tests indicate yes, but the documentation makes no note of this, so just wondering if there's an option I'm missing.
What are you using to track touches? Note that on mobile, you want to use Input.GetMouseButton, and on mobile, you need Input.touches - so you need to handle both these cases
I have continuous movement in the game, so I'm looking for swipes on Vector2. After the code below I set a couple of floats for gestureTime and gestureDist and go through the swipes up, down, left, and right swipes.
foreach (Touch touch in Input.touches)
{
switch (touch.phase)
{
case TouchPhase.Began:
/* this is a new touch */
isSwipe = true;
fingerStartTime = Time.time;
fingerStartPos = touch.position;
break;
case TouchPhase.Canceled:
/* The touch is being canceled */
isSwipe = false;
break;
case TouchPhase.Ended:
Is it possible that there are two touches, and that the second touch in overriding the first? If your first finger is TouchPhase.Began and your second touch is TouchPhase.canceled, isSwipe would never be true.
I would debug by adding a Debug.Log($"Touch phase: {touch.phase}. Currently, there are {Input.touches.count} touches." statement inside the for loop.
Good call, I'll try it
Hello
I have one question regarding texture compression for Android. I've used default crunch compression for over a few years and all it was good. But in last half of year all my UI and textures become very complicated and there a lot of it. Preferably i want to switch to ASTC compression, but i can't find any info, it it's supported on all devices with OpenGLES 3.0+. Someone tell it's all good, other tell to not use. I'm a little bit confused. And, as far as i know, if device don't support compression it will be repacked to another at runtime which isn't good. Can anyone point me to info, if it's save to change compression to ASTC?
I'm trying to use google play saved games to save in game progress. Would someone who may have experience help me with it? I think it's almost done but I can't get it working.
Weird thing is, seems like I have some save state that only loads when I install an APK directly to my phone. When I upload an App bundle to the google play console, it doesn't works. But with leaderboards is the other way arround
I think this have something to do with key certificates (App signing key certificate and Upload key certificate) on play console but I don't really understand it
I wasn't home yesterday, so I'm trying it rn
it fixed it
How can I send apk file to my phone?
I tried zipping it and sending it via viber
and I can't unzip it in my phone
you could "Build and Play" in unity to have it installed on the device.
I uploaded it on google drive so it works
thanks tho
Build and Run is awesome and saves you the time of having to build and move the apk file over manually. Unity will see your phone pretty quickly after you enable developer mode and usb debugging on it.
Would anyone have a clue why this code works fine in editor and the emulator, but fails when actually put on the phone? If I attach to Unity and Play from VS I get no errors or warnings. Its just failing once on the phone.
public class MobileInput : MonoBehaviour
{
public float forwardSpeed = 12f;
private float speed;
void FixedUpdate()
{
// Once the game starts this set the Player in motion
if (gameStarted)
{
Vector3 fMovement = new Vector3(0.0f, 0.0f, speed * Time.deltaTime);
GetComponent<Rigidbody>().velocity = fMovement;
}
}
public void GameStarted()
{
gameStarted = true;
speed = forwardSpeed * 60f;
}
}
When is GameStarted called?
I think I told you before, but put debugs everywhere along the call chain to GameStarted and monitor the build with logcat.
Guys, how many triangles are okay per mesh in a mobile game for it to be smooth?
Wouldn't that differ from phone to phone? Some phones can run games really well while others aren't. Maybe around 300 to 1500 per mesh
yea, but I'm trying to optimize my game as much as possible for it to also run smoothly in old devices
do you think that with that amount it will also be fine for older devices?
That depends on what your game is. I have no idea what kind of game you are making. It might be fine, I say this is a good start, but it might change based on how many models you'll have on screen at a given moment or what they will be doing or how the rest of the game functions. Mobile varies a lot lol. You'd probably have to use your best judgement. If your rig and animations do not change, lowering the poly count shouldn't be too hard.
Can anyone help me with exporting my app? I'm following this tutorial, but I get these two errors and not sure how to fix them
It's not the triangles per mesh, but how many you render per frame.
You can have one object with 64k vertices and it'll be the same as 64 objects with 1 vertex. I'm fact the first one would be a bit faster even.
Share the details of the error.
If anyone has any idea on what I should do, please ping me, thank you
but if I instantiate a mesh with 1k vertices instead of one with 64k vertices it should load without losing that many frames, right?
Donno. Perhaps there's gonna be no difference at all. But you should avoid instantiating objects at runtime anyway.
huh?
"low-polygon" meshes are preferred on mobile, for performance
but game objects are a lot more expensive than additional vertices/triangles
But if game objects are re-using meshes, then you don't have to worry
Who said that? And in what ratio? Ofc 1 additional GO is heavier than 1 additional vertex. But 1000, 10000 vertices are probably heavier than just a gameobject. But again, it's kind of a silly idea to compare the two anyway.
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.Purchasing;
public class Buy : MonoBehaviour{
private string monthsub = "melt.noads.onemonth";
private string threemonthsub = "melt.noads.threemonths";
private string sixmonthsub = "melt.noads.sixmonths";
private string oneyearsub = "melt.noads.year";
//public GameObject buyButton;
public static bool HideAds = false;
void Start()
{
}
public void OnPurchaseComplete(Product product)
{
if (product.definition.id == monthsub || product.definition.id == threemonthsub || product.definition.id == sixmonthsub || product.definition.id == oneyearsub)
{
HideAds = true;
SceneManager.LoadScene("Main");
//block ads forever with if (Buy.HideAds == false) Ad.Show();
}
}
public void OnPurchaseFailed(Product product, PurchaseFailureReason reason)
{
Debug.Log("Purchase of " + product.definition.id + " failed due to " + reason);
}
}
my in app subscriptions work until I turn my app off and back on.
above is my purchasing script
Anyone got experience in modding a mobile app using a launcher? Something like how those Minecraft ones work? I really don't know what I'm looking for if you couldn't tell 
fixed
Hello waiting no never verify?
"Verification status
Verification is in progress.
The Trust and Safety team received your form. If necessary, they will contact you by email. The review process can take 4-6 weeks. You will receive the first email from our Trust and Safety team within 3-5 days. Your last approved consent screen is still in use. More informatio"

Does anybody know how to steer wheels with touch buttons?
I'm using CrossplatformInput, and it only gives input of 1,-1, or 0 . which is not suitable for steering input.
I tried putting the axis input in update .
this works as I expected but shows some weird behavior.
You just need to multiply that by whatever angle you want your wheels to rotate.🤷♂️ https://docs.unity3d.com/ScriptReference/WheelCollider-steerAngle.html
hey im trying to build my project to an apk but i have this error at the end of the build. any ideas what i can do?
Something with Gradle. Are there more errors?
yeah
Is there an error from Gradle specifically?
this one is useless. It just tells you that the build failed.
Are you using default unity jdk/ndk/android sdk or your own?
thats means yes?
im not sure XD
but im guessing this is the problem cuz i just download android studio again
What unity version are you using?😮
2018.4.22f1
updating to lts might fix it.
Also, what target api do you have set in player settings?
but this is an old project, wont it ruin my project?
Depends. If you're using some deprecated stuff, you'll have to update it.
at this specific i tried 31, but i want to use automatic
set it to 30 and try to build again.
install 30 in the android studio
I'm not sure you need the second one, but I have it just in case.
ok downloading
that's worked!
what thats mean if i want to upload the game to the google play console?
less devices can download it?
I'm not sure why, but the latest api level is still buggy.
If I understand it correctly, only the min api level imposes any limitations. Target api level is the one that would be preferred over others.
now got only this error
noice
Sounds like facebook plugin related. gotta look it up on their webpage(github?)
Hey guys, when I try to sign in to google play through my game app it returns the result of "canceled" and I don't know why.
Check if the mail that you try to sign in with is added as google play services tester in the dashboard
No like
it doesnt bring up the dialogue
like it doesnt ask for email input
i just run it and it says "Canceled" after the banner for google play shows up
I have this code here
Wait i just added my email for testers
Afaik google play is trying to sign in with the account you have in your google play games app
might work this time
yeah, that may be the reason 😉
Are you initializing PlayGamesPlatform before that?
Ok, did you check your device logs? Maybe there is some more information about why it was canceled, especially that you have PlayGamesPlatform.DebugLogEnabled set to true
If you are using Unity 2019.3 (I if recall correctly) or above, there is a package available in package manager, called Android LogCat so you can access logs directly from Unity
Im going to install that rn
its just outputting messages a lot
o i see
filtering ftw
ok, so now you can try to sign in again and see if there is any log about it
2021-08-31 10:49:32.143 27295 27295 Error SignInRequest Setting result error status code to: 16
hey im trying to build app bundle so i can upload to google play console but im getting this error at the end of the build, any ideas?
Something's wrong with your android manifest:
AndroidManifest.xml:43: error: unexpected element <queries> found in <manifest>.
this is the manifest?
no. That's for unity packages
If you use a custom one, it should be somewhere in the assets folder.
You most likely need or already using a custom one, since facebook plugin makes use of it I think. You can check the path in project settings - player - publish settings.
@iron acorn I wanted to ask, can internal testers access their google play account through the mobile game app?
Should be. How are they gonna become testers otherwise?
You invite them via mail.
Its just that I put my mail as a tester, and the banner for Google Play appears but it cancels and the email input section doesnt appear
what banner?🤔
the banner that appears when its trying to sign in
to the app
problem fixed now i got another one 😅
Ah, you need to use updated gradle
where and how can i update gradle?
google for the latest version, download, unpack and set a path to it in the project setting.
to download from here?
yep
Doesn't matter where. And no, that's not the gradle path.
It's actually in preferences - external tools. I was wrong previously
oh
i think i dont have it here
so i guess i should upgrade?
Maybe google for a way to use external gradle on 2018.4
oh ok
Hello, everyone. If someone could take the time to read my question and help me out, I'll be really grateful.
I've returned to Unity after at least 1 year, and I'm developing a simple Android app for fun. And I have a question about touch inputs.
I've made stuff for Android before, and when I did I would use the EventTrigger component on UI elements to check for simple PointerDown and PointerUp events. I always like this approach because it use events rather than detecting input in Update.
This Android app I'm trying to make will require stuff like zoom pinching and swiping, and as far as I know EventTrigger can't deal with that stuff (I might be wrong though, please tell me if I am). So I'm looking up alternatives, and the popular thing atm seems to be the new Input System, which I absolutely can't wrap my head around. There's also EnhancedTouchSupport, but from what I found it still requires me to check for inputs on Update, which I would rather not do.
So I'm having a really hard time trying to understand what approach to touch detection I should use, and I'd really appreciate some insight. I'd love if there was something event and component based, like EventTrigger, that could cover stuff like swiping and pinching, and that wouldn't require me to use Update to check for input every frame.
Hello, I am using latest version of advertisement package. In editor, everything works except "OnUnityAdsShowComplete" callback. I am using exact "Rewarded video ads" example in this page: https://unityads.unity3d.com/help/unity/integration-guide-unity
A guide to integrating Unity Ads in Unity (C#)
Well, the new system is event based. Otherwise you have to use the old input system, and I don't think that you can implement a complex behavior like pinching without update. Is there a particular reason you try to avoid it?
Hello, I'm trying to test my android 2d game in the game scene with a phone connected to my laptop where it should play and test it in my phone as well.. I try to tap the screen on my phone it won't proceed to the next scene, but when I try pointing the screen on the simulator in my laptop the input seems to be working.
I don't if its because of the input manager, cause I recently click something before that Unity was telling me that "there is a new input system available and youre using one" and I accidentally click "yes" on it, maybe that was the source of my problem here
Perhaps. There's a new input system that would override the old one if you switch to it.
I've check my values for "Active Input Handling" and it was set to "both"
Are you using unity remote?
yes
I'd really avoid using it for testing. Build your game and see if the build works.
The input system might be messing with it.
yeah, the app is inconsistent in its performance
ohh noo, after setting it back to the old version(Input handling)I can't point the screen
ahhh, I just delete the old event system in my scene and create a new one
So were you using the new input system this whole time?
i think so, cause I thought that the event systems would also changed after i revert the settings
but is the error here dangerous? haha
To be quite honest, I have been told by people in the past that it's good to avoid Update when you can, and that the way Unity calls the Update method is kinda dirty and resource consuming, so I started avoiding it as best I could. If I needed something updated every frame, for example, I would use coroutines, which I like cause I can use pause and stop conditions.
Thing is, I never looked too much into why not using Update is a good thing, i just went with what I was told.
Sounds like they didn't know what they're talking about. A coroutine is not different than update in that regard.
There's nothing bad about using update. In fact, there are situations where it's the only way.
Or the best way.
I see
Yes
thanks for the insight, @iron acorn. I'll try looking up more tutorials to learn more about the new input system, and see how I can use it to do what I need.
have a great day/night!
What's the problem?
And? Did you?
?
i got latest version of gradle but still
but i have a doubt
i think its sdk
problem
and what's in the Console
Speculating blindly isn't very helpful when there's probably an error message it's directly talking about
Did you do what it says?
i dont know
You don't know how to look at the console?
i know
well then?
You can install it via android studio or unity hub.
don't repost in multiple channels.
okay sorry
change the resolution at the top left
you shouldn't have them by default
Unless you changed something in your project settings, there should be no black bars
Did you try building?
not now,but yes,this game is publish soon on play store
ye
Then you've messed with some project-player settings
I don't see anything wrong. Take a screenshot of how it looks like in a build.
No, I mean a screenshot of the game on a device.
yes. Mobile device
So you didn't test the build before asking😅
i have new problem
-_-
when i build game,there is empty
bruh
game is empty
hm
The scene is empty?
well, you don't have anything in your scenes:
Hey guys, I have google play services installed into my project but when I switch the build to iOS it gives me these errors. Is there a way to precheck to only configure if build target is android or iOS?
#if UNITY_ANDROID
Thank you so much, I have another question if you don't mind. I have all my items for purchasing setup but when I try to purchase them through the app it brings up a screen saying "Product is not available for purchase" even thought it is active on the google play console
not sure if this is the right chat for unity ads questions, lmk if not!
I'm integrating Unity Ads to my project
and every time it initializes it adds an EventSystem game object to the scene
it collides with the existing event system from my canvas for the UI
anyone faced this before?
if I remove the event system from my canvas, if the unity ads fail to initialize, then my UI is non responsive
still trying to figure this out, if anyone knows something, much appreciated!
It could be a couple of things from what I recall.
Make sure your build is signed and you’re using an account that’s added to the tester list in google play.
I don’t really remember what could be causing that though, sorry. I didn’t touch iaps for a few months now :/
That's ok, thanks
most likely your app (the one with iap intergrated) is not live(rolled into production)
try to upload to closed test then include yourself as the tester
Do you have Google Play apk signing enabled?
If yes, then that's what's probably causing it
hey so my Unity Remote requirements check is not working, ive got USB debugging on, ive got the any android device enabled
im not sure why, if someones helps it would be helpful thanks
Give up on unity remote. It's not worth it.
why
Because it's not suitable for most kind of testings.
It doesn't actually run the game on the device. It runs it on the PC and the device only shares the screen, so...
You can't test performance or anything device related with it.
so...what else
Might as well test in the editor.
should i use
Build
huh
Build your game and test on the device.
Well, don't just test every single feature on the device. You can test intermediate steps in the editor.
Press the play button.
yeah but how would i make that play on my phone
It would run it on your phone automatically
ohh
If it's in dev mode and connected
Do you see your device in "default device"?
Then select it and build and run.
ok#
Might want to do development build to connect the console and the profiler.
whats that
Not sure why you have it enabled, since it's not supported on mobile
Console, log. Where you see error and debug messages.
yeah
Profiler is what you use to track performance and optimize your game.
oh console
On mobile you should be using URP or built-in
oh
Most hdrp features are not gonna work and it's gonna kill your performance.
And battery
well thanks for the help!
When you have both HDRP and URP packages installed on your project some HDRP scripts overwrites the URP ones, to "clean" switch between them, uninstall the HDRP from package manager, close your project, delete the "library" folder and open it again
what about this
this is URP right?
Yes
What I mean is, if you just change the asset there (was a HDRP asset, now is an URP asset), the "conversion" will be incomplete
The easiest solution in a fresh project is to just make a new project and copy assets across
that works as well
hey, my games has 2 splash screens, and when i run the game on my phone the splash screens shows but it takes like 10 seconds to load the game after the splash screen,
any idea how to fix this ?
Well i see someone had same issue, unity run device not found , it cant find my phone. Was trying to use unity remote to. Dev mode on, USB deb on and still nothing
stuck like 2 hours for this 😄
Seems, best testing is only build and transfer apk file and install
But real question whats happening with this phone thing? Is somekind Phone issue or what?
That unity cant find a phone
oh ok thanks
Create a loading/menu scene that would load the heavy scene with a loading screen.
Make sure you have android build support and all the necessary sdk installed too.
does your phone detected when listed using adb?
if not, maybe the you need to install phone adb driver
the thing is, i did just that
Okay, so what's the problem?
Does it take 10 sec to load the empty scene?
yes but the scene with the loading screen dosen't shows up
Did you add it in the build settings?
Hi I have a problem with the input field and the android keyboard.
I have in a scene two elements:
- An Input field.
- A button to continue to the next scene.
When I press on the input field the keyboard of my phone opens, if I press outside the keyboard for example on the continue button, the first click causes the keyboard to close and the second click is the one that executes the action of the button.
How can I have the keyboard open and in the first click close the keyboard and also press the continue button?
This only happens on Android.
That's how android's activities work - the keyboard activity overlays unity activity, so there's no input going through until you close it.
you can take a look at the touchscreenkeyboard class: https://docs.unity3d.com/ScriptReference/TouchScreenKeyboard.html and maybe do something when the keyboard is hidden.
https://answers.unity.com/questions/1325291/how-to-call-a-function-when-mobile-keyboard-is-don.html
Hi there,
I just implemented the Google Play Games Plugin and signed in into Google successfully, but only if i press build and upload to Google Play.
If I press build and run it fails on the local device, even if I upload the .aab to the play store and install it on the same device as well.
Does anyone know if and what is different between build and build and run?
Logcat output:
SignInRequest Sign-in failed. Run in silent mode and UI sign-in required.
SignInRequest Setting result error status code to: 4
The SHA1s are identical.
I am aware that I have to implement an explicit manual signin if silent sign-in fails, but why does silent-mode fail?
Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.
someone help pls
After building the project end sending it to my phone and installing it, i get en error that the app was not installed. This was a problem in the past but after downloading it a second time it worked but now it doesn't. And also it doesn't seem to be a problem with other apps, just with my game
do you have your game published?
what do you mean?
i haven't published it on play store or anything like that yet
oh
anyways before trying to install the new apk uninstall any other version you may have installed
yo I'm running out of things to try to get this aab exported. Looking to pay someone $20 to finally get this app exported. DM me.
Android
That's not an error. It's a popup message. You can see the actual errors in the console.
im new in using unity,, i have a question regarding integrating the unity project to android studio
is it possible to do something like this
I'm not sure that's possible. Why not have the buttons in unity though?
im considering this idea as well,, but I want to do something on the onClick on android studio side
how about something like this?
I think it could be possible to call some native api/ java code from unity. Not sure what it has to do with android studio though.
its just that my android studio project uses firebase, and im already familiar with it... tbh i just want to save some data to firebase database once a button is clicked, the problem is that i'm not sure how if i can have a button to call natively using android studio
the project is divided,, im doing the android studio part while others do the unity
There's firebase plugin for unity .
should i just have them learn unity firebase?
In fact I'm not even sure about the "divided" part thing
how are you gonna build it into one app?
I keep on getting app crash on launch after admob integration. Note: I have enabled google ads and entered test app ID both in settings as well as manifest file... Can anyone please know whats the issue?
Nothing we can do without seeing the logs.🤷♂️
ive seen you can import the unity project to something like .aar file and have it working (integrated) on android studio
Donno. Never done it. Never heard of someone doing it.🤔
Did you try building and making sure it works?
@iron acorn no logs are written during build and its successful, its just app crash
not yet but ive seen videos and it should work,, some thing like this https://www.youtube.com/watch?v=Ww4NbIubHTc skip to 10:50
This video is about Embedded unity within the android app. Here you can learn how to make an android library from a unity project. And how to open unity as a native android application. If you understand this then you can customization as per your requirement. After watching the complete video, If you liked it then please subscribe to this YouTu...
Interesting
yeah... the thing we're doing is the usual android stuff but needs unity for specific feature implementations
thanks for entertaining my queries,, i guess ill just have them learn unity firebase
That's not an error. It's a popup message. You can see the actual errors in the console.
@iron acorn but i can't understand the error message in console
There's like 200+ errors in the editor and i don't how to identify the one that unity is telling me about
so what are we to look at?
Most likely 198+ of them are relevant. Anyways, whichever you pick is probably relevant.
The first one is probably the most relevant
I think his computer finally blew up
The first one is probably the most relevant
@night pecan which is the first one?
The first error message in console?
The one at the top of the console, the first one that has some actual, readable content in its message
Does anyone had problem app crash on launch for admob integration recent version?
Failed to Produce : Libunity.Sym.So I keep getting this error everytime i try to build
im building for android
does anyone know how to fix
share the whole error.
It's still not the whole error.
i couldnt send the whole error without a word limit
ig ill send a bigger half
and another
C:/Program Files/Unity/Hub/Editor/2020.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy.exe --only-keep-debug "Temp/StagingArea/libs/armeabi-v7a/libunity.so" "Temp/StagingArea/symbols/armeabi-v7a/libunity.sym.so"
stderr[
C:/Program Files/Unity/Hub/Editor/2020.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy.exe:Temp/StagingArea/symbols/armeabi-v7a/libunity.sym.so[.note.android.ident]: No space left on device
C:/Program Files/Unity/Hub/Editor/2020.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy.exe:Temp/StagingArea/symbols/armeabi-v7a/libunity.sym.so: No space left on device]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, System.String errorMsg) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)```
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <015079d9a4ea4f97b4381e694d2310c1>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)```
What about the top part?
C:/Program Files/Unity/Hub/Editor/2020.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-objcopy.exe:Temp/StagingArea/symbols/armeabi-v7a/libunity.sym.so: No space left on device
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
this?
these are all the errors
It says No space left on the device
Are you doing Build and run?
no just build
haha lol
and is there enough space on your hard drive?
i have 10 mb left
Well, there you go.
Hi, does anyone know how to convert bytes to text with encoding on a mobile device? Via System.Text.Encoding does not work as on a PC
guys, I have app which is working on PC no problem. But when I am building it on Android, all videos which are in mp4 format are just working very slow...
I was wandering what is best approach to make it work
more smooth
if anyone could direct me to any articile or some sugestions where I can found about that, that would be great.
Hello! Is anyone here familiar with the plugin called MobileRTSCam? It's a pre-built camera plugin for isometric RTS games (such as Clash of Clans). Having some issues with it and was looking for some help
The manual could be a good start. Usually you need to transcode the video into the format supported by android
https://docs.unity3d.com/Manual/class-VideoClip.html
Hello,
I'm having a wierd unity behavior
My game is working correctly on the editor
-> I compile for android (and it's not working correctly, there are exceptions during runtime)
-> Now the same issues appear on editor aswell, till I reload the unity editor
What could cause this? Thank you
Do you want to share the errors too? Because otherwise I'm not sure what are you expecting from us? 😅
hey any idea how to make a shoot to move mechanic, like shoot to the mouse, and add force to the opasied direction off the mouse
Hey guys, is there a way to retrieve the email from google play sign in and app store sign in
shoot a ray and get the rays direction
Like Im using firebase, so I want to retrieve the users email
and then use the to access their data
Same with app store sign in
Noice
what's the best authentication program to use for Login/Register system for an android game?
Wait wrong channel srry
i need to to this with a projectile
shoot and jump in the oppisiet position of the mouse
how can i use buttons as input
for example
if i press a button
OnKeyDown input will be called
or something like that
Thanks for you concern but couldn't be more precise here :/
The error itself wasn't really the problem here, I was trying to understand why it was working on editor, then after an android build, it wasn't working on editor anymore, it doesn't make sense. (So I was asking if someone knew what could cause this behavior to happen)
Especially, after building, visualStudio was asking me to regenerate the solution cause changes were mades.
It might have to do with the managed plugins I have in the project tho
There are too many possible reasons for something to not work in the build. The errors could be related, so that's the first thing you should be checking imho.
Yeah sure, I have no problem with having build error only that doesn't appear in editor. Btw I fixed the error and it was working in the build
But still, the fact that it was working in the editor, and then, not working in the editor too after building doesn't make any sense. (And if I restart the editor it was working again)
Basically means that the editor was in another kind of state after building to android. But maybe i'm missing something there
I don't even know what was not working, so there isn't much I can say...🤷♂️
Haha thanks anyway
I mean, what answer do you expect..? If you ask a vague question, you get a vague answer... Or none at all.
make sure you know how to use new input system , you should be able to instantiate a projectile like you normally would
Hey guys, I have a problem with google play games sign in. For some reason GetServerAuthCode() always returns null even thought I have the web Id implemented and have the configurations initializing
why does this script not let you press a button unless an ad is loaded?
here is the script
when I press a button, the app is supposed to check to see if a full screen ad is loaded, if not it is supposed to move to the next page, but it only moves to the next page if the ads are disabled, or an ad has played.
fixed
Good dev phone?
Having issue with iOS build, when building XCode complains about the FBSDKCoreKit. I tried to use pod install and pod update, and I get this error in Terminal - CocoaPods could not find compatible versions for pod FBSDKCOreKit/Basics. In Podfile FBAudienceNetwork 6.4.1 was resolved to 6.4.1, which depends on FBSDKCoreKit/Basics 7.0.1. None of your spec sources contain a spec satisfying the dependency FBSDKCoreKit/Basics 7.0.1
Also, it seems Unity cannot generate xcodeworkspace in Windows?
Tried downgrading Facebook SDK, but still same issue - FBSDKShareKit file not found
Also tried SDK 11, same issue, this is it: https://githubmemory.com/repo/facebook/facebook-sdk-for-unity/issues/559
SDK 11 with Unity Audience Network 6.4.0 pod resolution fails
But there is no package in Unity with this Unity Audience Network version so I'm gonna try Facebook sdk 9 instead
Same issues even with Facebook SDK 9.0.0
Hey Everyone, I have ask this question before but got no solution or workaround for this. Every time when Bluetooth headset/earphone is disconnected while app is running, background music in the app stop playing. It is supposed to re-route to the phone speaker. Is there any workaround for this? Target Platform: Android Unity Version: 2019.4.20f1
I figured that when connecting or disconnecting Bluetooth, the app loses audio focus. I need help to regain focus and resume audio. Does anyone know how to regain focus in the unity app? Same problem occurs in unity 2020.2.5f1
Solved this problem by resetting audiosettings. Here : https://docs.unity3d.com/ScriptReference/AudioSettings.Reset.html
Hey guys, Social.localUser.Authenticate always returning false and i dont know why
You should check your device logs via AndroidLogCat, there might be more information
do you have your google play account added as a Google Play Services tester in Google Play Console?
i just released my game on itch.io, but the ads are not working (android), rather than showing real ads it is showing test-mode ads, and I made sure to disable test mode. anyone got an idea why this happens? and does it relate to this?
(I am only using Unity ads, no 3rd parties. I also made a new build after disabling test mode)
ayy, test ads are doing nothing.
im initializing stuff in test mode set to true, and with the correct android ID, but when i hit "Advertisement.Show();" literally nothing happens
even when following an online guide, same result
what's going on?
Itch.io is webgl though. I don't think, unity ads work on webgl build.
I'm using unity 2018.2 and got these errors when I build my apk today, yesterday it was build fine
CommandInvokationFailure: Unable to convert classes into dex format.
Invalid command dx
I did update my android studio and added android sdk 31, and some build tools last night, so the errors might be caused by those.
So, should I just upgrade to higher unity version like 2018.4 or maybe 2019? Or should I downgrade/delete the android sdk 31?
Nope, upgradin to 2019 doesnt seem to solve the problem
This error is probably longer and it should have some more specific information about what went wrong, could you paste it here or on some site for logs/code like pastebin?
Must be from old plugin I have on my project, since my other project build just fine.
Just checked the buildtool 31.0.0 and indeed it does missing the dx.bat, other version did have it
Btw, here's the longer error log
C:/Program Files/Java/jdk1.8.0_181\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/android-sdk-windows\tools" -Dfile.encoding=UTF8 -jar "E:\Unity2018.2.9\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
Error:Invalid command dx
]
stdout[
]
exit code: 64
UnityEditor.Android.AndroidSDKTools.RunCommand (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg, System.Int32 memoryMB) (at <83d1bb7382c84f0e821bd87272796a4f>:0)
UnityEditor.Android.AndroidSDKTools.RunCommand (UnityEditor.Android.AndroidJavaTools javaTools, System.String[] sdkToolCommand, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <83d1bb7382c84f0e821bd87272796a4f>:0)
UnityEditor.A```
not exactly on unity development but you should check this, it seems like there might be something wrong with build tools 31,
you can either downgrade it back to 30 or try to change some files names as shown in one of the answers
Yep, I'm looking at the same page too, I'll try duplicating & renaming some files first. If that doesnt work, I guess I have no other option but to downgrade to 30
Yeah that sounds like a good plan 😉
So I read that baking is better for mobile than using realtime
i got a simple game and even with like only probuilder stuff it takes one really small scene like minutes to bake
and I will have like 50 levels... so what should i do?
I wouldn't say that baking is great for mobile. It eats a lot of storage memory.
And you want your build size to be as small as possible.
But yeah, baking takes time.
it's a trade off between performance and memory/storage usage
But yeah, even my 512x512 lightmap could take up to 2MB, so 50 baked lightmap could take up to 100MB
Hi! How do I link buttons on my game to UDP's IAP?
Where can I find an example video or documentation?
Duplicating/Renaming files doesnt seem to work, but copying the dx.bat and dx.jar from other build tool version seems to work, I copied mine from 29.2
Good to know for the future
So I guess using few lights is ok then on mobile without marking my meshes as static and baking?
like i'd have 1 directional and maybe like 1-10 point/spot lights per scene
are mobile phones good enough for it cuz idk many phones on android and have not thousands of phones to test it on all
There's a huge disparity between devices in terms of performance.
high tier devices might deal well with heavy scenes with lights shadows and whatnot. Others might struggle with small scenes without shadows and lights.
Real time shadows are pretty heavy, since they double or even triple draw calls.
but baking takes so long on even small levels with simple forms
i could fake the player shadow
but not the level
and yeah it also increases build size
and i think max size is 150mb on android? and i dont rly wanna tap into that bundles thing. seems they overcomplicated it vs just one obb file
Question for mobile. It seems that android studio is becoming impossible to emulate, since the emulated architecture for x86 is going away and emulated arm just runs. so. slow. One issue with Unity's mobile "emulator" is that it doesn't emulate things like the datapaths changing. It's basically just a window for checking screen size on the Unity game view. What's the best way to emulate right now? Anyone hear about more support for emulation in the future?
@hidden cave
Is there a reason you're randomly tagging someone?
Yes
Which is?
I want to make a massive map for my top down mobile game. Should I use a 2d tilemap? I'm worried about performance on mobile devices.
You can try baking with scaled down level and lights range. that would cut baking time big time. Wont work with lightprobe unfortunately
Tried now dozens of solutions, cannot get it to work when building with XCode, the error is - lexical or predprocessor issue FBSDKShareKit.h not found FBUnityUtility.h
Another issue is that the Unity build reports "iOS framework additional failed due to a CocoaPods installation failure"
So it could be related to this, but I also built it on Windows and there was no errors, but when added to XCode, same problems
Though I did install cocoapods using Terminal sudo, so no idea how come it still cannot find it
At the same time, my Macbook is barely working, the input is jumping around, the screen died, etc. so it's a living nightmare altogether. Just have to build this for the client and I'm gonna let it rest forever 😄
scaling? what's lightproof
could try vm or hackintosh or cloud build
yeah, put all the objects in the level into one parent transform, scale the parent transform to 0.25 or 0.1, adjust the light range accordingly, bake, revert scale to 1 when bake is done.
Ok so using "Progressive GPU (Preview)" Lightmapper made it a looo...ooot faster
It works when Subtractive mode is selected but freezes if I use Shadowmask mode.
not rly sure what those mean anyway
Hello Community, is there any idea to increase unity mobile game FPS?
and i am using post processing
The best way is to profile it first, or you'll shooting blindly in the dark
But disabling that post processing would be also a good start
Idk what you mean sir, but i'll try my best to understand it ,thanks
have a look at this video:
https://www.youtube.com/watch?v=uXRURWwabF4&ab_channel=Unity
does anyone know how to get actual ads on unity ads
when i play my game it just shows unity ads
always
Wdym? Does it show test ads?
Does it say "Test ads" on them?
Then, yeah, you need to disable them.
wdym by "unity ads"?
as in
just showing ads for one company
unity
no other ads
like I built the game and all
"ads for unity"?🤔
yes
Never seen that. The test ads are just blank with some "test" or something text on them.