Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Horsman · Feb 09, 2010 at 03:10 AM · graphicsoptimization

Is there a way to free the memory duplication of textures loaded at runtime?

I need to load textures at runtime that have never seen the unity editor. That means I can't use asset bundles.

The option I have seems to be Texture2d.LoadImage(). I've noticed that all of those images are "readable" and also that memory usage is very high. How can I avoid this extra memory ding of keeping all my textures on main memory?

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 Ashkan_gc · Apr 15, 2010 at 07:47 PM 0
Share

textures are not on the CPU. they are in your memory. using is readable enabled will double the memory usage but has nothing to do with the CPU. also it don't use GPU unless you use Getpixels and ...

avatar image Horsman · Apr 16, 2010 at 12:10 AM 0
Share

I'm well aware of this. By CPU I meant main memory ins$$anonymous$$d of graphics memory. I'll fix this.

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by jonas-echterhoff · Feb 09, 2010 at 09:26 AM

It is currently not possible to set runtime generated textures as non-readable. While such a feature would be technically feasible, it is not a common use case, as people don't typically generate huge amounts of textures dynamically. Why do you need to do this? Possibly there is a better way to get the same results. Is texture memory usage actually an issue you are running into?

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 Horsman · Feb 09, 2010 at 09:04 PM 0
Share

In nearly every game, $$anonymous$$imum texture usage is a requirement. Our game has many many different textures that need to stay as small as possible.

I need to do this because new character equipment textures are downloaded from the server at runtime, and uploaded to the server at runtime.

Additionally, content creators do not use Unity.

It should be feasible, and I expect that there is a way to handle this in a thread safe manner if I were to create my own threading. I'm just not sure how yet and wonder if anyone has a tip or two.

avatar image
0

Answer by Ashkan_gc · Apr 15, 2010 at 07:39 PM

currently it's not possible to make textures unreadable but you can compress them using compression libraries or even pack them in zip files and extract them at runtime. search the net for "compression library for mono". i should remind something: you can not call unity libraries in threads other than the main thread

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

No one has followed this question yet.

Related Questions

How to implement an ammo counter using textured quads? [Scripting doubts] 2 Answers

Swiping images across the screen - iPhone 0 Answers

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

What is the expected behaviour of Dynamic Batching? 2 Answers

Whats the best way to setup a screen like this... 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