#📱┃mobile
1 messages · Page 32 of 1
hmm what about Time.realtimeSinceStartup
but I wonder if it gets updated during a frame
using processinTimePerFrame with the value of 1 second actually is much slower
( ~ 8 seconds compared to if i remove the yield inside the loop altogether - it runs under 1 second )
because then you wait a whole second
the smaller processinTimePerFrame the longer i wait
should also probably set it before you start the loop
Add this before you start the loop:
nextYieldTime = Time.time + processinTimePerFrame;
but then again, it wouldn't yield at all
we can use DateTime
it doesn't yield once
used ur snipper with absolute time
var nextYieldTime = Time.realtimeSinceStartup + processinTimePerFrame;
while ( Q.Count > 0 )
{
if( Time.realtimeSinceStartup >= nextYieldTime )
{
yield return null;
nextYieldTime = Time.realtimeSinceStartup + processinTimePerFrame;
Debug.Log( iterations );
iterations = 0;
}
}
ill try DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond *
public float processinTimePerFrame = 0.01f;
///before the loop
float nextYieldTime = DateTime.Now.Millisecond + processinTimePerFrame;
/// in the end of the while loop
if (DateTime.Now.Millisecond >= nextYieldTime )
{
yield return null;
nextYieldTime = DateTime.Now.Millisecond + processinTimePerFrame;
}
try that
int maxMillisecondsPerFrame = 23;
System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
private IEnumerator Bla()
{
stopwatch.Start();
if(stopwatch.Elapsed.TotalMilliseconds >= maxMillisecondsPerFrame)
{
yield return null;
stopwatch.Reset();
}
stopwatch.Stop();
}
not sure if System.Diagnostics.Stopwatch is ok for mobile tho 😄
btw, you can make it even faster by making it into several jobs.
a compute shader will be even faster, although I'm not sure if it's available on mobile.
Some changes to display progress per frame to the user in real time:
public float processingMillisecondsPerFrame = 10f;
///before the loop
float nextYieldTime = DateTime.Now.Millisecond + processinTimePerFrame;
/// in the end of the while loop
if (DateTime.Now.Millisecond >= nextYieldTime )
{
newTexture.SetPixels(newColorsArray, 0);
newTexture.Apply();
yield return null;
nextYieldTime = DateTime.Now.Millisecond + processinTimePerFrame;
}
DateTime.Now.Millisecond - doesn't work
@final lava eeeh, why?
idk
Ah I get it!
the value was too small
it should be in ms, so set it to 10, as I did in the code above.
float GetMS () => System.DateTime.Now.Millisecond / 1000f;
var nextYieldTime = GetMS() + processinTimePerFrame;
while ( Q.Count > 0 )
{
float ms = GetMS();
if( ms >= nextYieldTime )
{
yield return null;
nextYieldTime = ms + processinTimePerFrame;
Debug.Log( iterations );
iterations = 0;
}
that's what i have tried
brb
hmmm
You should probably get the time again after yielding, because now you're passing the value from the previous frame.
float GetMS () => System.DateTime.Now.Millisecond / 1000f;
var nextYieldTime = GetMS() + processinTimePerFrame;
while ( Q.Count > 0 )
{
float ms = GetMS();
if( ms >= nextYieldTime )
{
yield return null;
ms = GetMS();
nextYieldTime = ms + processinTimePerFrame;
Debug.Log( iterations );
iterations = 0;
}
here's another attempt :)
System.Threading.Tasks.Task.Run(() =>
{
long result = 0;
while(result++ < 100000000)
{
// heavy stuff
}
Debug.Log(result);
});
are threads safe for mobile tho ?
no idea
Did you try with my latest fix?
( Date time miliseconds didn't work , stopwatch worked only for the first iteration then stopped working )
ye
Weird. Should be working...
Should be. It's a system thingy. It runs separately from unity...
Although...
Nah, should be changing.
so while i debug it seems to change
ah lol....
the delay of me pressings the button is what propagates the time ( even tho its the debugger , DateTime is System Time )
? Oo
i put a debug break point inside the loop
so each time it stops , the DateTime keeps on going forward xD
Lol. Just leave a Debug.Log
make it log every 100 or 1000 iterations 😄
hhh yea lol ill do that
That's an option, but that wouldn't be optimal, as you have different processing power on different devices.
so those are milliseconds without the seconds
what a twist
System.DateTime.Now.Millisecond / 1000f
Without the seconds?
each 5 k iterations i log the GetMS() value
so the DateTime returns the milliseconds part without the rest
Ah
Seconds returns just the seconds , hours just that , etc
it gets tricky if we use it for an accumulator since there is the turning point at 1 to 0
I think so.
Perhaps a stopwatch would be an easier solution indeed.
Yeah, I'm reading into the DateTime docs and I feel more and more that it's pain in the ass to use it...
Or using Ticks
DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond ?
Yeah
hmm?
what is 10000?
TicksPerMillisecond == 10 000?
yeah makes sense, as there are 10 000 000 ticks in 1 second
it's just a way time is measured in c# apparently
okey
A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond, or 10 million ticks in a second.
that's a lot of ticks
The value of this property represents the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001 in the Gregorian calendar, which represents MinValue. It does not include the number of ticks that are attributable to leap seconds. If the DateTime object has its Kind property set to Local, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the local time as specified by the current time zone setting. If the DateTime object has its Kind property set to Utc, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the Coordinated Universal Time. If the DateTime object has its Kind property set to Unspecified, its ticks represent the time elapsed time since 12:00:00 midnight, January 1, 0001 in the unknown time zone.
i see
well removing the yield's sped it up 100 times fold so its already an improvement
right now its tolerable 1 ~ 2 seconds max
hopefully it will not die once i try and parse the raster data to vector path
🤞
Did you not manage to make it run over several frames?
yea with the stopwatch it did the trick
if(stopwatch.Elapsed.TotalMilliseconds >= maxMillisecondsPerFrame)
{
yield return null;
stopwatch.Stop( );
stopwatch.Reset( );
stopwatch.Start();
}
oh so this is what I forgot
try adding this before the yield to have visual feedback of the progress:
newTexture.SetPixels(newColorsArray, 0);
newTexture.Apply();
I wonder how it would look like
🤔 that could be neat
ill upload a gif if i get my post-coroutine mess working together with texture apply
👍
I think so.
excellent
for speed, perhaps you could use CopyTexture instead of Apply...
ah, but it still needs a texture, so nvm
lol , i understand shader is my only hope for maximum speed
yeah
hopefully i can get away with partial murder here
or multithreading
that is intriguing
doubt ill have the time to use more then 1 core for the task at the same time
why not?
( afaik regular threads run on 1 core only )
you could use jobs to run on multiple cores
and i know nothing about multithreading so it will take me longer to learn about it then its worth for the problem at hand
true that
Also, I'm pretty sure there are more viable algorithms for flood filling that would run fast even on 1 thread.
ms paint somehow manages to do it.
lol
boundary fill should be faster
didn't try it yet ( nor i know how it works )
flood fill was just too ez to implement so i started with it
anyways, there's space for improvement.
nice
maxMillisecondsPerFrame = 10
on mobile you can probably bump it to 20
since the default frame time is 33 ms I think
if vsync is on
🙂 i could bump it to 50 and show a loading dialog
how can it be so fast ?
different algorithm most likely
i might try this one
you can split your algorithm into pieces and profile to see what makes the biggest impact too
ah yes , the profiling
creating new structs for directions might have some impact
considering how many times you do it
you could also avoid that with recursion for example.
does Enqueue ( struct ) takes a reference ? so if i change the value after it will not impact the already enqueued value ?
recursion was the first thing i tried
stackoverflow error
i didn't use the GetPixelS nor SetPixelS yet
oh really?
yea
k right now im getting 6 ~ 7 k operations per 10 ms ( GetPixel & SetPixel )
using GetPixels32 and SetPixels32 im getting 9 ~ 10 k operations per 10 ms
just noticed something freaky
independent fill regions will have symmetric bug / cut off area where it fails to fill
hi! I have a question about android audio
when i set the audio manager mode to MODE_IN_COMMUNICATION
the volume buttons change the voice volume, but unity still outputs to the media volume
is there any way to output to voice volume instead?
anyone here use BranchIO for their app attribution platform?
Hello
I there anyway to add PhysicsMaterial (friction) to a top down game?
I have spent the whole day trying to find an answer but there seems to be nothing for friction on a game
@grand adder add opposite force based on the current acceleration / or modify the velocity in real time while multiplying it by a scale factor less then 1 ( for example 0.985f )
anyone knows how to make VS debugger work on Android ?
i tried this but without much luck , link : https://forum.unity.com/threads/attaching-monodevelop-debugger-to-an-android-device.245814/#post-3509124
it scales to the edges of the screen, if you want to use the safe area you can get information about it on the current device from Screen.safeArea
also there are plenty of solutions around the unity forum for that, in case you want to save some time
can u set custom android notification with the unity android notification package? And also is there anyway to stop the repeat alarms from grouping?
Im just looking for documentation/video for 3d mobile joystick movement, thanks and if u can help I would rlly appreciate it.
Simple terrain fps drops from 60 to 20
When i look at standard flat unity terrain
How to fix that
editor runs super slow but my game runs smooth on mobile
any ideas what the problem could be?
oh apparently unity remote slows down my game to a crawl
In the mobile player settings, I find these graphic settings. Does the order mean anything (I can change the order of em)
It seems Unity 2019 is implicitly not working with iOS10 (only tested on one project), if anyone experienced similar issues and solved it, please let me know, thanks!
objc[6058]: Class PLBuildVersion is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x123207cc0) and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x122bb76f0). One of the two will be used. Which one is undefined.
objc[6058]: Class VCWeakObjectHolder is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GameKitServices.framework/Frameworks/ViceroyTrace.framework/ViceroyTrace (0x11f836ca8) and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.3.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GameKitServices.framework/Frameworks/AVConference.framework/AVConference (0x11f768cd0). One of the two will be used. Which one is undefined.
2020-07-19 09:06:56.572 myApp[6058:352854] Error loading /(removed)/myApp.app/Frameworks/UnityFramework.framework/UnityFramework, 265): Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /(removed)/Build/Products/ReleaseForRunning-iphonesimulator/UnityFramework.framework/UnityFramework
Reason: no suitable image found. Did find:
/usr/lib/swift/libswiftCore.dylib: mach-o, but not built for iOS simulator
prob something to do with googles unity jar resolve, swift and cocoapods. i will try find a solution
I got it working with the iOS10 simulator when I set "Always Embed Swift Standard Libraries" on the Unity-iPhone target.
Will see if it will work on the user's iOS10 device which reported the issue
Is there a quick way in xcode to test the simulator when I set my Target SDK in my player settings to Device SDK, or do I have to rebuild it using Unity with it set to Simulator SDK
Okay I fixed it without the xCode stuff, the underlying issue was I was using a particular Unity asset that messed around with Swift. Sorry for the spam guys. I used an open-source alternative asset instead and it works seamlessly without requiring me to faff about with xcode build settings
Hello, do you guys have any recommendattions regarding performance optimization tools? I want to optimize performance for android (and iOS) but am not quite sure which assets to go with when it comes to mesh combination, mesh optimization (poly count reduction) and automatic LODs. I would greatly appreciate any advice 🙂
@glossy sluice Note: For Unity Remote to work, you need to have the Android SDK on your development machine.
nope android sdk
do you have enabled the developer mode and usb debiggung on your phone?
@floral palm you solve your building issues?
@latent violet yes I just change IL2CPP to mono
but i cant upload it to the playstore
because its in mono
I was able to solve mine with the IL2CPP support
@floral palm i was told to update one of my package
It seems this error can occur when you have a old package in your project
so, i have to update the sdk ndk and jdk?
Not the SDK, Ndk and JDK
ok
So you have any package in your project?
Like Google mobile ads package, easy save, playmaker e.tc
no
Any package that you imported
@floral palm you downloaded from unity Hub.... Right?
yes
no jdk i sowlanded frontal Oracle
dowlanded from**
sorry my keyboard is in spanish XD
Hello, do you guys have any recommendattions regarding performance optimization tools? I want to optimize performance for android (and iOS) but am not quite sure which assets to go with when it comes to mesh combination, mesh optimization (poly count reduction) and automatic LODs. I would greatly appreciate any advice 🙂
@wanton narwhal I don't know about Android, but for iOS, here's a screenie. Also set the LightMap encoding to low, graphics quality to low, you can also optimise the size of the SFX (and you should use certain audio settings for SFX vs Background Music), Symlink Unity Libraries for faster build times (if you are exporting and using the xcode project in the same machine) and set the Compression method to LZ4HC.
I remember watching a few mobile optimisation vids on YT, but that was a few years ago so I forgot https://www.youtube.com/results?search_query=optimise+unity+mobile
I need to make a concise cheatsheet for this
@sonic quiver thank you so much! Many of these things I already applied to my project, but some are still missing and will hopefully help my game. I appreciate it!
Np, hopefully we can find some more cool optimisation tips!
Just found this setting but I left it disabled. Also use TextMeshPro (you probably already do) and not unity text (imo Unity should implement a warning if not already saying TMPro should be used when Unity text component is added)
I'll watch more optimisation videos and tips before releasing my game in a few years
what do these errors mean
@dusk nest problems with package. Try updating the ui package.
@iron acorn thank you
Can someone help me out..... I got this error while building
@latent violet what's in the console?
@iron acorn
@latent violet can you paste the whole error(the first one)?
ye i can barely read that
https://github.com/LayalHF/UnityMobileTouchSamples
Hey guys, this is a project I'm having fun working on about different samples of touch controls in a 3d game . feel free to check it and use what you want from it.
i connected my android 9.0 tablet to my laptop
@glossy sluice i had an issue with unity remote 5 it turned out i had an error in my unsaved scripts and didnt see the error in the console which was weird.
@iron acorn
@latent violet check the NDK is its linked in Unity, and if its updated . in the preference settings
@sharp anchor it's linked since i downloaded it from the Hub
Am on unity 2019.3.5f1
and in the preferences is there any notice note?
@sharp anchor no not really...... All the NDK, SDK and JDK are all checked
@sharp anchor no not really...... All the NDK, SDK and JDK are all checked
@latent violet and no pop-up error window when your build is failed?
@sharp anchor no not really...... All the NDK, SDK and JDK are all checked
@latent violet even if checked unity will tell you if the NDK is the recommended one or not, so not even a notice on that?
https://forum.unity.com/threads/android-ndk-missing.689122/
maybe this will help check what kind of error he is facing
also make sure your unity hub is updated atleast to v2.0.4
Any mobile HYPER-CASUAL game dev here? Im offering publishing deals! I just got accepted into a mobile publishing company and now i work in that! PM me for more info!
@sharp anchor am using the latest hub 2.3+ but I discovered that removing the strip engine code in building settings makes it build well
But the bad part is that un Enabling the strip engine code will result in big apk size
@glossy sluice do you guys test on Android too?
@glossy sluice do you guys test on Android too?
@latent violet Yup!
.
Hi guys, not sure if this is the correct place to post, but I am having a problem with URP and android build. In the build, if I have checked "Opaque texture" in URP settings, all the UI is invisible. Anyone had this issue?
hi. has anyone got some tutorials about how to do in-game economy (a store where you can buy "skins" and rewarded apps witch gives different amount of coins every time you play it after the level is over)?
hi. can anyone help me with unity game app? it does not want to install on my phone
what do you mean about "unity game app"? @tribal spear
it crash at end of instalation
so unity crashes when the build it's over?
i need to make a joystick which controls rotation and position at the same time
can anyone give me tips (like which application i can download from the asset store) on how to create an app like Shimeji desktop application?
I want to create an app like it but on mobile
@uneven flame you'd have to look into device/platform specific tools (Android Studio or Xcode) if that's even possible.
oh okay thank you @mild copper
@uneven flame noprob, good luck 🙂
A little late to the party but - if you're talking about just having that behavior inside your own app you can, but doing it over other apps or the homescreen is probably impossible on iOS because they wont let you draw over other apps etc. Android you probably want to look at building a screen overlay.
@languid prism Oh okay. Yeah i heard it is not possible on iOS since they do not have the option to allow to draw over other apps. However, for Andriod, do you think a screen overlay from Unity would be more efficient or should I look at Andriod Studio and understand their IDE and code through that like what dcwilson303 was suggesting?
from the top of my head and with the little knowledge of what I have about screen overlay in Unity, I just feel like it might not work well when trying to make a chibi do stuff outside my application/draw over other apps
but i could be wrong
because it might be possible to create a an icon that has a transparent background
and have it run around on a screen overlay
Anyone got any good recommendations of assets/tutorials for NFC communication on Android? I actually did it a few years ago, but im guessing my stuff is out of date 🙂
How do you upload an application to mobile, do you have to contact google play or is there a way to do it privately?
If its Android, you can sideload it. Look up "Unity Android sideload" on google, theres a fair few tutorials going around
If you want it on a private store, you can create a google play listing but keep it private. Or, build it out to an apk, then download it onto the phone, it can be installed by accessing the file through the android (for if you want to use a private webserver etc)
Has anyone used Unity Remote5? The app has a horrible rating on the app store with a ton of people saying it installed malware that blasts you with ads
I haven’t used it in a while but 1) I don’t recall there being any ads (that seems strange) and 2) I found the latency to be too much for it to be useful
@sour moat Same. I haven't seen any ads in the app, but there is a visible amount of lag and also, sometimes it messes up your UI resolutions. The way that you see the UI in Remote5 is different from what you see once you export it as APK and check it. So if you go about fixing all UI placements and size with reference to Remote5, you are in for a surprise 😄
Has anyone used Unity Remote5? The app has a horrible rating on the app store with a ton of people saying it installed malware that blasts you with ads
@sour moat i use it to directly test and debug on my mobile screen. It is f i n e as i only care to test my screen touch event and remote 5 is only made for debugging and testing on your phone directly from the editor, Unity docs clearly say you will see low res graphic to have better performance while debugging.
you can read more about it here:
I did not face any ads
Thank you all for you answers! Much appreciated!
Hi guys
I need help
Unity remote 5 not working
I need to download android studio?
hello
https://www.youtube.com/watch?v=bp2PiFC9sSs
in this video will show you exactly how to use Unity remote
Let's learn how to make touch controls in Unity!
GET UNITY PRO: https://on.unity.com/2N3FACS
● More on Unity Remote: https://bit.ly/2OehNon
● 2D Shooting: https://youtu.be/wkKsl1Mfp5M
♥ Support Brackeys on Patreon: http://patreon.com/brackeys/
·····························...
exactly at time 1:35 min
I need to download android studio?
@fiery jetty you only need Unity engine (build settings should be set to android or ios depends on your phone) ,then you install Unity remote 5 plug it in your laptop make sure you have "usb debugging on" and "file transfer" mode in your phone. open Unity remote 5 then go to Unity software edit > project settings > editor and set the option to your phone (android for example)...hit play, wait about 5 seconds and poof~ it should work
Unity remote 5 not working
@fiery jetty make sure your scripts are saved and you have no errors , unity will tell you if there's errors
Hey guys, I implemented unity Ads correctly, but it seems like they never load. I built multiple times, built my stuff around it and stuff like this, so it should load. I don´t know why, does anyone have a clue?
And I also tried to setup Unity Remote, but it says "set up android SDK path", but I think I set it up correctly via a tutorial. Do I have to run an .exe or something?
Hello guys, anyone used new Input System for Android device? I need to track more than one position of fingers and i don't know how i should to do that
I want to make joysticks for my game, but i can't find any way to made it
EDIT: Oke, like i see on the internet, i can use position from PointerEventData
I have a problem, I have a volume slider, that works perfectly on pc, but doesnt work on mobile, any ideas what could be the reason for this
@safe escarp you can't programmatically set system volume on mobile devices, only the volume of individual sounds
Hey guys, I implemented unity Ads correctly, but it seems like they never load. I built multiple times, built my stuff around it and stuff like this, so it should load. I don´t know why, does anyone have a clue?
And I also tried to setup Unity Remote, but it says "set up android SDK path", but I think I set it up correctly via a tutorial. Do I have to run an .exe or something?
thx @latent osprey
I also wanted to ask: Is it possible to adjust graphics settings with scripts via something like a dropdown menu on mobile?
You can use QualitySettings.SetQualityLevel to change quality level
or change any specific setting, here you can see them
thx
Anyone know how to solve the issue of entering too many characters into input field crashes the app on mobile (Android/iOS)?
Character limit is set (the crash happens before it reaches the limit) and input handling is set to new package. It works fine in editor but crashes in builds.
hi I have a Question Kindly Tag me while Answering I Want Touch Controls for movement crouch,prone and stand feature fps for android with touch controls anybody has made if yes pls help me
Hi everyone
What is the min Android Target API version in Unity 2018?
I need help with my mobile game I'm trying to make the screen size fit all phone but in some phone the button are way lower or upper to the screen
The game is in 2D
@glossy sluice ye
phone screen sizes have different ratios
so you gotta set anchor two corners
on the screne
of the button
Thanks but how do u do that sorry this the first game I make I'm all new to all this ;-;
im not gonna lie, i dont really know never did it myself but i know, or am pretty sure thats what u gotta do
just google it i guess
but the anchors
should be in the buttons transform
Yea I found a video sait now is a tool :) thanks you so much
npp
🤗
Hello to all. There is a question. The object is directed only in one direction, how to make it so that it can move in the opposite direction
Hello guys, i am using mesh combiner in order to optimize game for mobile. This reduced draw calls a lot, but baking lightmap is very wierd. Is this way to go?
So I'm working with the Facebook SDK and as I work through it kind of seems like there's no way to share a screenshot taken from inside unity directly to Facebook from our app . Is that true ? At the moment ? or am I overlooking something ?
May I get some support for In-App purchases?
Hello, does anyone know how you can change the light on a smartphone screen
Im trying to use unity remote on my galaxy s10 but it wont work/
wait
look that
Android SDK without installing Visual Studio
Make Unity Great Again (with an android device)
JDK : https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
SDK :
https://developer.android.com/studio/
►----------------------------------------------...
it will help you
Hi does anyone know if I can make a build for web and it will work in mobile (through browser)?
@everyone
Hello guys I'm working on an app ivolving some AR content I'm having issues making the app bundle smaller it has 4 challenges as of now each challenge hhas 10scenes times 3 (3 players each one has defferent content showing on each scene) I tried grouping each challenge in one single scene but it didn't change much do you have any solution for big mobile apps for publishing, or is there a way you know I can use to make in app updates (like seen on PUBG)
I'm publishing in both iOS and android versions
Yoooooooo! Wanted to pick some brains and see how and what fallback tools everyone uses for merge conflicts
I've got a problem with the Unity In-App SDK and refunding on Android. Got a game coming out for Play Pass and need to be able to revoke a purchase if it has been refunded. Is this even possible?
I've checked the GooglePlayStoreExtension.IsOwned bool, always returns true even if refunded. I've checked if the reciept gets cleared if refunded but it doesn't. I've revalidated the reciept and checked the GooglePurchaseState but it always checks as Purchased.
Can someone please help ? I need a code like the code on the picture for my Player but mobile, with swipes, it is a 2D Endless Runner.
anybody using DOTween? The first time its used in the screen the game lags, after that its ok
Hey there,
I’m Unai, Business Manager from TapNation (Ice Cream Inc, Sneaker Art, Bubble Sort…), a hyper-casual mobile games company!
In TapNation, we publish games and make them profitable thanks to our expertise in user acquisition, monetization and game design.
Involvement, transparency and equity will always be our main focus while working with you!
PM me!
How do you Set-up Android SDK path to make Android remote work?
Hello guys! do check this out https://youtu.be/oQDhb9VIBqc
A complete overview of Optimization Techniques used in Unity & other gaming engines.
Download the Boat Attack Optimized apk: https://www.sanchitgng.in/2020/05/optimizing-boat-attack-for-mobile.html
Resources:
Sketch: https://youtu.be/pezeF6Vv5rI
Craig Perko: https://youtu.be...
there is a lag when i build for androidso how can ı optimize my project
Lag when you build? You mean it takes time to build? Well, it should, depending on your game size/complexity.
I need some help. I'm new to unity, brand new, and I want to make a realistic first person shooter with gun selection, options, etc. Do any of you have tips or ideas? Thank you!
To clarify I'm building for Android
realistic? android?
yeah no. I don't think any phone can run that.
I need some help. I'm new to unity, brand new, and I want to make a realistic first person shooter with gun selection, options, etc. Do any of you have tips or ideas? Thank you!
@blissful geyser i spent a day to optimize my lowpoly shooter game so if you want to make realistic i'll say think that again
Hello guys, i have monetize game for guys that im working with, but i never done that before. My question is, should i use unitys service for that? In that case, is all money going on my Unity account? I also saw that people are using this asset: https://assetstore.unity.com/packages/add-ons/services/unity-monetization-66123
How can create?
Hi. I'm looking for an URP compatible stylized nature pack or separate assets that are mobile friendly. I flipped page by page in the asset store and did only find packages that explicitly state that they are mobile but do not support URP or support URP but no info or untested on mobile. Any1 some hints?
Hey... anyone knows how to get android sdk 10 working with unity?
Guys I was trying to add iaps but this appeared
how can I add the billing permission to my apk?
I investigated a bit and I have to add this line of code
but does someone knows in what part of the manifest file should I put it?
Tricky question here, I'm generating a 4k RG16 RenderTexture that I'd like to then compress into a 4k EAC_RG Texture2D, but I can't use Texture2D.ReadPixels as it doesn't work on more exotic TextureFormat's any ideas?
I cant figure out how to make the game show up on unity remote 5
Ill send screenshots of my settings
I have usb debugging on my android phone and I have it connected with a usb cable
if you can help me please mention me
@glossy sluice you still have the problem?
playing in editor never works for me, i have to do build and run
it shows remote is connected but wont show in game view
Sorry for that noob question. In which programming language would you recommend me to write an 2D Android multiplayer card game? (In my experience - 4 Years of C# Programing and 2 years of Vue.JS & Node.JS)
Hello guys, i am trying to link my app with google services and i am struggling with package name. How can i find my package name*
@uncut lark
your package name example is: com.COMPANY.PRODUCTNAME
u can find out in project settings
player i think
@eternal violet oh, so that name is in Unity? Do i have to upload app first? I want to use it as test before i upload game
Well, thank you so much. For some reason it was so hard for me to find this info on google
Thanks!!!
@iron acorn yes
I uploaded my game to the Google Play Store and due to extended review times it took 5 days. Do you know the app is re-reviewed (and subject to the same waiting period) if an update to the app is published, or is it just for first-time new releases? Thanks.
OK, the developer console fiiinally says "processing" now, so I guess that kinda answers my question. For the longest time it just continued to say "published" but with no actual change in the Play Store.
Yeah first time is usually long and updates are quicker 😉
Hey, gaia made environment can run on mobile devices ?
yes
I'm trying to add something like a season pass access to my app. I want the season pass to last untill 1st of October each year. Can this be done via subscription? (so I can have auto-renewal) Or should it be a consumable, that's verified on the backend if it's valid?
If you want it to expire on a set date, you have two options.
- Consumable, but this has cons of not being renewable.
- subscription but every year make a new subscriptionIAP that has the new name/etc based around it.
Assuming its related to a theme.
Hi I created a Game , when I activate a Gameobject with 6 pannels with Layout Groups the game crash on Android. how can i fix it?
Hello guys, i have question about monetization. Where goes money that i will recieve from IAP and ads, Unity acc or google console?
Google Play Store account, Unity only shows the amount
Great, thanks!
Hi guys! I have a question: Why when i upload an update on PlayStore, users needs to install all game files again + new files from update instead of new files ?
Hey guys n gals, any of you experimented with Unity banner ads? I'm having a bit of trouble with them opening multiple browser instances when clicking on them and I'm not sure why...
Hey guys i am building a apk for Android, and it will usually take up to 10 min, now i upgraded my project and it looks like it's stuck on this
How can i fix it?
@ me if you know
@meifyouknow
So what exactly are you trying to do? @orchid wren
Hello, I have a problem with the aab size, to the point that it doesn't make any sense any more
Google Play complains that "Your App Bundle contains the following configurations where the initial install would exceed the maximum size of 150 MB: ARM64_V8A, ARMEABI_V7A"
but is like this *even with a test where the game consists solely on an empty scene
there are several bundles full of stuff and is understandable that the aab is quite big
but or Google is wrong with the error message, and the problem is in one the size of one of the bundles, or Unity is including the bundles by mistake in the initial installation, or I totally missunderstood something
any ideas of what can be going on here?
thanks in advance!
Hello guys, do you use ads from asset store or package manager? This is warning that i got while using from asset store:
Please consider upgrading to the Packman Distribution of the Unity Ads SDK. The Asset Store distribution will not longer be supported after Unity 2018.3
Hello guys, do you use ads from asset store or package manager? This is warning that i got while using from asset store:
Please consider upgrading to the Packman Distribution of the Unity Ads SDK. The Asset Store distribution will not longer be supported after Unity 2018.3
@uncut lark What version of unity are you using?
@agile iron 2019.4 i switched to version from package manager and i dont have problem anymore
everything works
Hey @uncut lark have you used unity banners?
No, guys that i am working for want only rewarded videos
oh I see
Because Im having trouble with them
I dont know if you can help me out but if you can please look at this thread https://forum.unity.com/threads/unity-banner-ads-opening-multiple-browser-instances-on-click.946887/
@agile iron Banner doesnt exist on Unity Dashboard as default, you have to make it. So did you done this part?
It exists in my version
I'm using Unity 2019.4.2f1
And you have to use "using UnityEngine.Advertisements;"
Yes I do
the banners do appear in the game
but if you leave the scene open, they seem to stack on top of each other, as if they spawned every 5 seconds or so, and if you click on the banner it opens 5 browser instances
its weird
Well, sorry. I dont know how banner works, never worked with them
Np, i am sad bcs i cant help 😦
I'm sure I'll figure it out sooner or later hehe
Maybe you shouldnt spawn banner on every 5 second. You should find way to check if old banner expired and then show next banner
Yeah that's true maybe shouldn't have coroutines with banners and stuff
I'll try another way
Yea, i saw that your reference is form 2017, maybe something changed meanwile
Hi all, was curious how to best size a panel to fit the screen size for mobile?
Got a gameplay screen that should be in the middle and two menus that I want to have on the side that you can swipe to, but I am curious if there are any good tips for how to handle the scaling on that panel for the UI? I am assuming I will have to do this manually on startup somehow.
I know I could just have a UI to fit the screen size and then when I click a button I reveal it, but I am after something a little bit prettier.
Hey, I've been scrolling up for a while but I couldn't find any answers that fixed my problem. Basically, I can't get unity remote 5 to work on my android 9 phone. I've tried every solution I can find. My phone's got dev options enabled, usb debugging's on, I've tried unity's built in android sdk and android studio's one with google usb driver and I've got the unity remote device set to any android device. I've been trying for like an hour and nothing has worked!
This is what I do for mine to work
I first open the unity project
then plug my android to the computer
then open unity remote 5
then press play on my project
and it works
I'll try that
Oh and don't forget you need the android SDK
Unity remote 5 not working for you? Here is how you can setup unity remote 5. This short tutorial will take you through the things that I check in order to get my unity remote 5 working every time with my android device. I don't cover IOS in this tutorial as it seems people ar...
I tried doing that and it didnt work 😦
The android SDK thing ?
both android sdk and what you said before
Have you restarted your computer after doing the SDK?
Maybe try that
k
what problem u having?
sdk expert here
well not really but i have had many problems, so wahtchu got
@mellow plover
I'm not 100% sure myself
well how can i help then
atleast say wahts going on
any errors, whats happening
is it not building?
like i didnt read anything above
so can you sumamrize
So I cant get unity remote 5 working. I've tried using the sdk that comes with unity android build support and one from android studio as I've seen a lot of tuts use that. Still neither of them work and I haven't got any errors in console.
ye?
mhm. ok so havbe u tried doing it in this order: unity remote 5, then unity, then play
I'll try
ok
Whilst u doing that heres another q:
- Are u sure its the right cable, do u get a pop up saying like allow data something?
- did u make sure to do the developer mode thing on yo phone, like turn it on in settings
- whilst in the phone setting make sure usb debugging is on
2 and 3 yes
1 my phone starts charging when i plug it in but no popup
then it probs isnt the right cable
theres 2 cables 1 for charging
seocnd for charging and data trasnfer thing
i dont know the names for them but ye
ill try other cables then
and even if u do, no way of knowing that one of those would allow transfer of data
like i also got a ton of cables
and i only have 1 taht allows transfer of data
ye idk which of my cables would work
ye, so try em all
and then if nothing works, then search online for cable with chargning and data transfer
and then buy it
whilst u waiting, just build it to yo phone
and u can use android log cat
to check for errors
which u can install as a package on unity
built int
in package
i understood nothing but ok
no i transfer it via google drive
Ohhhh!
smart
also ye i just realized ignore the android log cat part, tahts onlyt with the right cable same with the building, true
anyway ima go look for some cables lol
find those thin lines of copper surrounded in plastic or whatever
lol
hey @eternal violet do you have experience with Unity AD Banners?
yes
Could you please help me out with a little problem I'm having?
sure go ahead
I posted the code here if you wanna take a look
https://forum.unity.com/threads/unity-banner-ads-opening-multiple-browser-instances-on-click.946887/
What do you mean?
same with the video one
like when u make an app
project on unity dashboard
for ads
are u using the default oens in the monetization tab?
or you created new placement ads
Mmmm I created a new placement but only for the banner
Oh yeah?
yeee!
well they werent suppose to be used really, i dont know why the are there to begin with if not for use, but still
dont use em
okay
Oh also
i just rmemebered dont show the banner id whenever you post code
same with the game id
yeah I deleted the ID
ok anyhow, so imma keep on lookign at yo code
okay thank you
bro
do u ever wait
hmm
ye make sure
public bool testMode = false;
i mean true*
make sure like you give the test mode a bool value
and also u can change it after to false when publishing
also as you do that make sure it has this [SerilaiableField] public bool testMode = true;
Make sure all of those game ids, or ad ids have this [SerilaiableField] ITS very important that u do
(the spelling is wrong here, but u can correct it in yo Visual studio code)
if(!Advertisement.isInitialized)
{
Advertisement.Initialize(googlePlay_ID, testMode);
}
``` also i dont know the reason for this if statment? but if u dont got one, remove it
Advertisement.AddListener(this);
``` then remove this, idk waht purpose this serves
oh I dunno I just watched a youtube video and they had that in lol
I'm fairly new to Unity tbh
oh my GOD no broo noo!
no no dont use yt
use the documents
unity ad documents
would u want a very clean and workign example?
yes please
ok
using System.CodeDom;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
public class ADmanager : MonoBehaviour
{
[seralizablefield] string gameId = "gameid";
[seralizablefield] public string placementId = "bannerid";
[seralizablefield] public bool testMode = true;
void Start()
{
Advertisement.Initialize(gameId, testMode);
StartCoroutine(ShowBannerWhenReady());
}
IEnumerator ShowBannerWhenReady()
{
while (!Advertisement.IsReady(placementId))
{
yield return new WaitForSeconds(0.5f);
}
Advertisement.Banner.SetPosition(BannerPosition.TOP_CENTER);
Advertisement.Banner.Show(placementId);
}
}
there u go
also the seralizable field part is wrongly spelt
but u can change that
also this is a banenr ad example and it has its initalization
A guide to integrating Unity Ads in Unity (C#)
Use this document for reference
it has for other stuff like interstital ad and rewarded
do not watch YTers
@agile iron
Thank you, I'll try it later when I get home!
np
Hi guys, can someone pls give me feedback of my game?
Hey if we build for iOS in windows laptop, so can it be exported and run?
No, you need a mac to do the final build
Anyone know any good Socket.IO client library for Unity? I have tried using this one https://assetstore.unity.com/packages/tools/network/socket-io-for-unity-21721
However it does not seem to be working. The server (Python Flask-SocketIO) is not getting any message when I am trying to emit one. I have tested the server using a Socket.IO node js script and the messege was received perfectly.
Is it possible to use the Back button of Android device with the new Input System ? Can't seem to find it
Hey there, i am currently working on a mobile game, i builded it again and suddenly the resolution is veeerryy low
It has always worked fine
Is it possible to use the Back button of Android device with the new Input System ? Can't seem to find it
@primal arrow Yes but you probably shouldn't do that, many phones have the return button hidden and its just abnoxious for the user. I recommend you add GUI that goes back instead..
Okay thx
No problem!
I don't think that way, I would suggest to implement both ways, some users rely highly on hardware back button, not all have software buttons. Plus with the new gesture navigation in Android it's better to support both. That's what almost 90% of Unity games doesn't support, properly handling of the back button interactions
I don't think that way, I would suggest to implement both ways, some users rely highly on hardware back button, not all have software buttons. Plus with the new gesture navigation in Android it's better to support both. That's what almost 90% of Unity games doesn't support, properly handling of the back button interactions
@robust hamlet I agree
Hey there,
I’m Unai, Business Manager from TapNation (Ice Cream Inc, Sneaker Art, Bubble Sort…), a hyper-casual mobile games company!
In TapNation, we publish games and make them profitable thanks to our expertise in user acquisition, monetization and game design.
Involvement, transparency and equity will always be our main focus while working with you!
PM me!
Hey does anyone know if I can track if an user click on certain button? Like have a statistic of that...? Thanks!
@agile iron
you can do that via
i think like public void buttonclick(button){}
i think if u set a void to a button it will have a parameter
of the butto nwhich triggered it i think
Right but I want to get that information to for example google analytics or something
I don't mean track it in game, I mean track it globally
ye that gets complicated fast
i think ud have to create ur own server or something
or something server website
to store the data
globally
im not good with this tho, as i havent done it before
also
u dont have to ask that here, use some other channels which are far more popular and they suit ur q
oh okay thx
Can anyone recommend an easy to use, inexpensive touch control asset? Preferably one with swipe gestures.
i wish to make one of those kiond of assets
but its so flipping hard
to publish assets
u gotta put so much detail, and just alot of work, super challenging
to publish it
not make the asset
lol
I looked at two and one still requires you do the write the swipe code or something? The other Idk it has the UI down, but the tutorial doesn't show how it all works. They are all focused on digital buttons. I just want a thing I can bind a function call or or event to a swipe movement.
@agile iron Maybe with GAMEANALYTICS SDK you can do that
Hi everyone, new here. I'm mostly a web/fullstack developer who would like to develop a 3d mobile game using Unity as a hobby-project. Any suggestions for tutorials in that category? 🙂
How to make touches ignore UI elements if they havent began on em?
Any1 know how to overlap UI main object by a child object from other object like
A
..B
C
And B overlap C 😐
@thick rover maybe set it in Ignore Raycast layer?
Or if its something like button un-check check-box for Raycast Target
you can add a canvas to C and make it be lower in the sort order than the parent cnavas
❤️ love ya
@agile iron Maybe with GAMEANALYTICS SDK you can do that
@glossy sluice For anyone curious, I used Anayltics Events (https://docs.unity3d.com/ScriptReference/Analytics.Analytics.CustomEvent.html)
hi, currently i'm trying to get advertisements to show up but they aren't, in fact nothing from the ad manager script i have occurs
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
use pascal case for method names, start() should be Start()
Hey guys
I'm developing an android app, and I have a problem in inputfield. When the user is putting words in this field then click on Back button, all words written will be deleted. Is there any solution for that?
does muting the audiolistener also mute ads?
@glossy sluice id imagine not
but go ahead try it out
set up a test ads
and check
Hey there,
I’m Unai, Business Manager from TapNation (Ice Cream Inc, Sneaker Art, Bubble Sort…), a hyper-casual mobile games company!
In TapNation, we publish games and make them profitable thanks to our expertise in user acquisition, monetization and game design.
Involvement, transparency and equity will always be our main focus while working with you!
PM me!
This is not a hiring platform. Use Unity connect for business connections
Hey guys anyone has ever build a save with google play ? I'm having trouble with debuging it
Hello. I'm new to basically coding. And I'm trying to create something but I'm curious as to how long it would take to actually be able to. I would prefer to discuss it in pm
Hi. I'm having some big problems with my build to Android. This has only started to happen today and I don't know what the cause could be. When I play in Editor everything looks fine with the ship.
But when I build to mobile and run it from there I get this?
This is really worrying. I have no clue why this suddenly started happening. Has anyone ever seen this before?
try switching up shaders. It feels like parts receiving shadows maybe get culled.
Ok, thanks I will try that.
Although it is an Unlit shader...
Same thing with both a URP Simple Lit and Lit shader
try different renderer settings, testing with unlit maybe to exclude shadows. Also might get more help in #archived-hdrp
@odd arrow do you mean the Mesh Renderer component on the ship?
ok, main light has cast shadows, let me turn that off and see
For now just find out what's causing the problem, then ask in #archived-hdrp how to avoid it.
ok turning off the cast shadows fixed it, let me try putting everything else back as it was
That looks good now. Thanks for the help @odd arrow 👍 👍
To anyone planning to release on android, here's some info on staging releases in the play store https://support.google.com/googleplay/android-developer/answer/3131213?hl=en
Using the Play Console, you can test your app with specific groups or open your test to Google Play users.
Before you start Email requirements: Users need a Google Accoun
Btw, a reminder, when u do relase as production, it really makes no diff
coz like chances are no one will play it or see it
unless advertised
so keep that in mind, that u cna just release to production
I don't experience any errors in the editor, however when I'm building for iOS 14 using xCode 12 I get errors that I don't typically get. Has anyone else experienced this issue? ( It builds successfully, but certain game features are broken. )
ye sometimes its weird, where features are broken when built but fine on pc
cant say much except trying to figure out stuff in the code
i dont think its to do with unity itself, but code
It's also worth mentioning the same code ran fine on iOS 13 w no problems.
oh
ye idk man, u maybe would have to contact unity about this or something
Report it as a bug
and see if they can fix it
Alright man thanks for the info.
also
doesnt unity
have this phone emulator
package?
maybe u can use it and test ur game
on all iphone devices
see how it goes
on the latest 2020 versions i think u can find it
of unity
@crystal oasis
I'll give that a shot
no its not out of date becuase of an update
its probs something to do with the fact that theres no touch
at certain times
u gotta do if (input.touches >= 0) first of all
and inside that u do the if statment of its phase
But this worked properly month ago and i have "simple project" builded and it keep work but if build it now this doesnt work any more
uhm hii
help me to fix this code please
i doesnt rotate as i expected
i want it to rotate it 90 degrees
then every touch it shall increment by 90
@tropic atlas wow I didn't know this channel was dead.....
@jovial wolf i wish someone will help me out
for starters I would try to do rotation only for one touch. instead of while I would do if(Input.touchCount > 0) { do some checking and rotate}
and then when it works, try to implement it for multiple touches
and what exactly do you mean by "it doesnt rotate as expected?"
You shouldn't do a while loop inside Update. Update is already running in a loop
- oops I thought the while condition was different
here is my last saved code
i want to rotate it like this every
every touch the z axis increments by 90
i want to rotate it clockwise when i touch the half of the screen and anti clockwise on the other half
So you press the left side with one finger and it rotates 90 degrees counter-clockwise and then stops?
And if you do the same with two fingers it rotates 180 degrees?
two touch? yes
first touch 90 degrees
second touch 180 degrees
third touch 270 degrees
fourth touch 360 degrees
Hi! I need to fetch items data (name, date created, path) from specific album from devices gallery.
For Android - is it safe to assume that the album will be in DCIM for most manufacturers?
For iOS - how the hell do I access devices gallery, lol
unity how rewarded ads limit work
Hey all. Anyone familiar with Rewired and touch controls? I'm trying to implement touch screen joysticks for my first person game. When I test the touch controls in Unity using mouse input they work exactly as expected. However when I test them on iOS they only respond to the first tap and the sticks don't move when I continue to hold down and try to move them around. Anyone got any sugggestions for where I should look to fix this? Touch buttons work just fine, suggesting that the taps are getting through.
Can someone help me understand what do i wrong in moving camera by touch and drag at screen?
Issue is shaking camera when touchMove is close to touchBegan and its possible to move camera only a bit from her position
Theres some code i did https://hastebin.com/nesanumufi.cs
I've been using Unity since late 2017 strictly for mobile. It seems that depending on the version of Unity, whether you use post processing/custom shaders, or use a specific mobile device, the results all change. Has anyone else experienced this? I have a samsung note 5 and s9+. Some differences/bugs have been: bloom sometimes works, sometimes it doesnt. Gamma color space sometimes works, sometimes it looks completely different than what it should look like on mobile, and sometimes it displays black on some devices and Unity builds when on others it doesn't. Sometimes I will run a graphically intensive game on my s9+ and then open another game, and it works fine. If i try the same thing on my note 5, it makes the second game lag BUT only if I run the graphically intensive game first. Otherwise the second game runs just fine. Sometimes shaders from shader graph work, other times theyre not affected by post processing
If anyone has had the same experiences or has any suggestions, I would love to hear about them
@light vector I think that's pretty normal even if we don't want it to be. You have all kind of devices in Android, running their own implementation of the OS (some of them change lots of stuff in the core and etc), running different versions of Open GL, have different graphic cards and etc. Even Unity change it's own implementation of it's tools with every version so there is no way in my opinion to build a game which will run on all Android devices without any issues.
Makes sense, I wouldn't be so alarmed but I feel as if maybe I'm doing something because the changes are so substantial. Should I back away from post processing and/or shader graph since it seems that those two are causing the biggest issues? (Or should I say on URP, not on LWRP. Everything appears to work much better on LWRP)
@robust hamlet Also, are you currently working on anything in mobile using 2019.4 or later? Have you experienced any of these issues on mobile?
I always try to stay with the latest Unity version actually, currently have mobile projects on 2019.4 and 2020.1.2 which don't seems to have any issues on device range which I am testing. I always use URP and never used shader graph on a production app. Had a few sample projects, but most of them didn't even compile on low end android devices which are lke 2-3 years old @light vector
Ah I see
@robust hamlet Do you use any post processing effects? I would love to use the newer versions as well if I can get it working
I don't use post processing on mobile devices, which limits the range of devices your game will run without any performance issues
mostly trying to create the look and feel of the game using shaders and the textures
Do you write your own custom shaders then?
I will try and experiment without post processing. I did notice a dip in performance in some areas
I am not a shader guy actually, I use mostly shaders from asset store or from github but definitely first I try the performance with and without using the particular shader and based on that decide if I am going to use it for the project
It really depends on your target devices and the project itself
In some cases you can experiment, based on the device your game will run, use simple shaders for the low end devices and more complex ones for the high end devices
I will keep this in mind and check out the asset store for shaders. I appreciate you sharing your experience and suggestions
lastly, have you released anything on the play store? Im curious to know how to deal with mobile devices that don't work
can you prevent some devices from downloading the game?
Yep, you can exclude devices from downloading your game from the Play Console
If you open Play Console, go to You game's page -> Devices and versions -> Device Catalog -> select the device and click the arrow on the right (Details)
But that's not a good option in my opinion, better try to understand why your build is not working on that particular device
If you don't have access to that device maybe information about it;s hatrdware, open gl version and etc can help you discover the issue
That is good to know! Thank you for the info on that. Yea, I would prefer not to exclude any devices and I would love to know why these particular issues are coming up.
As far as hardware and opengl, I am still a beginner
I have resources on opengl but where would I find more information on Unity or mobile graphics stuff?
Ive poured over page after page and eventually came here since I have yet to find in depth tutorials/books on this particular topic
There a few good books on that topic actually, but you will have to search for them, I don't really remember the names but I think you can find good tutorials on that. You can find lots of informaiton on learn.unity.com too for optimizing performance on mobile devices and etc
ah, I will check out learn.unity.com, thank you so much for all your help
@light vector another useful guide: https://docs.unity3d.com/Manual/MobileOptimizationPracticalGuide.html
Thank you! I will read this as well
uhm hi does someone knows how to rotate an object 90 degrees and it adds 90 degrees every touch?
@tropic atlas what have you tried so far?
@tropic atlas does the code require more fingers for each rotate?
@tropic atlas I'd replace the while with if then
if im using google admob in my app, what do i put in my privacy policy for IOS?
Hey all any suggestions, tutorials, or assets you can recommend for how to make updatable clients? I'm about to take my android/quest game to friends and family alpha, and this is the last step before I get to show off.
what so you mean exactly by updatable clients?
Is the swipe system I made correct?
@near lynx Doesn't look like you need to use tapCount. The deltaPosition is in screen space so it'll vary between devices. The panel code I don't understand.
You're missing an item in that Vector3
@glass crater I have 3 panels and I need to make a swipe between them
I just got done making the UI for my game and it looks great on the resolution I've been testing on: 1125x2436. https://i.imgur.com/6jMr2kF.png I'm assuming things don't scale correctly due to the reference resolution that I chose. How could I go about making it so my UI scale correctly on portrait resolutions w/out having to redo my UI entirely?
Here's what it should look like on most resolutions: https://i.imgur.com/PvvS3wF.png Here's what it looks like on for example the iPad Pro: https://i.imgur.com/Eo2JPTi.png
Let me know if you want to see anything specific:
ok so
at the anchors, for both top y and bottom y, put 1 instaed of 0
@crystal oasis
Are you referring to the canvas? @eternal violet For I can’t edit the anchors on the Canvas.
no.
im refering to the GUIS
to the buttons....
anything
thats out of screen view
because it doesnt scale to screen
properly
Anyone here who has successfully integrated a IAP subscription?
I want to add it for my app and followed the official unity tutorial and some youtube tutorials, however, they only really tackle one time purchases.
What I want to know is, what happens if the subscriptions runs out, how is the app able to know that and cancel whatever the subscription unlocked?
Hi! I'm having an issue with this application I've made. It's an helper app for the solo mode of a well known Boardgame:
https://zoidbergforpresident.itch.io/7-wonders-duel-solo-mode-helper
Specifically with the android version. The thing is that it goes well but if I let the app on the side and come back to it I may find it unresponsive. I switch to the running tasks then back and I may find the app to restart. It doesn't seem to do it with the other helper app (same profile). What can it be?
Thanks in advance for any help. 😦
im getting "on Initialized failed - no product available " error on my IAP
tried few threads and stackoverflow posts but no luck so far
its targeting iOS
not sure what i got wrong
that's my IAPManager class : https://hatebin.com/owcjndjnpc
that's how its getting called
private void Start( )
{
IAPManager.instance.InitializePurchasing();
IAPManager.instance.OnReady += () => {
var sub = IAPManager.instance.GetSubscription();
Debug.Log("Subscription status : " + sub );
};
}
I'm making infinity dropping game using physics, is it better (safe) to just let player drop on Y axis (to -infinity) or should i lock players Y axis and move background and obstacles up?
unity remote 5 is not working
@turbid bear if the camera moves to faar away from the world origin 0,0,0 then stuff gets wonky , you can move the wholw scene back to the center if you get to faar down.
@steel pecan Hmm okay but what it too far down?? Like 1 million units or smaller, higher ?
after i done with game in mobile do i need to wright where i got what asset information? in mobile?
i mean sounds and stuff
@turbid bear i would try 5.000 to 10.000 units
unity remote 5 is not working
@halcyon hollow on the app description it said it only works on unity 5
I use 3 different rewarded ad units in my game. In first one gives 200 gold, in the second one allowed him to double gold (3-4 or 5) when the episode was finished, and on the third one, an ad that allowed him to try special items (for character testing in this game). Since Admob was opened, I have a strange problem, although the c# files of all of them have different results, for example, when they watch an advertisement to test a character, they give 200 gold, x4 comes when the game is over, and 200 gold comes again. The 1st and 2nd commercials are in different 'empty objects' in the same scene and the 3rd is on a different scene. No matter how much I thought, I could not solve the reason.
Note: Sometimes the ads wont work as they should. Especially in the first ad watched.
Admob sucks.
😩
use unity ad instead
Well... You can throw the trash out early, or leave it a burden to deal with in the future
Its gonna effect your revenue heavily
wahts the point of having ads if you gonna use admob, its that trash
Your work was gone to begin with, when you started using admob.
You are right. I can not find anything to say, thank you for the information
as soon as you would have published the app
and people played it
admob would have disabled your ads
for dumb unkown reasons
so your revenue would be gone
It happened to me twice, so i stopped using it and used unity ads instead
unity ads is easy to integerate anyhow, so no time will be wasted as much as the admob
thanks for this helpfull advices.I will keep in mind for next projects
you better keep in mind for every project u do from now on
only use unity ads
screw admob
Guys, can someone pls help me fix my swipe movement? it kind of works but when you move right sometimes it moves the player to the left https://hatebin.com/hjuuwnahwa
@lime vessel you're comparing the deltaPosition with the position 😑 if (touch.phase == TouchPhase.Moved && touch.deltaPosition.x > touchPosition.x)
and I think you mean to modify the position by the deltaPosition, not the position transform.position += touchPosition * SwipeSpeed * Time.deltaTime;
You can simplify things a bit by doing something like transform.position += touch.deltaPosition * SwipeSpeed * Time.deltaTime;
And remove the ifs with touch.phase == TouchPhase.Moved
So this question is a bit more complex, but I have a mobile game that I use serialized binary save files for. On OnAppliacationPause(true) I save the data and when the game starts I load it. It saves to 3 different files and all works really well. EXCEPT, sometimes when I close the app and reopen it, the data is just... reset. As if there's no save files there. This is very rare and has only happened to me once out of the hundreds of times ive opened and closed the app, but I've had others who use it tell me they've had the same issue rarely before as well. Because I have no idea what causes this and it doesn't happen super often I haven't been able to see if the save files get deleted or something or if they just get messed up and so it makes new ones over the top of it, or what. The only thing I can think of is that the app closes too fast or something while its saving data so the files get messed up and it just makes new ones over the top of it on the next load, but its just kilobytes of data so I kind of doubt this theory. If anyone knows what causes this please let me know, it would be really nice to not have to worry about losing everything randomly one time when opening the app.
How about saving after the player data changes? That way if the game crashes or has an issue that player data won't get lost.
As for the issue of player data not being there I haven't heard of that specifically - in general though I wouldn't trust using OnApplicationPause solely to save player data.
Ill try removing it from onapplicationpause and just adding saves in other parts I guess and see if that fixes the issue
So the files still exist but their data is set to some defaults?
I believe so?
Again I dont really know it doesnt happen super often and I havent seen if the files get deleted or reset or what when it happens
It'd be good to put some error checking and logging so when it does happen you can look at the logs to get some idea what could be going on.
Obviously dealing with player data is sensitive and you want to make sure that code is bullet proof so perhaps you could write some unit tests for that loading/saving code.
@glass crater I'm getting an error for putting transform.position += touch.deltaPosition * SwipeSpeed * Time.deltaTime; it says that I can't use the += for vector 2 and 3
you could do transform.position += new Vector3(touch.deltaPosition.x, touch.deltaPosition.y, 0f) * SwipeSpeed * Time.deltaTime;
it worked, but it's choppy. Is there a way to make it smoother?
Do you still have that code I wrote where instead of modifying transform.position with the touch it modifies targetPos variables and uses Vector3.MoveTowards() to smoothly move transform.position?
no
something like targetPos += new Vector3(touch.deltaPosition.x, touch.deltaPosition.y, 0f) * SwipeSpeed; transform.position = Vector3.MoveTowards(transform.position, targetPos, smoothSpeed * Time.deltaTime);
so like this?
I checked the code you sent me before and there's also a lastTouchpos vector 3
You'll want to move transform.position = Vector3.MoveTowards(transform.position, targetPos, smoothSpeed * Time.deltaTime); so it's outside the the if statement since you want it to fire even if there is no touch input
then give it a try, adjusting SwipeSpeed and smoothSpeed to see what values feel good
Actually you'll also need to adjust targetPos the other spots you're changing the position
Perhaps something like this https://hatebin.com/ffvqfjqqhz
swipe speed is a multiplier on the touch input. smooth speed is how quickly to move the position to the targetPos
I can assist you if something isn't working or confusing though I don't want to setup the project for you
Like it just doesn’t feel like a movement for a mobile game it feels kind of weird
Can you be more specific?
it's still feels kind of choppy and I think that the smoothSpeed is not working because I tried it in 10 and then 10000 and it feels the same
What about at 5 or 1?
If its still choppy the value is too high
touch.deltaPosition is based on the resolution of the screen so it's going to be a big value
Maybe it needs to be .1 - keep lowering it until you notice a difference
This is what I have so far https://hatebin.com/nyjkwdgkhz I added a line of code for it to not be able to move in the y axis and I changed the vector3 line of code back to the if Input.touchCount > 0 because I do want it to only move when the player touches the screen
Hello everyone, I’m just wondering how am I able to hide my UI and have it only shown when I’m near the object such as Door, vehicles?
You could use triggers or keep a list of said objects and do a distance check
I see, do I need to use a monobehaviour for it?
To get callbacks such as OnTriggerEnter/Exit yes. Same with the distance check if you're going to be referencing Unity objects transform.position
any one made any mobile games which they have posted in app store?
@dire knot I have, although I'm working on an update that'll improve it's overall feel and add new features.
Hello guys, i have one question. When player pay to remove ads what should i do with rewarded videos? Should i disable option for reworded videos? Or maybe is okay is okay for rewarded videos to stay even if player paid to remove ads?
@uncut lark
keep em obviously, id say
because rewarded ads they click on, because they know the consequences of that ye
Well as a player I would feel it's unfair that I paid to remove ads and I still have to watch it
well, because those type of ads are only when the user wants to see em tho
if he wants to see it, then sure but watch ad
like he cna play the game free of ads
unless he does the rewarded stuff
i just think it would be kind of cheating, if they could get rewarded items for free ya know
it would kinda imbalance
the game
they can play without ads, or not if htey want to get rewarded stuff
Yea, on the one side feels unfair, but on others side actually feels okay because they will get items for that videos
ye
so keep rewarded ads
its users choice
whether he wants to watch or not
and keeps game balanced
as they could for free get items
It is balanced, they would a litle bit more coins
Thanks for advice, i will keep rewarded videos and maybe give them more coins if they pay to remove ads
No, i have normal ads and banner
Yep
I didnt know if maybe google will make problem
Maybe players can report app or something
if they feel cheated
Yea, i should do research
ye
Any recommendation on the best way to approach portrait/landscape designs?
For example, I've been give the task to have these 2 distinct layouts when on portrait or landscape. So it's not just a matter of making proper use of constraints... It like completely changes. How would I go ahead and handle this situation?
gidday. I'm trying to set up Unity for building to android. The project I have has already been built for Android in the past, but I'm getting non-specific build errors when I try to build.
is there a guide somewhere that goes through everything I might need? I've already got android studio and the SDK set up and the android unity components.
ah, found it in the detailed editor log
Burst requires the android NDK to be correctly installed (it can be installed via the unity installer add component) in order to build a standalone player for Android with ARMV7A_NEON32
The environment variable ANDROID_NDK_ROOT is undefined or empty, is the Android NDK correctly installed?```
I thought I'd installed it but I guess not.
u probs do have it installed
hey everyone I have a problem, I'm making a mobile game where I want the camera to rotate around a spaceship by sliding a finger across the screen. the problem, when I slide my finger it only rotates one way, whether I slide to the left or to the right it always rotates to the right. I have no clue what is wrong. anyone knows?
it would be the best to show your code
do I just paste it here?
you can post it here using three ` signs, or use website like pastebin
{
if (Input.touchCount > 0)
{
Touch touch = Input.GetTouch(0);
if (Input.GetTouch(0).phase == TouchPhase.Began)
{
firstpoint = touch.position;
}
if (Input.GetTouch(0).phase == TouchPhase.Moved)
{
secondpoint = touch.position;
Vector3 rot = firstpoint - secondpoint;
this.transform.Rotate(rot);
}
}
}
srry Im not used to discord yet
@warm adder
Anyone knows?
guys, hello. regarding the new input unity system.
can you please help me to understand if it correctly works with multi touch?
i am trying to create binding for 2 fingers press / move, but it looks like i cannot do such binding via UI to track it.
should i just do like before this new input system in input manager? in Update method check the number of touches and do what i need?
Can you use a phone charger cord to hook up your phone to your computer to test mobile unity games, or do i need to get some sort of specialized cord?
@everyone
idk if that works
that would be so annoying lol
anyone?
You should try googling questions like these before you ask here
What you're looking for is called Unity Remote and you can use a regular cable
no
u need a special kind of cable that can transfer data and can charge yo phone
u can notice one when u get the pop up on your phone of: "allow transfer of data"
or along thelines of that
yo have you guys had any crashes with Metal on iOS on 2019 LTS?
Tallyon u have an app store dev acc?
yea
so how does this work
you paid 99 dollars
to publish games..
but after a year if u dont pay 99 dollars, all ur games are taken out of the app store?
what d o umean
i mean like
the app store dev account
to publish games
on IOS
yea, when you stop paying all your apps are removed from sale
whoever got them can use them as far as i know, but no new people can download them
thats monopoly for you
welp
I am looking to do a infinite scroll UI in my mobile game, I am not sure where to start. My game will have a list of 300+ items, this list could get to 500-600 in the later game. In my head the game would use the same 30 gameobjects that will swaps out data as the player scrolls. any suggestions?
@fast tree the Optimized Scroll View Adapter asset is pretty handy for this
it is the best one, although it is a little tricky to use
you should also familiarize yourself with UniRx and reactive collections
i think i could tell u why on android, but on ios idk if unity is same