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 Panda313 · Feb 13, 2012 at 05:05 PM · guitextureguitextcompressionmemory leak

Full GuiTexture-based user interface memory leak

Hi,

I've made a systeme wich instantiante a whole GUI based on a xml and some png (used as Texture2D) loaded as an input. The GUI is made only with GUIText and GUITexture.

It's working perfectly fine, I can change my whole interface only by editing my xml file. The point is, I want to optimize the size cost of my interface. All the pictures are in ARGB32 and that sucks.

I tryed to create power of 2 textures, load my images into these power of 2 textures, and compress the Texture2D (using like "texture.Compress"). But image lost a lot of quality. Is there anyway to reduce the image memory size ? (they all contain alpha ...). The whole GUI is like ... 280 mo right now (original png files are like 2.75 mo)

Also, I think there is a memory leak. When I run my game in the editor with a memory consumption of 200 mo, after the interface is created if I stop my game, the memory of the editor is aroud 350. After 4hours of work, it's like 1.4 go ... It's not always increasing with the same amount, but it's increasing. I guess it's my fault. So I was wondering if there is a tool (like the Profiler) wich is able to list the texture currently in RAM (maybe I'm dreaming ^_^)

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 dannyskim · Feb 13, 2012 at 06:15 PM 0
Share

It sounds like, as far as your textures go, that you need to rework them completely. There really isn't a way to reduce the runtime file size of an ARGB32 texture, the only thing you can do to shrink the file size is to go to a lower color channel setting. Also, having individual images for all your GUITextures ins$$anonymous$$d of using a GUI system that you can atlas textures with is inefficient as far as file size goes. To get the lowest package size and video memory consumption, you need to look into not using GUITextures and go with a GUI system of sorts, plenty of which are available on the asset store. Prime31 has also created a free plug-in, but be warned, it is very code intensive to make complex menu systems.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Panda313 · Feb 13, 2012 at 11:00 PM

Thanks !

Actually, I have a big texture that containt all my elements. Then I split it into small textures and I destroy the big one. (I do that because the big picture is made with a php script that is not really efficiant so there is a lot of transparent spaces that might cost a lot in memory). Do you think that I should keep my big texture in memory instead of spliting it ?

I'll take a deep look into the GUI systems you talked about !

Thanks again !

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

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

6 People are following this question.

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

Related Questions

GUIText Position under different resolution, different aspect ratio 0 Answers

GUIText doesn't appear in Game View 3 Answers

Make GUI texture or Text have a certain area of the screen it can be rendered in 0 Answers

GUITEXT over a GUIButton 3 Answers

Multiplying GUIs 0 Answers


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