Unity Game Crashes on IOS with Message didRecieveMemoryWarnining - unity3d

I have developed a game in unity. Which works fine on android but when I tested it on IOS my game crashes after playing 3 levels. I have tested it using XCODE 8. Before crashing didRecieveMemeoryWarning() appear and then "game terminated due to memory issue" . I have compressed my all textures. Double checked my code.I did everything that I can think of. Plz guys help me.

Right After building your game, You can see how big your game is and how many space is taking every file included, to see this, right click on the console tab and select "Open Editor Log" as mentioned in this link. If there is some files that are taking too many space, consider reducing its size, with textures/sprites is as easy as setting a max size to a lower value.
If your build is fine in Android it may be that your textures/sprites are not in a size power of 2 (like 128x128, 256x256, 512x512, and so on...). Unity can't compress this images unless they are power of 2 in iOS.
To solve the above problem without having to manually change every texture of your game, I recommend using packing tags in your sprite options, you can assign the same tags to sprites so they create an atlas, see documentation here. Normally you want to pack together sprites that belong to the same level or menu and try avoiding having atlases bigger than 2048x2048, to see your atlases you can go to the Sprite Packer Window.

Related

Resizing Window to larger size than Screen. (Unity Build)

I am currently working on a project in which I will display my game on an extremely large resolution. At the moment i cant use the eventual setup, but I already want to see how well the game runs on that resolution. Whenever i try to create a build at that resolution it downgrades it to the max resolution of the screens i currently have connected to my computer and I can't rescale it any larger aswell. Is there any way i can work around this?
Thanks for any help!

Scene freezes but game continues at back

I'm using 2020.3.15f2 at my project. Not regularly, but sometimes game freezes visually on mobile phone. I mean that moment is always on the scene even you change to different scene. You can click everywhere, also ads are coming too. There is no sign of error on profiler or XCode.
I've tried canvas with screen space camera, and I'm just rendering a changing text with a camera. It still doesn't change. So rendering is not the main problem here I guess. I did'nt find any release notes about it. Do you know what is the issue or what is the version with fix to that problem?

How to remove unity build-in loading screen in Facebook instant game?

I am working Facebook instant game using unity2017.2. I deployed build for Facebook and uploaded it on Facebook. Everything is fine but when instant game start there is unity loading bar appears which take 8,9 seconds even if you have just one scene with one button in your game. So how can i remove that build-in unity loading screen. Please help. Thanks
https://i.stack.imgur.com/0IodM.png
It is not possible to skip the whole loading screen. As mentioned in the comments you can modify your UnityLoader.js - you can find this script in the Build folder of your build.
To read the code I recommend this beautifier
I just opend my build and found the object Progress in line 1849. Perhaps you have a different version and it is at a different line. Search for Progress
Here you can see what Unity is doing. In the Progress.update they are updating the ProgressBar.
At all it is not easy to read.
The easy way to customize you loading screen is to replace the graphics under TemplateData - here you can copy your own pictures. The names have to be the same as the original filenames: (default is light)
progressLogo.Light.png
progressFull.Light.png
progressEmpty.Light.png
I think this could be a solution for you?
Yup, it's a little bit frustrating to see a logo for a long time. I've worked on Unity version 2018.31f, and there, it's easily removable if you are using Unity Pro.
To remove the logo in Unity Pro, open your Unity WebGL project, Go to File -> Build Settings -> Player settings. You'll see settings for WebGL and a Splash Image column in that window, as shown in this picture.
As you can see in Splash Image settings, show splash screen column is inaccessible for me to tick/untick. The same goes with Show Unity Logo. This is because I'm currently using a free version of Unity. But in the Unity Pro version, you can untick this option and make that Unity Logo screen hidden.
If you are using the Unity free version, ensure a minimum Logo Duration of 2-sec, at least in the accessible version of Unity.

When I install apk on android, one scene is black. How to fix it?

So, I made my game for Android device and I've got a menu, store, info scene and a main scene. The main scene is where I play the game. But when I hit start on the menu it loads the "MainScene" and all I can see is the GUI but nothing else. I can collect items but the scene is just black (except the GUI).
I tested out with a web player and everything was fine then changed to Android and after I installed it (several times) I looked at the black screen.
How to fix this?
(I'm using Unity 4.6.1)
Can't comment, not enough rep.
Anyway, there are lot of things that can cause a black screen to happen on Android. Here are a few to look at -
Be sure your camera is not getting deactivated (in your case maybe not).
Are you using any plugin that is using alpha channel or stencil buffer?
Any other plugin that may causing this, disable them to check.
Is your 24/32 bit buffer ticked/not on build settings?
Double check your camera settings, lighting.
Stripping level to disable and rendering path on build settings etc.
Check the game on another device.
Provide more info about the scene here
There's definitely something on that specific scene.

Cocos2d IPhone sprite problem

The problem is - when i load game on iphone some sprites are shown, some are not, plus CCBitmapFontAtlas labels and CCMenu button are also not visible and when i tap on the place where button have to be - there is no effect. At simulator it worked just fine. What is the reason of such strange situation?
IPad aslo works ok.
Hard to say without more detail, but it could be some issue with your build. Try cleaning your targets and republishing to make sure that your iPhone device has the exact files you want it to have. The behavior you describe could come from older versions of image files being used (say, an Atlas sprite going to a frame that used to be blank but has content in the new version).