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 $$anonymous$$ · Aug 23, 2018 at 08:37 PM · textureresourcescullingquads

How do I reduce resource cost of textured quads?

I feel that quads take up way more resources than they should, my game starts to lag with just 10,000 of them, but it's a block based game, so there is going to have to be a lot of quads everywhere to represent blocks sides and block tops and such. So how do I make these take up fewer resources? I thought Unity automatically culls textures that are not being seen by a camera, but if not, how do I do so? Thanks

Comment
Add comment · Show 4
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 Cherno · Aug 23, 2018 at 08:54 PM 1
Share

just 10,000 of them

Yeah, that's a lot of GameObjects. Unity isn't designed to handle such amounts, they might even have colliders which taxes the system even more due to physics calculations. Also, it's not the number of vertices or presence of a texture that is the primary cause of slowdowns, it is the amount of seperate GameObjects. This kind of question pops up regularly, and the answer is always the same: Take a look at the $$anonymous$$esh class and search for tutorials and scripts on how to generetate meshes at runtime, and combine all those quads into chunked meshes. 10,000 quads have 40,000 vertices, which is still below the ~64,000 vertex limit of a mesh so you could even put all those quads into one single mesh, which results in one single GameObject.

avatar image $$anonymous$$ Cherno · Aug 23, 2018 at 10:45 PM 0
Share

Ah! Someone once told me that a GameObjects used almost no resources, I never thought that they would be the cause of all this lag. Yes, from looking at some forums about this sort of thing, it appears that most people counter this problem by using a mesh for a large number of blocks, although I've always been under the impression that a mesh was something that you'd spend several hours making in Blender, and not something created at runtime, I guess I've got some things to learn about meshes. Well, you have helped me solve my problem, so if you could post something about meshes as an answer then I could accept it.

avatar image Piyush_Pandey $$anonymous$$ · Aug 24, 2018 at 09:25 AM 0
Share

Empty gameobjects don't take resources. Same is not the case when they are having components.

avatar image Piyush_Pandey · Aug 24, 2018 at 09:24 AM 0
Share

You don't need 10,000 at a time. Here is how you can optimize:

  1. Use tiled sprites ins$$anonymous$$d of quad. If that is not possible then make sure the materials in all the quads are the same. This will help in batching.

  2. If the tile is not moving then mark it as static. This will help in static batching of similar tiles at runtime.

  3. Do not use collider on every tile. Ins$$anonymous$$d use another empty gameobject with just the collider on it for long grounds/surfaces.

0 Replies

· Add your reply
  • Sort: 

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

118 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 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 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 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 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

Assigning script-generated textures 0 Answers

Load texture and shaders at runtime on iPhone 2 Answers

My ios Project is too big!?what can i do? 1 Answer

Textured object appears transparent in a textured sphere with front culling 1 Answer

Make reference to the project texture file in the material field 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