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
4
Question by ina · May 08, 2011 at 08:14 PM · meshproceduralbatchingmeshfiltersharedmesh

difference between sharedMesh and Mesh

What is the difference between the two? Why is it that .mesh is always warned in danger of deprecation, and not sharedMesh? Does this have to do with batching?

Comment
Add comment
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

1 Reply

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

Answer by Mike 3 · May 08, 2011 at 10:00 PM

In the case of MeshCollider which I assume you're talking about, there's no difference in the implementation at all anymore. mesh has been deprecated (made obsolete) and shouldn't be used anymore, and it just calls sharedMesh internally.

In the case of MeshFilter (and SkinnedMeshRenderer), calling mesh will cause an instance to be created if it hasn't already done so, allowing you to modify the mesh without manipulating all the other instances. sharedMesh (which isn't deprecated for these classes) doesn't creae a new instance, which is generally what you want to use when reading from the mesh and not modifying.

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 ina · May 09, 2011 at 11:20 AM 0
Share

In the latter case, why is it deprecated? It seems shared$$anonymous$$esh and mesh will leave totally different results for $$anonymous$$eshFilter...

avatar image Mike 3 · May 09, 2011 at 11:26 AM 0
Share

It's not deprecated for $$anonymous$$eshFilter, only $$anonymous$$eshCollider.

avatar image Mike 3 · May 09, 2011 at 11:38 AM 0
Share

In fact i'll change the answer to make that more clear

avatar image ina · May 09, 2011 at 08:13 PM 0
Share

I noticed in procedural manipulations to a single mesh, .shared$$anonymous$$esh will modify all instances of the mesh - so it seemed like totally different results. Why is it deprecated in $$anonymous$$eshCollider? Do all instances share the same collider, even if they have different geometry? Is there a way to instantiate ones with different meshcolliders?

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

sharedMesh - what is the mesh shared with? 1 Answer

Static batching - Getting submesh 1 Answer

Cannot using two script to modify the same mesh at the same time 1 Answer

How do you completely clear a mesh? 1 Answer

Displaying precision edges of a mesh at runtime? 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