Unity 3d build size too large - android

I am working on a unity project where the apk built is almost 200mb and the android phones is running it very slow.
I have already tried texture compression and I have brought down the size. Any other suggestions?
The frame rate is slow. My textures are at 256 compressed and PVRTC. Any suggestions, please.
I have read somewhere that I can load only what is needed, anybody who can help me with that ?
1.It is an autowalk cardboard type apk,the player triggers the button to walk.
2.I have imported a fully built house from maya.That is the largest import.The size of which is 800mb.
3.I used the profiler and it looks like the rendering is using too much of CPU.I see many apps that are professional built with even better graphics.Wonder how thats done.
#Joe Blow - Thanks for the edit suggestions, im new here :)
[1]: http://i.stack.imgur.com/4wvxQ.png - editor log

Try to do this, go to edit -> player setting -> other setting -> configuration -> device filter and change it to ARMv7 architecture and then build again your file will get reduce .If you Combine ARMv7 and x86 both architecture in a single apk then your file will get dobule

Related

Upgrading from Unity 2108.2 to 2018.4, huge apk size, scene is all white

I am trying to upgrade a Unity 3D project from 2018.2.21 to 2018.4.30.
To upgrade I deleted the Library folder and used UnityHub to load the project with 2018.4.30.
The project build and ran in the Unity editor fine.
When I built the apk for Android it used to be 200mb but was now 4gb. The app contains a few 3D high res avatar models, and a few scenes which are loaded as streaming resources.
In the models changing the inspector setting "Legacy Blend Shape Normals" to true seemed to be the cause of the huge apk size, with that setting the apk in back to a normal size and I can run the apk on Android.
However the app loads and the scene loads, but the lighting on the avatars is very overexposed (too light), and the scene is not visible at all, just white.
Any idea what could cause this? We have upgrade other projects from 2018.2 to 2018.4 without these issues. Do I need to reexport the stream assets in 2018.4, or any idea what is going on?
When running in Unity the scene is fine, the avatars are still over exposed, but the scene is not white.
On Android the scene is just white.
Here is a screen shot from Unity 2018.2,
Here is a screen shot from Unity 2018.4,
Here is a screen shot of Unity 2018.8 on Android,
Seems like some kind of lighting issue maybe, but I have tried comparing the 2 projects and reverting any changes, but does not fix it.
I give it a shot. That may help you:
Window -> Lighting -> Settings -> Scene -> Environment Reflections ->
Compression = Uncompressed.
By default, all images are compressed when added to your project, in that case you go:
Edit -> Preferences -> General -> Compress Asset on Import = uncheck
and also:
Edit -> Preferences -> GI Cache -> Cache Compression = uncheck
Also set the source from "Color" to "Skybox".
If it doesn't work, I will still help you till we are done ;)

How to reduce unity android game size?

Hello buddies I just build my first demo project in unity just for learning purpose and the size of apk file was 21 mb so how can I reduce my apk size?
I have seen many games that have size less than 5 mb, how do they build these kind of game?
Do they use some different game engines?
Thanks 😊
Assets are the most likely candidates for optimization. This information is available in the Editor Log just after you have performed the build. Go to the Console window
(menu: Window < Console), click the small drop-down panel in the top right, and select Open Editor Log.
The Editor Log just after a build:
Suggestions for reducing build size
Textures: select the Texture in the Project view, and in the Inspector
window reduce the Max Size.
Meshes and Animations: set the Mesh Compression to Low, Medium or High. Mesh and Animation compression uses quantization, which means it takes less space, but the compression can introduce some inaccuracies. Experiment with what level of compression is acceptable for your models.
Reducing mobile .NET library size: ou should avoid any dependencies on System.dll or System.Xml.dll. Unity does not include these in the built player by default, but if you use their classes, they are included. These DLLs add about a megabyte to the player’s storage size. If you need to parse XML in your game, you can use a library like Mono.Xml.zip as a smaller alternative to the system libraries. While most Generic containers are contained in mscorlib, Stack and few others are in System.dll, so you should avoid these if possible.
Refer to this link for more details.
of course you can override image size for android , but i recommend you to build under arm v7 architecture , not x86 + armv7 , there are few mobile phone now that uses x86 architecture , you can reduce you game until 11mb , In build section change architecture . If i answered your question please mark as answered

Unity Application crashing when loading images

I've written a Unity3D game and installed on Android. The game often, but not always, crashes during an operation to load a collection of image resources used by my game. Specifically the application disappears into the background and when I select it, it then restarts. At the moment I can't figure out what is causing this behaviour, I've examined logcat logs when this happens but I can't find any message telling what has happened.
Has anyone experienced similar behaviour and if so what was the solution? Is there a way of finding out why the game has crashed or increase memory allocated to it in case the game is running out of memory loading the images?
The size of images and the compression rate are configurable in the Unity IDE, and can change between platforms. In Unity 5, as a default the max size for an image is 2048 or 4096, which are not fully supported in all devices. I suggest as a first solution to go to the Unity project, select the image assets, scroll down to the setting box for each image, click on the Android tab, check the box marked "override for Android", and change the max size to 1024.
Apply the change, play test to confirm the image is still sharp enough, and re-build the game. I believe this may help you solve the issue.

Compress APK for smaller file size

The apk file size for my app is quite big. Is it possible to reduce the file size by using better compression level or different compression engine such as lzma (https://software.intel.com/en-us/android/articles/native-library-compression-sdk-for-android-apps)?
To simply answer your question:
Yes, use lzma.
Okay, now some other recommendations.
Build in release mode. This is very important, as the app size when built in debug mode can be a lot bigger than when built in release mode.
Compress your images. Often when making an app you don't really look at the size of images, and they usually tend to be the main issue concerning size. Simply opening them in, let's say paint.net, and saving them again with lower quality can help a lot.
Compress your audio files. Load them up in audacity and export them as MP3 with lower quality.
These are some small recommendations of mine. If you need your apk to be smaller still, I'd suggest trying google
You may want to have a look at Crosswalk Lite, Which is a slim version of Crosswalk, with less features, but keeping the great performance.
The project still doesn't have a stable version ( Still in Canary channel ) to be used for production like normal Crosswalk.
I think Crosswalk Lite will be a great solution for problems like Yours, maybe in the near future.

Unity texture poor quality

I've been playing around with Xcode and Unity for a while, and have made an app in Xcode which has a scrolling background. I want to basically re-create the app in Unity 2d, using the same set of images (if possible). I've imported all of the iPad sized images that I used in Xcode, but have noticed that the quality is a lot poorer when I build using Unity remote.
The image I'm most bothered about is the background, which is a repeating texture that scrolls across the screen. Do I have to mess around with the settings in Unity to get a better image quality? I'm using PNG. Surely the image can't be too small and therefore stretching because I'm using iPad sized images and running the app on Samsung Galaxy S6. Thanks in advance.
Unity Remote stream screenshots to your device, so the quality is not the final.
Maybe you can try to change the settings of UnityRemote.
See
http://docs.unity3d.com/es/current/Manual/UnityRemote4.html
More info/same question:
http://answers.unity3d.com/questions/408896/android-image-quality-is-poor-compared-to-the-qual.html
Find you image in Project tab and select it, then you should see something like this in inspector, experiment with values until you get results you are happy with.

Categories

Resources