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 $$anonymous$$ · Dec 10, 2014 at 02:34 PM · uiunity 4.6new ui

[Unity 4.6 uGUI] Using uGUI and unity built in sprite packer does not reduce draw calls.

Hi all,

I'm trying to do some performance enhancements to my UI heavy Augmented Reality app. I'm using Unity 4.6 new uGUI. But the draw call amount is not in an acceptable range. Somewhere near 100 draw calls on some screens. My target platform is mobile (iOS and Android) so this is not good at all.

UI setup

  • UI texture import settings

  • Texture type : Sprite (2d and UI)

  • Sprte mode : single

  • Packing tag : atlas

  • Canvas settings

  • Render mode : Screen space overlay

Other settings

  • I have multiple Canvases in one 'Screen'

  • No Camera apart from the AR camera that does not render UI (Since it's Screen space overlay, UI looks and behaves fine without a Camera)

  • All the UI elements are packed into one 'atlas' essentially

System configuration

  • Mac OSX 10.9.5

  • Unity 4.6.0 Patch 1 (tested on 4.6.0 as well. Same result)

I'm generating sprite atlas using Unity built in 'Sprite Packer' tool and as I've read on the documentation it should use the atlas in the background without me having to doing anything else. So my individual UI elements refer to the sprite not the atlas. But as I've understood it, Unity should use the created atlas in the background. Right? or do I have to do something else here?

But I still get a lot of draw calls where I should get only one. I've attached this screen capture to illustrate the issue.

alt text

This screen should only have one draw call as all the assets used in here are in one atlas.

Does anyone know what's going on or what I'm doing wrong.

Sorry for the long winded explanation BTW. Thanks

screen shot 2014-12-10 at 14.01.00.png (37.7 kB)
Comment
Add comment · Show 2
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 intacto · Dec 23, 2014 at 06:07 AM 0
Share

I have the exact same problem, could you find a solutions for it?

avatar image $$anonymous$$ · Dec 23, 2014 at 10:58 AM 0
Share

The solution I found is to manually create a texture atlas either by photoshop or using a 3rd part texture packer tool and then refer to those in Unity by importing the atlas 'sprite mode' as multiple. This is an annoying workaround but works until I can find a proper workflow using unity built in sprite packer

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by intacto · Dec 23, 2014 at 07:13 AM

Change the texture import setting to advanced and set the mesh type to full rect. Your problem will be fixed when you repack the atlas.

Comment
Add comment · Show 4 · 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 $$anonymous$$ · Dec 23, 2014 at 10:56 AM 0
Share

Hi, I've tried this but it did not work for me.

avatar image FiveFingers · Jan 28, 2015 at 04:45 PM 0
Share

But you loose the "sprite" property of the asset in that way, hence, you can't use it as sprite on new UI controls.

Am I right ?

avatar image intacto · Jan 28, 2015 at 05:23 PM 0
Share

You are wrong, you can still use it as a sprite

avatar image Kanda · Feb 08, 2015 at 07:42 PM 0
Share

Hey, I have the same problem, and changing to advanced and then set mesh type too full rect didnt change anything.

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

A node in a childnode? 1 Answer

using new UGUI for network game 0 Answers

Unity uGui change source image on event 1 Answer

Is there a bug in Unity 4.6.0? 0 Answers

Android app crash on uGUI animation start 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