Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by gselfish · Jun 21, 2015 at 09:07 PM · uiiosimagebackground

Full-screen background kills iPhone4 performance

Hi all, in my game I have a main menu scene with an image showing in the background. The image is relatively small, but resized in the editor to fill the entire canvas, whose reference resolution is 768 x 1024, for all iOS aspect ratios. With this setup the menu runs at about 5 fps on an iPhone 4, which becomes 30 fps if the image is disabled.

I've made many experiments, but the only other one that works is showing the background in its native size, which is rather useless as it fills only about one third of the screen. I've also tried rescaling the image to full screen size in Photoshop, to avoid in-game scaling, but it didn't have any effect. Importing it as a UI Raw Image instead of Image didn't help either. There are no transparencies in the whole scene.

So, I understand that the iPhone 4 has issues with large images, but is there any way to show a full screen image on this device without such a huge performance drop?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image scozirge · Dec 31, 2015 at 09:48 AM 0
Share

i have the same problem exactly. Do you resolve it?

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by lugduweb · Jun 22, 2015 at 03:50 AM

How do you manage your image ? Is it a sprite or a GUITexture ? Is it compressed ? If not, you're probably filling the iphone men.

Do you have a shader attached to your background ? How do you compute and display your framerate ?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Xarbrough · Jun 21, 2015 at 11:25 PM

This shouldn't be the case. Are you sure there is nothing else going on? Have you tested a blank scene where you do nothing but place the image on a canvas?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by gselfish · Jun 22, 2015 at 09:17 PM

First of all thank you guys for your input. The image is a 659 x 896, 16 bit / Truecolor (makes no difference performance wise) sprite. As I said I've also tried turning it into a compressed/uncompressed texture attached to a Raw Image, but nothing changed.

Additionally, I've set up a simple scene with OnGui buttons that allow me to:

  • Change the image size to native / resized to fill an iphone 4 screen / resized to fill iphone 5

  • Disable the image altogether

  • Disable the main menu panel (which basically leaves only the BG in the scene)

  • Change camera flags to skybox / solid color / none

  • Enable / disable alpha on the main menu panel (just to try... turns out it makes no difference)

The most relevant result: with the menu disabled, and native image size on a solid camera background, I get 30 fps. Resizing the image to full screen causes fps to drop to 16.

By turning on the menu, the fps drop to 17 and 11 respectively (with 12 draw calls). It's a huge drop, but I should also mention that if I turn off the BG and show only the menu, I get 25 fps. The menu I'm showing is very similar to this one (I'm actually using this store asset):

alt text

Btw, switching the camera from solid color to skybox also has a huge performance hit, even if the image is filling the screen. With everything on + skybox, I drop to 6 fps.

But again, I think the most important result is the drop I initially mentioned from 30 to 16 fps. Any idea as to how can this be avoided?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Andreywk · Oct 14, 2015 at 12:38 PM 0
Share

I faced with the same problem even single dot sprite ruin all performance. Here I show up one sprite (size 1x1 pixel) which is filling all screen alt text

If I scale out the size, performance increase alt text

The problem can be conform using any iPhone, Android devices and even PC, just increase amount of the full screen sprites in my example: "BlackTexture" using Ctrl+D (Command+D). To be able to control the scale in the project use one touch to decrease Sprite size and two touches to increase.

Example available here https://dl.dropboxusercontent.com/u/66011823/tmp/ScaleTest.zip

img-2758.png (19.1 kB)
img-2760.png (23.6 kB)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Place UI element in background (Behind ALLLL game objects) 2 Answers

UI slider background image 1 Answer

why a gui image is rendered white on ios ? 0 Answers

How to add Panorama image to background? 1 Answer

Change size of UI canvas image, the best option? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges