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
1
Question by bpears · Aug 08, 2013 at 12:30 AM · prefabinstancebatchingstatic-batching

Prefabs - static batching duplicates of them?

I couldn't really sum up the question well enough in the title, but here it goes:

Let's just say, I have a model in a modeling program. It is made of several meshes, to complete it's appearance as an entire model. Many of these pieces are just copies. Now, I bring that model into Unity. The intention is to mark the pieces as static and batch them together. Now, I need to either

  • A. make at one of those pieces a prefab, delete the rest, recreate the missing parts by duplicating the prefab.

  • B. Batch every original mesh piece, each as a unique mesh.

Now here is why I ask this, thus, my actual question:

Will doing option A save space in the build, since Unity will now know these pieces are in fact the exact same things? If so, is it also beneficial in any other ways?

Thank you, I appreciate the help!

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 bpears · Aug 11, 2013 at 08:13 PM 0
Share

anyone..?

1 Reply

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

Answer by Joyrider · Aug 11, 2013 at 08:22 PM

Hmm, if your objects are identical, you may create one prefab and replace them by that prefab. Now the question really is:

When you look at the imported objects, do they all reference the same mesh? That is basically what you want to know.

If they all use the same mesh, you won't have much difference in te buildsize of your game by specifically transforming them into prefabs.

If they don't, doing your prefab manipulation might be a good idea, for your buildsize, but also for your runtime memory usage (only one mesh in memory).

As for the batching, it doesn't matter if it is the same mesh or not, or if it is a prefab or not, as long as they have the same material; Unity will batch them together in the static batching.

Comment
Add comment · Show 2 · 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 bpears · Aug 11, 2013 at 08:48 PM 0
Share

They don't reference the same. From what I gather from the docs, any models imported has all its meshes treated as unique. But yeah! Thanks for the reply, just what I was looking to hear! Thanks!

avatar image Joyrider · Aug 11, 2013 at 08:51 PM 0
Share

Could be, I use a custom importer, so my meshes are common to all that use the same ;) But, that's good to know!

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

15 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

Related Questions

Understanding prefab updating its instances 1 Answer

Issues with tracking prefab instances and gameobject naming (JS) 1 Answer

Changing prefab doesn't update instances (in scene aswell as in other prefabs).. 3 Answers

Prefab instances not renaming when prefab is renamed? 1 Answer

Change in a variable affects all instances 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