#📱┃mobile
1 messages · Page 28 of 1
whats the current best backend solution for Unity?
I'm trying to open an external file, but OpenUrl doesn't work for this anymore
Android have FileProvider but how open external file in iOS?
Hello, people. I have a question about performance. I heard that combining meshes increases performance, but I don't know the correct limits. I mean: if I have a city, should I combine the elements that form a house? Should I combine all the houses? Should I combine all the meshes in the map?
hello, i am trying to make a button load my pause menu for a mobile port, but when i press the button it rapidly activates and deactivates the pause menu. how can i make it so that holding the button acts like a single click?
i'm using the crossplatform input manager if that helps
Does anyone know how to toggle the flashlight on Android?
I've tried using the AR plugin but that doesn't work, I also tried directly interacting with the native code though the AndroidJavaClass/Object but that also didn't work, I granted the app permission.
Also it seems strange that sometimes sorting layers are not being respected by android
(in 2019.3.13f1)
hey if i run ads in my IOS game. Is that considered a commercial application?
What is the line of code to be use in order to detect when the user taps the screen? Thanks (Please ping me aswell)
I new to coding, is there something wrong with this code for mobile swipe as it doesn't work, when I put it on a object
Hello, is depth texture optimized for mobile? I feel so lagy when i use that
Hello,
when I use UnityRemote (iphone7) the image is so out of focus but in playmode it looks good, how is it possible that it only does remote or will it look like this even after build? (Its my firts experience for Unity with mobile)
Hey guys! I need to run my game downscaled by 50% to run better on older phones, but using the SetResolution method, it now downscales the resolution of the user interface as well. Is there anyway to get around this? Please help!
guys can somebody tell me why is my ui showing in remote unity but not showing in build game
I got level one, and there is two ui elements which are prefabs and they are not showing when I play the apk build
Make sure you changed the Canvas Scaler on the Canvas to "Scale With Screen Size". Drag the Slider to the right. Than go in the Asset Store and download the Letterbox Asset. After doing this, go to GameObject and select Create Force Camera Ratios Object. Set the default color. Do this for all Scenes. This Asset makes, that your game will be presented the same way on different Screen Sizes. The Canvas Scaler does the same with the Height.
you can't
they have 2FA locked to apple devices
and then you need to either use a mac or risk making a hackintosh to get xcode to work to be able to upload it
Guys I am stuck on swipe movement's for my 3d game where the player moves by swiping
Hello there, I don't really know from where it can come from but when I'm building on Android the screen is black except the UI Shadow. Do someone know how I can fix that ?
@white tendon I saw your screenshot. What is "not working" exactly. Is the Debug log showing input values when you print them?
guys, how can i enlarge my game object till it occupies 1/5 width of the screen in runtime?
what i cannot understand now, is how can i translate the bounds size (like 1.0, 1.0, 1.0 for cube) into the real words units.
Hi, is there any way to build and deploy to many devices ? Like i create a build and it will installed and started on these devices?
To answer my own question. Yes, I just found a universal adb driver. So ive written some powershell scripts to connect and save ips via usb and to install the apk to all devices which ip I got via wifi.
So, for better performance, should i have all enemies sharing same material? or since they are all seperate objects it doesnt matter?
absolutely use the same material where possible. that's not just for mobile either
Why doesn't this work? I'm testing this with my mouse btw, but I have simulateButtonWithTouches enabled.
void Update() {
if (Input.touchCount > 0) {
Touch Touch = Input.GetTouch(0);
Vector3 TouchPosition = Camera.main.ScreenToWorldPoint(Touch.position);
if (TouchPosition.x < 0) {
this.transform.rotation = Quaternion.Euler(0, 0, 90);
PlayerFacing = "Left";
}
}
}
I also added a print that prints the touch count each frame, but when i hold down my mouse it still prints 0.
Did you mean simulateMouseWithTouches? Didn't find simulateButtonWithTouches in the documentation. If so, I think this bool means that you can simulate mouse with touches, not simulate touches with mouse.
I meant simulateMouseWithTouches
Oh
So i'll have to build the app and see if the mobile movement works?
Hm I guess so. Maybe there is a way to simulate touches with mouse. Quickly searched the google and found this: https://romanluks.eu/blog/how-to-simulate-touch-with-mouse-in-unity/ but didn't tested it myself so I'm not sure if this works 😉
Alright, thanks.
Apparently this could be just shadow map resolution
@dark knoll i'm not sure if it is related, but look into triplanar shaders then fake shadow/light shader. triplanar on maze mesh and fake light/shadow on a circular mesh around player
Thanks. Any links to some cool articles that deal with optimizing visuals for mobile? It seems Profiler says most of my game's time is spent in render
Dose anyone know hot make this only go one direction
hey guys
I just have a question
I have this code here
https://hatebin.com/fyqaazzgck
Im trying to detect a touch on a gameobject through a raycast itt doesnt wwork
Also I have a object but I want to rotate itt based on my touch position
Hi, why save unity perfectly and when put on android he save but when leave he reset all score? https://pastebin.com/cTy9KuXn
someone wants to make a mobile game with me? I consider myself as a very experianced Unity c# programmer. So if someone is interested, I'm just bored of coding all alone
also I can do basic blender models
mh is anyone able to help with adb driver and powershell scripting ?
@glossy sluice have u ever used admob?
Does anyone know how to set it up so I can attack when I tap on a button? I want it to deal damage to the closest enemy when I tap on it, I've tried but I can't seem to get the code right
@stuck void have u ever used admob?
If you post your code in #💻┃code-beginner I’m sure someone can help @stuck void
Heya folks, I did already some googling but only found some old forum topics. What I ultimately need for my android app to do is this:
- at some point a timer starts counting down
- the players can put the app into the background/suspending it
- the timer should still run
- when the timer hits a specific point I want to play a sound the player should be able to hear, for example if they have headphones on
Especially the part with the sound. Is this out-of-the-box possible with Unity?
@muted vault a quick Q, have u used admob before?
No, but isn't that an ad-service?
With the above mentioned functionality I do not want to show ads, those should be gameplay mechanics
Oh, you want my help. My bad. No, can't help you with that I'm afraid.
rip ;-;
How do i change size of unity ad banners along with position? cant find anything on google
Hey there, I am making a kind of air combat simulator (basically a flight sim) for android. Obviously I need to use the accelerometer to control the aircraft but when I play the game on the phone, the controls are centered ( x=0, y=0, z=0 for control surfaces) when the phone is facing up, so if it's laying on a table. I want to calibrate the accelerometer to have those zeroed out values in the position the player is holding the phone at the start. I can't find out how to write the code to do that. Can anyone help me please?
@full pollen I think you can just get the accelerometer values on Start(), store them, and then add that data as an offset whenever you use accelerometer.
@plush prairie yes but the accelerometer values on start are incorrect
why the main menu on the phone can be seen through the buttons
Hi, i'm making a game, and have put rewarded ads for user to gain more in game currency. but, in my phone, when test it, it gives me more reward than it's supposed to, whats wrong ?
when i'm testing it in editor, it works fine
@chrome haven the image clearly has some transparency
i would suggest remaking the images and making sure this time they aint transparent but fully opaque
btw thats a coool looking main menu
does the background move tho?
Guys, I was learning how to use google firebase in Unity. While I tried to make a build to my android device. It is giving me following error
Do we actually need to download jdk set up an environment variable
It's already happens during unity installation, right?
@hazy kiln you have something configured on your path that is not looking at the openJDK installed with unity. I had a similar problem because I had an older version of Java installed and it was creating all kinds of headaches. I also believe somewhere in the settings you can change the version of the JDK you are using inside unity
@earnest yacht , did u solved it?
@hazy kiln I uninstalled my old java version and reinstalled unity on my case. not sure if it would be the same for you
@hazy kiln check this opost out
I have a problem showed on this screenshot - https://imgur.com/a/VGHrpVV
The problem has appeared when I imported GoogleMobileAds package to insert AdMob ads to my project. I tried to create 2 local
I have latest version installed along with Unity installation
Actually I never installed jdk manually. All I have is the one I just ticked during Unity setup
And I tried to create an environment variable with it's path. But it didn't worked
ok, then something went awry. Looks like it was a bug on 2019.1
perhaps is updated for the newer versions or LTS versions, if not check that post above, looks like exactly the way to rebind Java_home
right, that's the one I am talking about
send a screenshot of unity from "Edit->Preferences->External Tools"
alright, try to do a build again
if not uncheck, and recheck those boxes so unity does the rebind
Okay let me try
does anyone know how to optimize Loading.PersistentManager
@earnest yacht , that didn't fixed the issue
So my code works fine on unity tester but when i port to Mac -> XCode -> my iPhone nothing loads except the unity splash screen followed by the main camera background color. Any idea what’s wrong?
And it works fine on my phones aspect ratio on unity tester (19:6)
@hazy kiln post some logs for us to see as well as the initial build you have to have an idea of what is going on. YOu are definitely doing something unity does not like. Here are the steps from google to setup a project as well which I believe you already have https://firebase.google.com/docs/unity/setup
One thing I haven't configured SHA1 fingerprint
Now I think that can be a reason
I tried it but I was not able to get that. Then I stop doing it and continue
Now I doubt , Is that a reason for this
without more error logging hard to tell you. But if you didnt set up something most likely that's a reason its failing
@eternal violet pretty late with the answer but maybe your file isn't set as sprite in import setting
@earnest yacht , I configured sha1 fingerprint and set HAVA_HOME. But In it's giving me following error
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin
These are other errors
I've literally done that
so I am not sure why it does that
and this doesn't give any sense, when it's in
and what is this https://gyazo.com/2b6b4fe26023dda09391fd25305abc3f
IT'S LITERALLY HERE C:\Program Files\Unity\Hub\Editor\2019.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK
Finally, I fixed it
:)
Guy's my android SDK got corrupted is it possible to reinstall them
anybody please help?
Untick it in the Hub if you are using from there. Let uninstall then tick on again.
@hazy kiln try to remove/reinstall your unity from unityHub. When you reinstall it will ask you to install again the android NDK tools and OpenJDK. Also from the errors you posted is like google does not like OpenJDK on Unity. you can try java -v on the command promt and see if you get any result, that might be part of your issue
@earnest yacht , no other way ?
@hazy kiln if your openjdk is corrupt that is how you would reinstall it
okay
I dont know any other way of doing it that is not that
Okay, thank u @earnest yacht
the only other thing you can try is download openjdk on its own and do a local installation, then tell unity to use that version
Guys, does anybody know the version of android sdk that's been used by unity 2k19 I wanted to download it with sdk manager so I want to specify version. Anybody know the version njumber
hey guys ,im getting this error while trying to open unity through unity remote :Set-up Android SDK path to make Android remote work
i have SDK JDK NDK installed already
@mortal garnet Don't cross-post.
@odd arrow sure didnt know not allowed ,just trying to get diffrent option
HI is there a way to stop unity using adb while creating build for android ?
@still sinew why do you want to stop adb?!
I have written some powershell scripts and using adb to deploy many devices using wifi and everytime unity finishs a build all devices are disconnected.
probably unity kills adb server running on your machine to not waste memory
@earnest yacht , my jdk issue fixed, thank you so much
Hi
i am having trouble with unity remote 5 on android can somebody help me, i have installed the sdk jdk ndk and the google usb driver from android studio.
if this is not the right place to post this could u tell me too 🙂
Guys my android game works fine in Unity remote 5, but partially works when build and ran and tested on phone
any clues why
Hey guys can u help me make my game playable on the new iOS version
@tribal totem You should post an actual question if you want to get an answer.
So like my question is how do we make a iOS mobile game playable on new iOS versions that comes out?
This is a big problem? How can resolve?
Hello, Im running into a bit of a problem here and could use any helpful information if anyone has any ideas or experience with it, does anyone know why a Unity iOS app distributed through Microsoft Intune crashes on load where the direct ipa build to ipad and Testflight doesnt crash?
Is it the same IPA? I don't think that's something you'll get an answer for here... Probably would be best to ask on the MS/Unity forums
how make my game compatible to all screen for android??
good question indeed
guys, what is better? rigidbody.velocity, characterController or Agent.velocity to move the player character?
how make my game compatible to all screen for android??
@nocturne mulch https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/HOWTO-UIMultiResolution.html
@nocturne mulch https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/HOWTO-UIMultiResolution.html
@tame halo thanks 🙂
Can someone help me out with dealing with 4:3 aspect ratio tablets on android
I just wand to letter box the app so I changed the custom aspect ratio in the players settings to 1.86 but this had no effect
anyone got recent experience with the simplest plugin for dealing with Android leaderboards and achievements?
Hey guys! Every time I try to export my game Unity freezes at this point. What can I do to fix it?
For how long does it freeze? Is your main scene big? You can try checking your editor log, maybe there will be some helpful information there
It freezes forever. My main screen is a normal mobile screen. I've read some articles about trees freezing the export process but the article was about unity 5
As I said, you can try checking Editor.log, here you can find its location: https://docs.unity3d.com/Manual/LogFiles.html
You can also try to do a build without Main scene, check if it succeeds.
ok ,thanks. i will try
Hello guys, I really need help. I've been trying to implement parallax to my 2d game, but game becomes too laggy. I've tried several codes I found online, but on mobile fps drops below 40 when using parallax.
maybe it's something with the Update function?
sorry for bad English
@north flint that code looks fine. how many GameObjects are you updating with this Parallax effect?
@plush crater only 2
It shouldnt affect performance so badly, maybe try using profiler to find out what's causing lags?
but for some reason it does, when i remove objects with this script from scene game works fine
Do those objects have colliders (but no rigid body)? Moving static colliders can cause performance drop in some cases.
I launched my game from my phone but as you can see there are outlines even tho I set canvas to scale with screen size
The resolution I use is 720 * 1280 for the canvas
No1 ever helps me😭😭😭
@crisp kite can you show the inspector of the canvas?
my guess is that your canvas scaler / canvas setup does not support this extra long vertial aspect ratio
Hello, fellow Unity programmers, can someone help?
My C# task involves taking existing Java class and using the instance of class inherited from that one. The class itself is something like
public class SomeJavaCallback<T> {...}
And I know the exact Java type to use as T
So I know I can use AndroidJavaProxy to inherit my C# class from that one
class MyCallback : AndroidJavaProxy
{
public MyCallback() : base("android.lib.SomeJavaCallback") {}
}
but how do I fill the 'T' pointer?
@steel pecan
@crisp kite for getting good adoption for multible screen sizes / aspect ratios , i would cocidder a widged basd arproch to to UI implementation
in short: try to use the anchor points and layout fuctions to make them fit
the bar at the boittum should be scaled by the screen with, and be anchord to the button
the background could use the Aspect ratio fitter could be used to make the background allways fillt the screen and keep its aspectratio correct.
Hey, I have a question if anyone can help me. I am developing for Apple mobile devices and am experiencing an issue with PlayerPrefs. I am saving whenever OnApplicationPause is true, OnApplicationFocus is false, and OnApplicationQuit. I also load PlayerPrefs to their appropriate script partners on Start() as well and also have a coroutine that checks if the data has been set or not every 2 seconds until it has been set. Opening up the app on an Apple device for the first time I experience the PlayerPrefs not being set even though in the logs, they say that they are. Am I using the correct places to Load/Save the PlayerPrefs in the game? Any help or guidance is appreciated. Thank you!
Hello everyone, I am trying to use a Google sign-in api to get access token for using Google APIs in unity. I tried firebase but it does not return access token. Please advise on how to accomplish this :)
Hello Guys my problem is simple I guess but I fail because of that. I implemented Google Ad Mob, entered my app codes and resolved. Everything several times. but anyway my app crashed during android build directly. Does anyone have ideas what I can have done wrong?
@mortal jetty what's the error in the console?
@trail wing There is no error. It only crashes in the build.
ADB log?
I tried, looks like he's not responding. The game is crashed instantly.
It looks like the problem has a lot of people. But all possible solutions on the Internet are useless
What's wrong why this texture looks like 8bit
@open grove mabye texture compressiong?
Anyone integrated GAMEANALYTICS into his android unity game ever?
my gif recorder is bad quality so ignore the weird lighting but when i run this test on my computer it runs fine but when i run it on my phone it gets like 15 fps
also the ms is about 80 on mobile
i think it has to do with the shaders and lighting but idk what to do to make it run better without removing them
if anyone has any tips on what i should do so i can keep the bloom lighting but make it run better on mobile it would be really appreciated
plz
Hello guys, how much triangles and vertices should i aim for mobile game?
@uncut lark as little as possible.
if you can "cheat" your way into making your models look good with as little triangles as possible. do it.
@swift vapor Thanks, i will reduce that based on what is camera seeing. Right now i have something around 60k vertices and 36k triangles. What do you think about this numbers?
I got some input lag on my game that i wasnt able to see in editor
also, when i used profiler, PostLateUpdate.FinishFrameRendering is using 71.6% of cpu and i dont know what is this
Guys, how can I make my game to only be portrait for the game to not become landscape when you rotate your phone
@lime vessel go to player settings, Resolution and Presentation, and in Default Orientation choose Portrait
@uncut lark Thanks!
Anyone integrated GameAnalytics SDK in her android game?
Anyone here who can help me with an Google Ad Mob error
What error?
Anyone integrated GameAnalytics SDK in her android game?
@warm adder I guess very simple, I implemented Ad Mob (Newest 5.1.0) into my Game (2020.b.10) added my Ad Mob ID's and resolved. The Ad wont show in the editor and the build is cashing instantly. I guess I missed something
Where I can make terrain for mobile survival game
I have Samsung a70 and terrain in unity sucks always have frame drop when I looking on the terrain
How to fix that it's horrible I can't go forward
In this video we will learn several techniques to make the game faster in Unity 3d.
1- Occlusion Culling - Improve Game Performance (Time: 01:09)
Theory Link : https://docs.unity3d.com/Manual/OcclusionCulling.html
2- Audio Import Settings, WAV or MP3, Reduce Scene Load Time ...
Anyone integrated GameAnalytics SDK in her android game?
why when I look for the application in the play store it does not appear?
has it been published?
hoping you are reffering to your own app
Hey guys, after some days trying everything possible I have the same problem, Unity freezes for ever at this point. Any ideas how can I fix it?
How do i force disable the depth texture? The setting doesn't work as long as there's any PPS use of it.
Yea, I sometimes have the same problem. I fixed it by coping the project and deleting the previous one
And i make builds for both PC and android, so i cna't simply wipe the DOF or SSAO effect from the game
How do i force disable the depth texture? The setting doesn't work as long as there's any PPS use of it.
@iron pendant are u using urp or hdrp ?
I did a test in URP and Standard pipeline, URP will disable depth texture properly, standard does not
Then use urp cuz it is pretty good for every platform
I'm considering porting my game to URP but if i coud just disable the depth texture i could atl east get some kind of stable performance in the mean time
In my two tests i get 60 FPS but the standard renderer is just less consistant, but once i add dof to a vcam even if i don't use the vcam the performance drops like 25%
To be honest,I know of only that way of disabling the depth texture but you can check the graphics settings
So the existance of the depth texture at all harms performance
In my two tests i get 60 FPS but the standard renderer is just less consistant, but once i add dof to a vcam even if i don't use the vcam the performance drops like 25%
@iron pendant consider dropping the physics time or what was it. Called ?
thats the thing the graphics setting doesn't work :/
Ok, then I suppose use URP
That would take a while tho DX
Yes
one thing to port the shaders, but i have other stuff going on too
Ok,I will explore other ways to disable the depth texture
Maybe you can find something there
hmmm
Camera.main.depthTextureMode = 0;
no dice with this
no mainCamera.depthTextureMode = DepthTextureMode.None;
Have you tried those ?
yeah it still gets forced on
void OnPreCull()
{
mainCamera.depthTextureMode = DepthTextureMode.None;
}
This seemed to work
the DOF effect is still active but doesnt't work properly, so thats a start
Yea
It does not work in build though christ >:O
Hm i found this in the post processing stack...
/// <summary>
/// Override this method if your renderer needs access to any of the buffers defined in
/// <see cref="DepthTextureMode"/>.
/// </summary>
/// <returns>The currently set depth texture modes</returns>
/// <seealso cref="DepthTextureMode"/>
public virtual DepthTextureMode GetCameraFlags()
{
return DepthTextureMode.None;
}
might be rlated but doesn't make sense :/
This seems to disable depth when it's not needed...
I think this is what's preventing me from disabling the depth buffer when using PPSv2 . How could i override this As my previous effort didn't work.
in the DepthofField.cs there's this which i think is the main thing enabling it. But i don't think simply editing these is the best solution.
public override DepthTextureMode GetCameraFlags()
{
return DepthTextureMode.Depth;
}```
one of the SSAO scripts has a similar line:
```cs
public DepthTextureMode GetCameraFlags()
{
return DepthTextureMode.None | DepthTextureMode.DepthNormals;
}
So how could i best overide these commands?
Actually even commenting this out only works in the play mode...
Can someone help me with Unity Remote?
I did set it up correctly as shown in the tutorials
But it doesnt work
It works if I build and run the game, it directly runs the game on my phone
But playing the game from the editor doesn't works
@jade oyster In project settings, preferences, tick of the sdk box one, save the project, close it off, plug your phone in and such put on unity remote 5, then go to your project again, tick the box, save it, then go to build settings, and make sure you have your device selected, refresh if u cant see, then click play and u should have it workign
Thnx
Guys help https://discordapp.com/channels/489222168727519232/497872424281440267/717716293704351780
Unity says that JDK is not installed with unity but it is
Anyone here used admob?
i do
What do you mean by "working"?
coz i followed the steps on the admob unity integeration thing
and it doesnt seem to be working?
like the ad doesnt show up
I've followed a video I've found and it is working. I cand give you a link if needed
oh please! do! thank you!! ;D
i spent all day trying to get it to work
any links would be greatly appreciated
Two Cups Of Coffee Or Become A Pro Game Developer?
https://www.awesometuts.com/ultimate-game-dev-academy-dis?utm_medium=video_page&utm_source=youtube&utm_campaign=videos
If You Are A Complete Beginner And Want To Learn How To Make Games Click On The Link Below And Start Learn...
I used this one
also have u used android log cat beforew?
Not really
There seems to be missing something in your code I belive
You can send it here, if anyone wants to hop in and help
ok
hold on lemem get it
using UnityEngine;
using GoogleMobileAds.Api;
using GoogleMobileAds;
public class ADmanager : MonoBehaviour
{
private InterstitialAd interstitial;
string AppId = "";
[System.Obsolete]
void Start()
{
MobileAds.Initialize(AppId);
RequestInterstitial();
}
public void RequestInterstitial()
{
string adUnitId = "ca-app-pub-3940256099942544/1033173712";
interstitial = new InterstitialAd(adUnitId);
AdRequest request = new AdRequest.Builder().Build();
interstitial.LoadAd(request);
}
public void GameOver()
{
if (interstitial.IsLoaded())
{
interstitial.Show();
}
}
}
also, i quickly looked over on taht vid u sent, and i didnt do anything to the manifest, just so u know, maybe thats why
have you added the appID in your script?
yes
i think it may be something to do with the fact taht i didnt do some of the steps in the vid
so i will follow that
you should also add the appid in the manifest file
but if there are other steps you've skipped, the best bet would be to follow the tutorial
ye oki
good luck!
alright
@lapis hull
did u also have this?
where u click auto resolve
and it never actually finishes lol
You must wait
oh i do?
It takes quite a long time
oh damn
so if i had closed it
and then android resolved it
it wouldnt be same?
@lapis hull how long does it takew? mine is till on 10% lol
I don't really know, as I did it a few months ago, but as long as it didn't crash, that means it's really loading :)
wait
i just now scrolled down
and it says fialed to run
says this
is this because i didnt have advertisment package previously installed?
and only when i installed amdob i then installed it
@lapis hull whats this about
I have no idea tbh
The admob assets or what?
well u say that, but the reason the https://cdn.discordapp.com/attachments/534632293520769024/717733305654575194/unknown.png thing came up is when i installed it lol
as I said before, unity ads have nothing to do with admob
well u say that, but why does the android depencies not pop up when i dont have it?
like when i go to assets and its drop down
i cant see anything to do with the google mobile settings
everything you have to do is made through scripts
have you watched the tutorial I shared?
ye the dude installed admob ye, and soon after that he got that resolving thing
when i installed
it
i dont see play services resolver
i will try again now tho
that is the play services resolver though
mhmm
as he says in the tutorial "play services resolver>android resolver>force resolve"
ok i will try now
im importing
@lapis hull ok so which should i do first?
soon after imporitng
this came up
enable it
all
ok
oh ye i forgot to remove advertisements
crap, i will do it again
i get this error anyways
right at the end
13% tho now
🤷♂️
@lapis hull u see i dont see it
also, unlike the guy in yt, i didnt switch platform coz mine was already on android
so idk if thats why
what unity version are you on?
2019.3.14f1
should i build and run to my phone? maybe then it will recongize the platform or something
what should i do? why cant i see it
if you said you already chose the platform, then that is it
huh
so waht should i do tho? switch platform to windows and then back to android
or build and run on android
and see if that helps
are you sure you installed the admob assets?
that's really weird
alright
script errors huh
nice
right
ye i think its stuck again
its at 10%
and it says failed to run below
are you using the built-in jdk?
i found this thoso i guess i will follow it
and waht do u mean gamesky
im using the module
sdk module right?
for unity it comes with all of that
you can modify the jdk if you want to use other versions
which isn't the same thing with the sdk
so i should do the thing above? in the img
coz thats what the error had said for me
i did that way before starting adding ads
oh damn
i dint
didnt
so i will do it all over again, first that, then i will fix the scripts
and then i will install it
and it should work then 😄
hopefully 🙂
@lapis hull btw do u knwo waht "Right click on "my computer" and go to properties." my computer is? like where is that
aren't you using windows?
if you don't have a "my computer" icon, go to your folders, my computer and right click there
yeah
it brought me to : system and security > systems
and i dont see no advanced options
advanced tab
it just shows alot of windows info
advanced system settings
Ohhhhhhhh righttt
@lapis hull i dont see any java home variables D;
even when i scroll down
i dont see nothing about Java Home
I don't have any idea tbh. if you can't find any other solutions, either wait for someone else to help you, or search more
D:
i don't know why do you get that error though
since you use the pre-built sdk and jdk
ye
hmmm.....
i mean, it did have unity ads setup on it before
but i simply removed those
so idk
mhmmm
@lapis hull do u have java installed? just a quick q
like if u were to search java in ur window search u would find it?
I do
mhm...
i dont... coudl it be the reason?
"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.]" this was the error so i mena
as I said, since you are using the built-in jdk, that should not be a problem, but I may be wrong
yeah
i don't think so
@lapis hull AY BOR
I made it work i think
YE
i simply unchecked the jdk box
saved it
nice
then laoded it back on
and then checked it
and then did force resolve
and its workign 😄
@lapis hull wait do i even have to do the android manifest thing? coz on the documentation it just shows to go to google ad settings instead and put app id there
🤷♂️
yea
that is a common problem among admob users
D;
why is this how do i fix?
and also
it crashes on jsut a single tap on the icon
like it doesnt even launch the game
i don't know
@lapis hull doesnt crash
but doesnt show ad D:
is it something to do with my code?
ugh... same problem, i've tried what @midnight osprey said. Any new ideas?
Have you tried tuning down graphics settings ?
no, let me try it
Try buying it down to the lowest seetings
Oh, btw have you checked if anything in main scene has an error ?
Or a warning
no errors
what can i modify here
or it is good?
YES I FIXED IT
I turned down the graphics and i deleted an useless asset
i think that asset was the problem
thanks @midnight osprey for your support ❤️
That's ok
Thanks to you too since I too am working on a mobile game, if I encounter this issue I can try thease
Do u guys know why my admob ad isnt showing?
I think you need to publish the game in order to admob work. @eternal violet
@golden remnant have u used admob before?
i just put my first game on google play, i'm waiting to get reviewd. and i yes, in my game i have admob
cant u test if the ads work on unity tho?
using test ads
or something test devices as well
when i was building on my phone i didn't had any ads
same
i m waiting to see if i have ads after publishing it
:)))
hmmmmm
try it
btw, does ur code look like this?:
using UnityEngine;
using GoogleMobileAds.Api;
public class ADmanager : MonoBehaviour
{
private BannerView banner;
string AppId = "";
[System.Obsolete]
void Start()
{
MobileAds.Initialize(AppId);
RequestInterstitial();
}
public void RequestInterstitial()
{
string adUnitId = "ca-app-pub-3940256099942544/6300978111";
banner = new BannerView(adUnitId, AdSize.Banner, AdPosition.Top);
AdRequest request = new AdRequest.Builder().Build();
banner.LoadAd(request);
banner.Show();
}
}
1 sec so i can check mine
yes?
With the testing ads?
hell yea!!
i would screen shot it
but em
i cant be bothered xd
BUT IT WORKS
i can see it
:))))))
it says "nice job" " this is a test 468x60 test ad"
using UnityEngine;
using GoogleMobileAds.Api;
public class ADmanager : MonoBehaviour
{
private BannerView banner;
string AppId = "";
[System.Obsolete]
void Start()
{
MobileAds.Initialize(AppId);
RequestInterstitial();
}
public void RequestInterstitial()
{
string adUnitId = "ca-app-pub-3940256099942544/6300978111";
banner = new BannerView(adUnitId, AdSize.Banner, AdPosition.Top);
AdRequest request = new AdRequest.Builder().Build();
banner.LoadAd(request);
banner.Show();
}
}
@eternal violet it's almost the same
god damn so it works!! 😄
btw kenshe
heres the ID for banenr if u want
string adUnitId = "ca-app-pub-3940256099942544/6300978111";
this is the test one which works
try it out now
on phone?
okok let me try it
🙂
HOW IS it brother, is it workign? 😄
i need to find my damn cable ffs, i m always losing it
rip xd
brb :))))
@golden remnant do u think i can have 2 banners? on one screen?
public void RequestInterstitial()
{
string adUnitId = "ca-app-pub-3940256099942544/1033173712";
interstitial = new InterstitialAd(adUnitId);
AdRequest request = new AdRequest.Builder().Build();
interstitial.LoadAd(request);
if (interstitial.IsLoaded())
{
interstitial.Show();
}
}
why doesnt this work ;p
🤷♂️
anyhow, hows ur banner doing?
not building the scene like before
mmm
if u could specify any errors i maybe could help, but otherwise i never had anything like that
Job failed with exception: GooglePlayServices.JavaUtilities+ToolNotFoundException: jar not found.
at GooglePlayServices.PlayServicesResolver.ExtractZip (System.String zipFile, System.String[] extractFilenames, System.String outputDirectory) [0x000a9] in /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:2098
at GooglePlayServices.ResolverVer1_1.GradleResolution (System.String destinationDirectory, System.String androidSdkPath, System.Boolean logErrorOnMissingArtifacts, System.Action`1[T] resolutionComplete) [0x000ff] in /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:695
at GooglePlayServices.ResolverVer1_1.DoResolutionUnsafe (Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, System.Action resolutionComplete) [0x000a1] in /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:1258
at GooglePlayServices.ResolverVer1_1+<DoResolution>c__AnonStorey21.<>m__3E () [0x0000d] in /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:1140
at GooglePlayServices.ResolverVer1_1.UpdateTryResolution () [0x0003a] in /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:1155
at Google.RunOnMainThread.ExecuteNext () [0x0003d] in /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:377
UnityEngine.Debug:LogError(Object)
i get this error every time when i open my prject
- have u put ur app id and app name in manifest?
yes i have everything in admob
yes
yes i think is from google services resolver
okay so i think maybe u should force resolve again? possibly im not sure
what do u think
wait
kense are these errors?
or warnings?
it's one error
oh i thought
all of it was one big error
coz i later realized
i think i seen it in my android log cat also
it is one big error lol
mhm
clicked the force resolve and nothing happened
hmm, that may mean perhaps it doesnt even do it czo u may already have it? or something
also , i guess i mean try unticking jdk in preferences, save project, then load again, and tick it then force resolve, idk if it would fix yo problem, but i dont see wy not try
ok i will try it
after that, even if it sitll dont show up, just build adn run and see if improved
ok
I'm trying to figure out what type of game or style or battle it is in games where you don't battle but summon/make /earn people to fight for you in games (sorry if this is not the right chat to ask) and game I mean is like who battIe cats you click on a character and it moves on it own if that help any
lul
found the fix
what was it
i need to play the game in unity and the resolver runs automatically
interesting
Nice bro!
thats a cool looking game!
as well
xd
btw, have u ever made any interstital video code?
im not sure if mine one works or not
i dont have interstitial ads
nope
god admn it, why is admob so hard on me xd
it s pretty hard
i thought i legit made it work for a second but whnei build again this happens
do you have java on your pc?
ye
hmm
mhmh
@golden remnant ok i htink i made it work xd
currently building no problems but i shal see
basically i been getting java home problems
error
hmm
Anyone have experience with ios lighting?
hi all
Someone used InputSystem on android?
I have a question. How can I make a virtual joystick that will issue the events I need to the system
If I blur on the pictures, he may not give me a copy right?
@fast bison Why would you need a virtual joystick anyways you have to explain so I can help you achieve your goal
ok
ok
Guys has anyone here used admob?
I used it last year
@warm adder have u had interstital ad video working?
IEnumerator RequestInterstitial()
{
string adUnitId = "ca-app-pub-3940256099942544/8691691433";
interstitial = new InterstitialAd(adUnitId);
AdRequest request = new AdRequest.Builder().Build();
interstitial.LoadAd(request);
interstitial.Show();
yield return null;
}
this is my current code
im using the test ad id
and it doesnt appear to be working
like its not showing ad
No i wasn't implementing those. Are other ads from admob showing? Or is it the only ad type you have?
yes i have banner ads
showing
Btw i do get some odd looking warnings on androiud log cat
but idk if those are because its intersitital ad
compared to the banner one
what warnings?
hold on lemme screenshot
the big chunks seem fine
but its those webview destroyed im kinda iffy about
and the very top image, idk if those are good or not so
@warm adder
i'm not sure about warnings in screenshots
how did you get this adUnitId ?
you can use interstitial.IsLoaded() to see if ad was loaded, maybe it's not loaded yet when you try to show it?
also
interstitial.OnAdLoaded += HandleOnAdLoaded;
maybe try doing something like this, and in HandleOnAdLoaded try to show it?
that's what I can suggest from looking at documentation, I didn't used it myself so can't be sure what's wrong
i will tyr the if (this.interstitial.IsLoaded()) {
this.interstitial.Show();
}
first
and then the event
IEnumerator RequestInterstitial()
{
string adUnitId = "ca-app-pub-3940256099942544/8691691433";
interstitial = new InterstitialAd(adUnitId);
AdRequest request = new AdRequest.Builder().Build();
interstitial.LoadAd(request);
if (this.interstitial.IsLoaded())
{
this.interstitial.Show();
}
else
{
interstitial.LoadAd(request);
this.interstitial.Show();
}
yield return null;
}
ok i will give this a try
You can put the debug.log with "not loaded" message in else, just to know thats happening and ad is not loaded
oh wait
mmm..
i just remembered
that the coroutine gets called once rght
so if it aint loaded it will just end it
but i will tyr this anyways
you can try something like thi
interstitial = new InterstitialAd(adUnitId);
AdRequest request = new AdRequest.Builder().Build();
interstitial.LoadAd(request);
while(!interstitial.IsLoaded())
{
yield return null;
}
interstitial.Show();```
IEnumerator RequestInterstitial()
{
string adUnitId = "ca-app-pub-3940256099942544/8691691433";
interstitial = new InterstitialAd(adUnitId);
AdRequest request = new AdRequest.Builder().Build();
interstitial.LoadAd(request);
while (!this.interstitial.IsLoaded())
{
interstitial.LoadAd(request);
yield return new WaitForSeconds(1);
}
this.interstitial.Show();
yield return null;
}
lol
as u posted that
i made this
ighh
ohh
maybe i shouldnt be loading it over and over?
i think it shouldn't
k i will tyr yours
you load it once and then wait for it to load, I think
ok
also there is possibility that it will never be loaded (due to some errors or something) and it will be always in this loop, better to add some checks or timeout to stop this while loop
ye i added a wait 0.1 sec
@warm adder AY BROTHER
WE HAVE SUCEEEDED
xd
it worked
thank u bro
no problem, glad I could help
but I would suggest to do something like "if ad isn't loaded for 30 seconds, stop checking if it's loaded"
mhmm... im not sure how id do that
interstitial = new InterstitialAd(adUnitId);
AdRequest request = new AdRequest.Builder().Build();
interstitial.LoadAd(request);
float timeoutTimer=0;
while (!this.interstitial.IsLoaded())
{
interstitial.LoadAd(request);
yield return new WaitForSeconds(1);
timeoutTimer+=1;
if(timeoutTimer>=30)
break;
}
this.interstitial.Show();
yield return null;```
simply checking the time, maybe 😉
ah okay
xd
ok thanks i will tyr that
also i have another q, can i have 2 banners at the same time on one screen? xd
One more thing with interstitial, worth reading/doing
no, I dont think it's possible to have 2 banners
wait
but wahts the point of that? mhm..
doesnt an intersitial ad
like destroy itself?
after 5 seconds
Well, apparently no, looks like you have to destroy it after it is closed to prevent memory leaks
ok
@fast bison Why would you need a virtual joystick anyways you have to explain so I can help you achieve your goal
@lyric path Thank you, I have already found a solution. On-display joystick script
Guys, when i have admob installed and everttyhign works, i simply switch out the ad id to the real one and save,build the apks, and its ready to be published?
@warm adder ye?
Yeah I think so, don't remember if I had to do anything additional when publishing 😉
and what about untiy?
its all good as it is?
nothing extra
or anyhintg
@warm adder btw this is all good?
seems fine?
Okay glad its fixed
Probably yes, hard for me to say as I dont really remember
oki
oh also
molioo do i have to setup the app ids text thing?
For AdMob to find and verify your app-ads.txt file, be aware of the following: Your app must be registered with Google Play or the Apple App Store. The store listing for your app must i
do i have to do this?
did you do this?
tbh I dont know, I didn't create any txt file like this
oh ok thats fine then
anyhow i realized it says i must hae app registed with google play
for that to work nvm then
anyhow i dont have a dev webs
Well yeah if you want to earn money with admob you have to have it published on google play or ios appstore
what do you mean it works? and on what platforms?
by that i mean, it displays ads on platforms such as amazon app store
oh, okay, maybe i'm not right, I thought you have to have your game published to actually show ads and earn money from them
didn't publish anything on amazon app store btw
neither did i, but on google it says it should work
i should still earn revnue im pretty sure
What is the most simple method to make a cube glow? i am making a mobile game and i want to have glow effect on a cube which is constantly changing its scale in Y axis. Since its a mobile game I want a method which least performance intensive.
@warm adder
do i need firebase linked?
is that for like data stores
ro something
It is not essential, your game and ads will work without it
ok nice
check their webpage to see what it is for
@warm adder i contacted admob support regarding some odd error i found and look
damnn
feels good to have helped em out with some error regarding test devices lol
when testing ads
out of curiosity, what odd error?
it was soemthing to do with request configuration
not having a defintion of build
but ye basically
the documentation on admob
for test devices
was wrong compared to the github one
and now they are changing this xd
oh ok, glad you found the error, it always feels good to help 😉
ye it feels really good and kinda insane, like i helped google
google...
really cool
and probably helped some other future devs looking for information in their documentation
ye
i mean, people could still use test ads but they simply
would never be able to see their acutal ads
coz the test device documentation was wrong and theyd be confused and all lol
@warm adder btw do i have to sign in payment info on the platform im publishing to? or jsut admob
i wqill have no in app purchases and the app wont be paid access only so
No idea tbh, but I don't think you need payment info on publishing site if it's free and withour iap
mhm
@warm adder in amazon app store, they give this info
do i have to exchange this app id for the one used in admob? or nope
im pretty sure not but like double checking
also it says on top: " app submission API KEYS"
I don't know. As I said before, I never published anything on amazon app store 😉
@warm adder
i have two apk files
what should i put? ;-;
theres the arm64 one
and the other one
if i put both, will amazon know that ones for like 64 bit systems?
@eternal violet First Hi, im currently also wokrinmg on doing Ad Mob, I showed in here and heard you also have Problems with it, what was it
oh, im fine now,but i cctually have a few Q
when publishing, do i just switch out the ad id
to the real one and thats it?
no additional stuff needed to do? ready to publish?
I guess so
to the real one and thats it?
@eternal violet
ok nice
also when amazon ask for apk files
what should i put?
both in?
but then how does it know taht they are differenty? like ones for 64 bit systems
Wait
When you build with Google Dev or so enabled
then it will give no apk its an aab or so is this file format allowed
Yeah
this is best for Playstore
thenm its an fomrat t hat playstore is automaticly finding the best cversion for the phone
but idk if the Amazon store supportes this
mhh
okay
So I take the chance when I speak with someone who has AdMob up and running
So my Problem is when I build my Game (Android) with Ad Mob Imported the game crashes instantly
When I delete the Ad Mob files all is working fine
listen
Yeah
u gotta put the app id
and value in android manifest file
also make sure in google mobile settings thing
u also did the app id
and value thing
So on both
yes
also for value
its like com.something.something u know ?
like project name thingy
not really name but
ohh
great to knoow
At the point where I started to search for the zstart of your conversation here in the channel
I noticed that I was not the only one who has been looking for help with ad mob for a long time
I try it now
ouf
therefore i basically helped tons of future devs
basically i contacted the google team about an error i found
and they realzied their mistake
and now they will update
the documentation soon xD
coz their doucmentation was diff to their github
so it made errors
did you asked for a persentage of their revenue
So do i have APPLICATION_ID in here <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-2504294990373506~4908256998" />
But I guess its a great feeling
ye exactly the android name is like that but 3 words
com.Company name. project name
And if you want you can write this is your cv
OH yea
i never thought about my cv
now that u mention
it
it does sound great xd
Helped the Google Ad Mob team
But its great if you helped a big dev concern
so i changed the app id
I started building
but now in my Manifest there is a third line with the old "APPLICATION_ID" in it
ye em, <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-2504294990373506~4908256998" /> i fu see another one like this, jsut delete it and keep yoru original
u should have only 1 when building
and then when u built it
unity will make another one
and u can just ignore that one
okay
I wanted to be sure at first, I had the problem for a long time, nobody could help me, I imported Ad Mob so many times, till I have started learning flutter in the last few days